Struct wry::application::event_loop::EventLoopWindowTarget
source · pub struct EventLoopWindowTarget<T>where
T: 'static,{ /* private fields */ }
Expand description
Target that associates windows with an EventLoop
.
This type exists to allow you to create new windows while Tao executes
your callback. EventLoop
will coerce into this type (impl<T> Deref for EventLoop<T>
), so functions that take this as a parameter can also take
&EventLoop
.
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.
sourcepub fn monitor_from_point(&self, x: f64, y: f64) -> Option<MonitorHandle>
pub fn monitor_from_point(&self, x: f64, y: f64) -> Option<MonitorHandle>
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, tao
will ignore them by default for unfocused windows. This method allows changing
this filter at runtime to explicitly capture them again.
Platform-specific
- Linux / macOS / iOS / Android: Unsupported.
sourcepub fn cursor_position(&self) -> Result<PhysicalPosition<f64>, ExternalError>
pub fn cursor_position(&self) -> Result<PhysicalPosition<f64>, ExternalError>
Returns the current cursor position
Platform-specific
- iOS / Android / Linux(Wayland): Unsupported, returns
0,0
.
sourcepub fn set_progress_bar(&self, _progress: ProgressBarState)
pub fn set_progress_bar(&self, _progress: ProgressBarState)
Sets the progress bar state
Platform-specific
- Windows: Unsupported. Use the Progress Bar Function Available in Window (Windows can have different progress bars for different window)
- Linux: Only supported desktop environments with
libunity
(e.g. GNOME). - iOS / Android: Unsupported.
Trait Implementations§
source§impl<T> Clone for EventLoopWindowTarget<T>where
T: Clone + 'static,
impl<T> Clone for EventLoopWindowTarget<T>where T: Clone + 'static,
source§fn clone(&self) -> EventLoopWindowTarget<T>
fn clone(&self) -> EventLoopWindowTarget<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T> Debug for EventLoopWindowTarget<T>
impl<T> Debug for EventLoopWindowTarget<T>
source§impl<T> EventLoopWindowTargetExtUnix for EventLoopWindowTarget<T>
impl<T> EventLoopWindowTargetExtUnix for EventLoopWindowTarget<T>
source§fn is_wayland(&self) -> bool
fn is_wayland(&self) -> bool
EventLoopWindowTarget
uses Wayland.fn xlib_xconnection(&self) -> Option<Arc<XConnection>>
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.