fix lib.rs so that it builds on all three targeted platforms
This commit is contained in:
parent
303082bd6e
commit
f087efefe2
13
src/lib.rs
13
src/lib.rs
|
@ -1,12 +1,14 @@
|
||||||
mod win;
|
|
||||||
|
|
||||||
pub use win::*;
|
|
||||||
|
|
||||||
use std::ffi::c_void;
|
use std::ffi::c_void;
|
||||||
|
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
mod win;
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
pub use win::*;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
mod x11;
|
mod x11;
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
mod macos;
|
mod macos;
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
pub use macos::Window;
|
pub use macos::Window;
|
||||||
|
|
||||||
pub enum Parent {
|
pub enum Parent {
|
||||||
|
@ -24,6 +26,7 @@ pub struct WindowOpenOptions<'a> {
|
||||||
pub parent: Parent,
|
pub parent: Parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
pub fn run(options: WindowOpenOptions) {
|
pub fn run(options: WindowOpenOptions) {
|
||||||
x11::run(options);
|
x11::run(options);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue