Struct event_loop::WindowEvents [] [src]

pub struct WindowEvents {
    // some fields omitted
}

An event loop iterator

Warning: Because the iterator polls events from the window back-end, it must be used on the same thread as the window back-end (usually main thread), unless the window back-end supports multi-thread event polling.

Methods

impl WindowEvents

fn new() -> WindowEvents

Creates a new event iterator with default UPS and FPS settings.

fn next<W>(&mut self, window: &mut W) -> Option<Event<W::Event>> where W: Window

Returns the next game event.

Trait Implementations

impl EventLoop for WindowEvents

fn set_ups(&mut self, frames: u64)

fn set_max_fps(&mut self, frames: u64)

fn set_swap_buffers(&mut self, enable: bool)

fn set_bench_mode(&mut self, enable: bool)

fn ups(self, frames: u64) -> Self

fn max_fps(self, frames: u64) -> Self

fn swap_buffers(self, enable: bool) -> Self

fn bench_mode(self, enable: bool) -> Self

Derived Implementations

impl Clone for WindowEvents

fn clone(&self) -> WindowEvents

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for WindowEvents