Struct glutin::EventsLoop
source · pub struct EventsLoop { /* private fields */ }
Expand description
Provides a way to retreive events from the windows that are registered to it.
Implementations§
source§impl EventsLoop
impl EventsLoop
sourcepub fn new() -> EventsLoop
pub fn new() -> EventsLoop
Builds a new events loop.
sourcepub fn poll_events<F>(&self, callback: F)where
F: FnMut(Event),
pub 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.
sourcepub fn run_forever<F>(&self, callback: F)where
F: FnMut(Event),
pub fn run_forever<F>(&self, callback: F)where F: FnMut(Event),
Runs forever until interrupt()
is called. Whenever an event happens, calls the callback.
Auto Trait Implementations§
impl RefUnwindSafe for EventsLoop
impl Send for EventsLoop
impl Sync for EventsLoop
impl Unpin for EventsLoop
impl UnwindSafe for EventsLoop
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