Document platform-specific modules
This commit is contained in:
parent
2900ecab93
commit
3218316420
1 changed files with 23 additions and 4 deletions
|
|
@ -1,6 +1,25 @@
|
|||
//! Contains traits with platform-specific methods in them.
|
||||
//! # Platform implementations
|
||||
//!
|
||||
//! Only the modules corresponding to the platform you're compiling to will be available.
|
||||
//! This module re-exports the platform-specific implementation crates that are used by default in
|
||||
//! Winit.
|
||||
//!
|
||||
//! Only the crates / modules corresponding to the platform you're compiling to will be available.
|
||||
//!
|
||||
//! | Platform | Crate | Module |
|
||||
//! | -------- | ----- | ------ |
|
||||
#, "/) | `winit::platform::android` |")]
|
||||
#, "/) | `winit::platform::macos` |")]
|
||||
#, "/) | `winit::platform::orbital` |")]
|
||||
#, "/) | `winit::platform::ios` |")]
|
||||
#, "/) | `winit::platform::wayland` |")]
|
||||
#, "/) | `winit::platform::web` |")]
|
||||
#, "/) | `winit::platform::windows` |")]
|
||||
#, "/) | `winit::platform::x11` |")]
|
||||
//! ## Common modules
|
||||
//!
|
||||
//! Furthermore, we provide two modules for common functionality:
|
||||
//! - `scancode`, available on Windows, macOS, Wayland and X11.
|
||||
//! - `startup_notify`, available on Wayland and X11.
|
||||
|
||||
#[cfg(android_platform)]
|
||||
pub use winit_android as android;
|
||||
|
|
@ -10,8 +29,6 @@ pub use winit_appkit as macos;
|
|||
pub use winit_orbital as orbital;
|
||||
#[cfg(ios_platform)]
|
||||
pub use winit_uikit as ios;
|
||||
#[cfg(any(x11_platform, wayland_platform))]
|
||||
pub mod startup_notify;
|
||||
#[cfg(wayland_platform)]
|
||||
pub use winit_wayland as wayland;
|
||||
#[cfg(web_platform)]
|
||||
|
|
@ -23,3 +40,5 @@ pub use winit_x11 as x11;
|
|||
|
||||
#[cfg(any(windows_platform, macos_platform, x11_platform, wayland_platform, docsrs))]
|
||||
pub mod scancode;
|
||||
#[cfg(any(x11_platform, wayland_platform, docsrs))]
|
||||
pub mod startup_notify;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue