Struct iui::EventLoop[][src]

pub struct EventLoop { /* fields omitted */ }

Provides fine-grained control over the user interface event loop, exposing the on_tick event which allows integration with other event loops, custom logic on event ticks, etc. Be aware the Cocoa (GUI toolkit on Mac OS) requires that the first thread spawned controls the UI, so do not spin off your UI interactions into an alternative thread. You're likely to have problems on Mac OS.

Methods

impl EventLoop
[src]

Set the given callback to run when the event loop is executed. Note that if integrating other event loops you should consider the potential benefits and drawbacks of the various run modes.

Executes a tick in the event loop, returning immediately. The on_tick callback is executed after the UI step.

Returns true if the application should continue running, and false if it should quit.

Hands control to the event loop until the next UI event occurs. The on_tick callback is executed after the UI step.

Returns true if the application should continue running, and false if it should quit.

Hands control to the event loop until UI::quit() is called, running the callback given with on_tick after each UI event.

Hands control to the event loop until UI::quit() is called, running the callback given with on_tick approximately every delay milliseconds.

Auto Trait Implementations

impl !Send for EventLoop

impl !Sync for EventLoop