Struct winit::EventsLoop
[−]
[src]
pub struct EventsLoop { /* fields omitted */ }
Provides a way to retreive events from the windows that were registered to it.
Methods
impl EventsLoop
[src]
fn new() -> EventsLoop
Builds a new events loop.
fn poll_events<F>(&self, callback: F) where F: FnMut(Event)
Fetches all the events that are pending, calls the callback function for each of them, and returns.
fn run_forever<F>(&self, callback: F) where F: FnMut(Event)
Runs forever until interrupt()
is called. Whenever an event happens, calls the callback.
fn interrupt(&self)
If we called run_forever()
, stops the process of waiting for events.