Trait glutin::os::unix::RawContextExt

source ·
pub trait RawContextExt {
    // Required methods
    unsafe fn build_raw_wayland_context(
        self,
        display_ptr: *const wl_display,
        surface: *mut c_void,
        width: u32,
        height: u32
    ) -> Result<RawContext<NotCurrent>, CreationError>
       where Self: Sized;
    unsafe fn build_raw_x11_context(
        self,
        xconn: Arc<XConnection>,
        xwin: c_ulong
    ) -> Result<RawContext<NotCurrent>, CreationError>
       where Self: Sized;
}
Expand description

A linux-specific extension for the ContextBuilder which allows assembling RawContext<T>s.

Required Methods§

source

unsafe fn build_raw_wayland_context( self, display_ptr: *const wl_display, surface: *mut c_void, width: u32, height: u32 ) -> Result<RawContext<NotCurrent>, CreationError>where Self: Sized,

Creates a raw context on the provided surface.

Unsafe behaviour might happen if you:

  • Provide us with invalid parameters.
  • The surface/display_ptr is destroyed before the context
source

unsafe fn build_raw_x11_context( self, xconn: Arc<XConnection>, xwin: c_ulong ) -> Result<RawContext<NotCurrent>, CreationError>where Self: Sized,

Creates a raw context on the provided window.

Unsafe behaviour might happen if you:

  • Provide us with invalid parameters.
  • The xwin is destroyed before the context

Implementors§