diff --git a/src/platform_impl/mod.rs b/src/platform_impl/mod.rs index a25fb3a209..3bfce6887e 100644 --- a/src/platform_impl/mod.rs +++ b/src/platform_impl/mod.rs @@ -1,27 +1,35 @@ use crate::monitor::{MonitorHandle as RootMonitorHandle, VideoModeHandle as RootVideoModeHandle}; use crate::window::Fullscreen as RootFullscreen; -#[cfg(windows_platform)] -#[path = "windows/mod.rs"] -mod platform; +#[cfg(android_platform)] +mod android; +#[cfg(ios_platform)] +mod ios; #[cfg(any(x11_platform, wayland_platform))] -#[path = "linux/mod.rs"] -mod platform; +mod linux; #[cfg(macos_platform)] -#[path = "macos/mod.rs"] -mod platform; +mod macos; +#[cfg(orbital_platform)] +mod orbital; +#[cfg(web_platform)] +mod web; +#[cfg(windows_platform)] +mod windows; + #[cfg(android_platform)] -#[path = "android/mod.rs"] -mod platform; +use android as platform; #[cfg(ios_platform)] -#[path = "ios/mod.rs"] -mod platform; -#[cfg(web_platform)] -#[path = "web/mod.rs"] -mod platform; +use ios as platform; +#[cfg(any(x11_platform, wayland_platform))] +use linux as platform; +#[cfg(macos_platform)] +use macos as platform; #[cfg(orbital_platform)] -#[path = "orbital/mod.rs"] -mod platform; +use orbital as platform; +#[cfg(web_platform)] +use web as platform; +#[cfg(windows_platform)] +use windows as platform; pub use self::platform::*; diff --git a/src/platform_impl/web/mod.rs b/src/platform_impl/web/mod.rs index 7b896b4c39..969d8bb188 100644 --- a/src/platform_impl/web/mod.rs +++ b/src/platform_impl/web/mod.rs @@ -28,11 +28,9 @@ mod event_loop; mod keyboard; mod main_thread; mod monitor; +mod web_sys; mod window; -#[path = "web_sys/mod.rs"] -mod backend; - pub use self::device::DeviceId; pub use self::error::OsError; pub(crate) use self::event_loop::{ @@ -43,6 +41,7 @@ pub use self::monitor::{MonitorHandle, VideoModeHandle}; pub use self::window::{PlatformSpecificWindowAttributes, Window, WindowId}; pub(crate) use self::keyboard::KeyEventExtra; +use self::web_sys as backend; pub(crate) use crate::icon::NoIcon as PlatformIcon; pub(crate) use crate::platform_impl::Fullscreen; pub(crate) use cursor::{