async_winit/
lib.rs

1/*
2
3`async-winit` is free software: you can redistribute it and/or modify it under the terms of one of
4the following licenses:
5
6* GNU Lesser General Public License as published by the Free Software Foundation, either
7  version 3 of the License, or (at your option) any later version.
8* Mozilla Public License as published by the Mozilla Foundation, version 2.
9
10`async-winit` is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
11the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
12Public License and the Patron License for more details.
13
14You should have received a copy of the GNU Lesser General Public License and the Mozilla
15Public License along with `async-winit`. If not, see <https://www.gnu.org/licenses/>.
16
17*/
18
19#![doc = include_str!("../README.md")]
20
21// Private modules.
22mod handler;
23mod oneoff;
24mod reactor;
25mod sync;
26mod timer;
27
28// Modules we need to change for `async-winit`.
29pub mod event_loop;
30pub mod filter;
31pub mod platform;
32pub mod window;
33
34pub mod event {
35    #[doc(inline)]
36    pub use winit::event::*;
37
38    pub use super::window::registration::{
39        AxisMotion, CursorMoved, KeyboardInput, MouseInput, MouseWheel, ScaleFactor,
40        ScaleFactorChanged, ScaleFactorChanging, TouchpadMagnify, TouchpadPressure, TouchpadRotate,
41    };
42}
43
44// Modules that can just be re-exported in `async-winit`.
45#[doc(inline)]
46pub use winit::{dpi, error, monitor};
47
48pub use handler::{Event, Handler, Waiter};
49pub use sync::{DefaultThreadSafety, ThreadSafety, ThreadUnsafe};
50pub use timer::Timer;
51
52#[cfg(feature = "thread_safe")]
53pub use sync::ThreadSafe;