Struct winit::EventsLoop [] [src]

pub struct EventsLoop { /* fields omitted */ }

Provides a way to retreive events from the windows that were registered to it.

To wake up an EventsLoop from a another thread, see the EventsLoopProxy docs.

Usage will result in display backend initialisation, this can be controlled on linux using an environment variable WINIT_UNIX_BACKEND.

Legal values are x11 and wayland. If this variable is set only the named backend will be tried by winit. If it is not set, winit will try to connect to a wayland connection, and if it fails will fallback on x11.

If this variable is set with any other value, winit will panic.

Methods

impl EventsLoop
[src]

Builds a new events loop.

Fetches all the events that are pending, calls the callback function for each of them, and returns.

Runs forever until interrupt() is called. Whenever an event happens, calls the callback.

Creates an EventsLoopProxy that can be used to wake up the EventsLoop from another thread.