[][src]Struct wayland_client::egl::WlEglSurface

pub struct WlEglSurface { /* fields omitted */ }

EGL surface

This object is a simple wrapper around a WlSurface to add the EGL capabilities. Just use the ptr method once this object is created to get the window pointer your OpenGL library is needing to initialize the EGL context (you'll most likely need the display ptr as well, that you can get via the ptr method of the Proxy trait on the WlDisplay object).

Methods

impl WlEglSurface[src]

pub fn new(surface: &Proxy<WlSurface>, width: i32, height: i32) -> WlEglSurface[src]

Create an EGL surface from a wayland surface

pub unsafe fn new_from_raw(
    surface: *mut wl_proxy,
    width: i32,
    height: i32
) -> WlEglSurface
[src]

Create an EGL surface from a raw pointer to a wayland surface

This function is unsafe because surface must be a valid wl_surface pointer

pub fn get_size(&self) -> (i32, i32)[src]

Fetch current size of the EGL surface

pub fn resize(&self, width: i32, height: i32, dx: i32, dy: i32)[src]

Resize the EGL surface

The two first arguments (width, height) are the new size of the surface, the two others (dx, dy) represent the displacement of the top-left corner of the surface. It allows you to control the direction of the resizing if necessary.

pub fn ptr(&self) -> *const c_void[src]

Raw pointer to the EGL surface

You'll need this pointer to initialize the EGL context in your favourite OpenGL lib.

Trait Implementations

impl Drop for WlEglSurface[src]

impl Sync for WlEglSurface[src]

impl Send for WlEglSurface[src]

Auto Trait Implementations

impl Unpin for WlEglSurface

impl UnwindSafe for WlEglSurface

impl RefUnwindSafe for WlEglSurface

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]