Trait glutin::os::unix::EventsLoopExt
source · pub trait EventsLoopExt {
// Required methods
fn new_x11() -> Result<Self, XNotSupported>
where Self: Sized;
fn new_wayland() -> Self
where Self: Sized;
fn is_wayland(&self) -> bool;
fn is_x11(&self) -> bool;
fn get_wayland_display(&self) -> Option<*mut c_void>;
}
Expand description
Additional methods on EventsLoop
that are specific to Linux.
Required Methods§
sourcefn new_x11() -> Result<Self, XNotSupported>where
Self: Sized,
fn new_x11() -> Result<Self, XNotSupported>where Self: Sized,
Builds a new EventsLoop
that is forced to use X11.
sourcefn new_wayland() -> Selfwhere
Self: Sized,
fn new_wayland() -> Selfwhere Self: Sized,
Builds a new EventsLoop
that is forced to use Wayland.
sourcefn is_wayland(&self) -> bool
fn is_wayland(&self) -> bool
True if the EventsLoop
uses Wayland.
sourcefn get_wayland_display(&self) -> Option<*mut c_void>
fn get_wayland_display(&self) -> Option<*mut c_void>
Returns a pointer to the wl_display
object of wayland that is used by this EventsLoop
.
Returns None
if the EventsLoop
doesn’t use wayland (if it uses xlib for example).
The pointer will become invalid when the glutin EventsLoop
is destroyed.