Trait WindowExtUnix

Source
pub trait WindowExtUnix {
    // Required methods
    fn xlib_window(&self) -> Option<c_ulong>;
    fn xlib_display(&self) -> Option<*mut c_void>;
    fn xlib_screen_id(&self) -> Option<c_int>;
    fn set_urgent(&self, is_urgent: bool);
    fn xcb_connection(&self) -> Option<*mut c_void>;
    fn wayland_surface(&self) -> Option<*mut c_void>;
    fn wayland_display(&self) -> Option<*mut c_void>;
    fn set_wayland_theme<T: Theme>(&self, theme: T);
    fn is_ready(&self) -> bool;
}
Expand description

Additional methods on Window that are specific to Unix.

Required Methods§

Source

fn xlib_window(&self) -> Option<c_ulong>

Returns the ID of the Window xlib object that is used by this window.

Returns None if the window doesn’t use xlib (if it uses wayland for example).

Source

fn xlib_display(&self) -> Option<*mut c_void>

Returns a pointer to the Display object of xlib that is used by this window.

Returns None if the window doesn’t use xlib (if it uses wayland for example).

The pointer will become invalid when the glutin Window is destroyed.

Source

fn xlib_screen_id(&self) -> Option<c_int>

Source

fn set_urgent(&self, is_urgent: bool)

Set window urgency hint (XUrgencyHint). Only relevant on X.

Source

fn xcb_connection(&self) -> Option<*mut c_void>

This function returns the underlying xcb_connection_t of an xlib Display.

Returns None if the window doesn’t use xlib (if it uses wayland for example).

The pointer will become invalid when the glutin Window is destroyed.

Source

fn wayland_surface(&self) -> Option<*mut c_void>

Returns a pointer to the wl_surface object of wayland that is used by this window.

Returns None if the window doesn’t use wayland (if it uses xlib for example).

The pointer will become invalid when the glutin Window is destroyed.

Source

fn wayland_display(&self) -> Option<*mut c_void>

Returns a pointer to the wl_display object of wayland that is used by this window.

Returns None if the window doesn’t use wayland (if it uses xlib for example).

The pointer will become invalid when the glutin Window is destroyed.

Source

fn set_wayland_theme<T: Theme>(&self, theme: T)

Sets the color theme of the client side window decorations on wayland

Source

fn is_ready(&self) -> bool

👎Deprecated

Check if the window is ready for drawing

It is a remnant of a previous implementation detail for the wayland backend, and is no longer relevant.

Always return true.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§