diff --git a/src/lib.rs b/src/lib.rs index aacc02a..16820da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,12 +1,14 @@ -mod win; - -pub use win::*; - use std::ffi::c_void; +#[cfg(target_os = "windows")] +mod win; +#[cfg(target_os = "windows")] +pub use win::*; +#[cfg(target_os = "linux")] mod x11; - +#[cfg(target_os = "macos")] mod macos; +#[cfg(target_os = "macos")] pub use macos::Window; pub enum Parent { @@ -24,6 +26,7 @@ pub struct WindowOpenOptions<'a> { pub parent: Parent, } +#[cfg(target_os = "linux")] pub fn run(options: WindowOpenOptions) { x11::run(options); }