Struct lambda_platform::winit::Loop
source · pub struct Loop<E: 'static + Debug> { /* private fields */ }
Expand description
Loop wrapping for the winit event loop.
Implementations§
source§impl<E: 'static + Debug> Loop<E>
impl<E: 'static + Debug> Loop<E>
sourcepub fn create_event_publisher(&mut self) -> LoopPublisher<E>
pub fn create_event_publisher(&mut self) -> LoopPublisher<E>
Create an event publisher for this Loop.
sourcepub fn get_primary_monitor(&self) -> Option<MonitorHandle>
pub fn get_primary_monitor(&self) -> Option<MonitorHandle>
Returns the primary monitor for the current OS if detectable.
sourcepub fn get_all_monitors(&self) -> impl Iterator<Item = MonitorHandle>
pub fn get_all_monitors(&self) -> impl Iterator<Item = MonitorHandle>
Get all monitors available on the system.
sourcepub fn get_any_available_monitors(&self) -> Option<MonitorHandle>
pub fn get_any_available_monitors(&self) -> Option<MonitorHandle>
Gets the first available monitor or panics.
sourcepub fn run_forever<Callback>(self, callback: Callback)where
Callback: 'static + FnMut(Event<'_, E>, &EventLoopWindowTarget<E>, &mut ControlFlow),
pub fn run_forever<Callback>(self, callback: Callback)where
Callback: 'static + FnMut(Event<'_, E>, &EventLoopWindowTarget<E>, &mut ControlFlow),
Uses the winit event loop to run forever