Expand description
The winit event loop, WindowConfig, and the run_windowed/run_app drivers.
The winit event loop and the windowed app drivers.
run_windowed drives a raw FnMut(&mut Terminal<..>) closure;
run_app drives an App. This is the inverted
driver: winit owns the loop and calls back into the app on each redraw,
so it cannot be core’s generic
run_blocking, which owns its own
while loop.
Structs§
- Event
Proxy - A thread-safe handle for injecting application-defined events into a running windowed event loop from another thread (network, audio, timer, …).
- Event
Proxy Closed - Error returned by
EventProxy::send_eventwhen the event loop it targets has already exited. - Window
Config - Window configuration for
run_windowed/run_app.
Functions§
- run_app
- Drive an
Appfrom the windowed event loop. - run_
app_ with_ proxy - Same as
run_app, but also handson_proxyanEventProxyfor injecting cross-thread events. - run_
app_ with_ typed_ proxy - Same as
run_app_with_proxy, but the injected payload can be anyT: Send + 'staticinstead of a fixedu64. - run_
windowed - Open a window and drive
app_loopfrom the winit event loop. - run_
windowed_ with_ proxy - Same as
run_windowed, but also handson_proxyanEventProxyfor injecting cross-thread events. - run_
windowed_ with_ typed_ proxy - Same as
run_windowed_with_proxy, but the injected payload can be anyT: Send + 'staticinstead of a fixedu64.