Struct winit::event_loop::EventLoopWindowTarget
source · pub struct EventLoopWindowTarget<T: 'static> {
pub(crate) p: EventLoopWindowTarget<T>,
pub(crate) _marker: PhantomData<*mut ()>,
}
Expand description
Fields§
§p: EventLoopWindowTarget<T>
§_marker: PhantomData<*mut ()>
Implementations§
source§impl<T> EventLoopWindowTarget<T>
impl<T> EventLoopWindowTarget<T>
sourcepub fn available_monitors(&self) -> impl Iterator<Item = MonitorHandle>
pub fn available_monitors(&self) -> impl Iterator<Item = MonitorHandle>
Returns the list of all the monitors available on the system.
sourcepub fn primary_monitor(&self) -> Option<MonitorHandle>
pub fn primary_monitor(&self) -> Option<MonitorHandle>
Returns the primary monitor of the system.
Returns None
if it can’t identify any monitor as a primary one.
Platform-specific
Wayland: Always returns None
.
sourcepub fn set_device_event_filter(&self, _filter: DeviceEventFilter)
pub fn set_device_event_filter(&self, _filter: DeviceEventFilter)
Change DeviceEvent
filter mode.
Since the DeviceEvent
capture can lead to high CPU usage for unfocused windows, winit
will ignore them by default for unfocused windows on Linux/BSD. This method allows changing
this filter at runtime to explicitly capture them again.
Platform-specific
- Wayland / macOS / iOS / Android / Web / Orbital: Unsupported.
Trait Implementations§
source§impl<T> Debug for EventLoopWindowTarget<T>
impl<T> Debug for EventLoopWindowTarget<T>
source§impl<T> EventLoopWindowTargetExtWayland for EventLoopWindowTarget<T>
impl<T> EventLoopWindowTargetExtWayland for EventLoopWindowTarget<T>
source§fn is_wayland(&self) -> bool
fn is_wayland(&self) -> bool
True if the
EventLoopWindowTarget
uses Wayland.source§fn 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
EventLoopWindowTarget
. Read moresource§impl<T> EventLoopWindowTargetExtX11 for EventLoopWindowTarget<T>
impl<T> EventLoopWindowTargetExtX11 for EventLoopWindowTarget<T>
source§fn is_x11(&self) -> bool
fn is_x11(&self) -> bool
True if the
EventLoopWindowTarget
uses X11.source§impl<T> HasRawDisplayHandle for EventLoopWindowTarget<T>
impl<T> HasRawDisplayHandle for EventLoopWindowTarget<T>
source§fn raw_display_handle(&self) -> RawDisplayHandle
fn raw_display_handle(&self) -> RawDisplayHandle
Returns a raw_window_handle::RawDisplayHandle
for the event loop.