2020-05-26 05:35:03 +10:00
|
|
|
mod win;
|
|
|
|
|
|
|
|
pub use win::*;
|
|
|
|
|
2020-05-26 04:04:48 +10:00
|
|
|
use std::ffi::c_void;
|
|
|
|
|
2020-05-26 05:35:33 +10:00
|
|
|
mod x11;
|
|
|
|
|
2020-05-26 07:14:42 +10:00
|
|
|
mod macos;
|
|
|
|
pub use macos::Window;
|
|
|
|
|
2020-05-26 04:04:48 +10:00
|
|
|
pub enum Parent {
|
|
|
|
None,
|
|
|
|
AsIfParented,
|
2020-05-26 05:35:03 +10:00
|
|
|
WithParent(*mut c_void),
|
2020-05-26 04:04:48 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct WindowOpenOptions<'a> {
|
|
|
|
pub title: &'a str,
|
|
|
|
|
|
|
|
pub width: usize,
|
|
|
|
pub height: usize,
|
|
|
|
|
2020-05-26 05:35:03 +10:00
|
|
|
pub parent: Parent,
|
2020-05-26 04:04:48 +10:00
|
|
|
}
|
2020-05-26 05:35:33 +10:00
|
|
|
|
|
|
|
pub fn run(options: WindowOpenOptions) {
|
|
|
|
x11::run(options);
|
2020-05-26 04:04:48 +10:00
|
|
|
}
|