Trait winit::platform::unix::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 xcb_connection(&self) -> Option<*mut c_void>;
fn wayland_surface(&self) -> Option<*mut c_void>;
fn wayland_display(&self) -> Option<*mut c_void>;
fn wayland_set_csd_theme(&self, config: Theme);
fn is_ready(&self) -> bool;
}Expand description
Additional methods on Window that are specific to Unix.
Required Methods§
sourcefn xlib_window(&self) -> Option<c_ulong>
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).
sourcefn xlib_display(&self) -> Option<*mut c_void>
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 Window is destroyed.
fn xlib_screen_id(&self) -> Option<c_int>
sourcefn xcb_connection(&self) -> Option<*mut c_void>
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 Window is destroyed.
sourcefn wayland_surface(&self) -> Option<*mut c_void>
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 Window is destroyed.
sourcefn wayland_display(&self) -> Option<*mut c_void>
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 Window is destroyed.
sourcefn wayland_set_csd_theme(&self, config: Theme)
fn wayland_set_csd_theme(&self, config: Theme)
Updates Theme of window decorations.
You can also use WINIT_WAYLAND_CSD_THEME env variable to set the theme.
Possible values for env variable are: “dark” and light“