winit_core/
lib.rs

1//! # Core types for Winit
2//!
3//! Platform-agnostic types and traits useful when implementing Winit backends,
4//! or otherwise interfacing with Winit from library code.
5//!
6//! See the [`winit`] crate for the full user-facing API.
7//!
8//! [`winit`]: https://docs.rs/winit
9
10#[macro_use]
11pub mod as_any;
12pub mod cursor;
13#[macro_use]
14pub mod error;
15pub mod application;
16pub mod event;
17pub mod event_loop;
18pub mod icon;
19pub mod keyboard;
20pub mod monitor;
21pub mod window;
22
23// `Instant` is not actually available on `wasm32-unknown-unknown`, the `std` implementation there
24// is a stub. And `wasm32-none` doesn't even have `std`. Instead, we use `web_time::Instant`.
25#[cfg(not(all(target_family = "wasm", any(target_os = "unknown", target_os = "none"))))]
26pub(crate) use std::time::Instant;
27
28#[cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none")))]
29pub(crate) use web_time::Instant;