Skip to main content

retroglyph_window/winit/
mod.rs

1//! Everything winit-specific in this crate: the event loop, event translation, and the windowed
2//! app drivers.
3//!
4//! A driver for another windowing library (SDL2, tao, a custom loop) would be a sibling module
5//! with the same shape: create a window, translate its events into
6//! [`Event`](retroglyph_core::event::Event)s pushed onto [`WindowBackend`](crate::WindowBackend),
7//! and call [`Presenter::present`](crate::Presenter::present) once per frame.
8
9/// The winit event loop, `WindowConfig`, and the `run_windowed`/`run_app` drivers.
10pub mod run;
11/// winit-event -> retroglyph-event converters.
12pub mod translate;
13/// wasm32-only DPR/viewport/pointer-rescaling helpers used internally by `run`.
14mod web;
15
16pub use run::{
17    EventProxy, EventProxyClosed, WindowConfig, run_app, run_app_with_proxy,
18    run_app_with_typed_proxy, run_windowed, run_windowed_with_proxy, run_windowed_with_typed_proxy,
19};