Struct wayland_egl::WlEglSurface
source · [−]pub struct WlEglSurface { /* private fields */ }
Expand description
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).
Implementations
sourceimpl WlEglSurface
impl WlEglSurface
sourcepub fn new(surface: &WlSurface, width: i32, height: i32) -> WlEglSurface
pub fn new(surface: &WlSurface, width: i32, height: i32) -> WlEglSurface
Create an EGL surface from a wayland surface
sourcepub unsafe fn new_from_raw(
surface: *mut wl_proxy,
width: i32,
height: i32
) -> WlEglSurface
pub unsafe fn new_from_raw(
surface: *mut wl_proxy,
width: i32,
height: i32
) -> WlEglSurface
Create an EGL surface from a raw pointer to a wayland surface
Safety
The provided pointer must be a valid wl_surface
pointer from libwayland-client
.
sourcepub fn resize(&self, width: i32, height: i32, dx: i32, dy: i32)
pub fn resize(&self, width: i32, height: i32, dx: i32, dy: i32)
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.
Trait Implementations
sourceimpl Debug for WlEglSurface
impl Debug for WlEglSurface
sourceimpl Drop for WlEglSurface
impl Drop for WlEglSurface
impl Send for WlEglSurface
impl Sync for WlEglSurface
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more