Struct winit::event_loop::EventLoopWindowTarget
source · pub struct EventLoopWindowTarget<T: 'static> { /* private fields */ }
Expand description
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> EventLoopWindowTargetExtUnix for EventLoopWindowTarget<T>
Available on x11_platform
or wayland_platform
only.
impl<T> EventLoopWindowTargetExtUnix for EventLoopWindowTarget<T>
Available on
x11_platform
or wayland_platform
only.source§fn is_wayland(&self) -> bool
fn is_wayland(&self) -> bool
True if the
EventLoopWindowTarget
uses Wayland.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.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for EventLoopWindowTarget<T>
impl<T> !Send for EventLoopWindowTarget<T>
impl<T> !Sync for EventLoopWindowTarget<T>
impl<T> Unpin for EventLoopWindowTarget<T>where T: Unpin,
impl<T> !UnwindSafe for EventLoopWindowTarget<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more