#[cfg(windows)] mod windows_impl; #[cfg(windows)] pub use windows_impl::*; #[cfg(not(windows))] mod stub; #[cfg(target_os = "linux")] mod x11_input; #[cfg(not(windows))] pub use stub::*; pub type NativeHandle = isize; #[cfg_attr(not(windows), allow(dead_code))] mod stack_plan; #[derive(Debug, Clone, Copy, PartialEq)] pub struct WorkArea { pub left: i32, pub top: i32, pub right: i32, pub bottom: i32, pub scale: f32, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct ScreenRect { pub left: i32, pub top: i32, pub right: i32, pub bottom: i32, } impl ScreenRect { pub fn width(&self) -> i32 { self.right - self.left } pub fn height(&self) -> i32 { self.bottom - self.top } } #[derive(Debug, Clone, Copy, PartialEq)] pub struct ShareGeometry { pub target: ScreenRect, pub work: WorkArea, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum TrayCommand { Toggle, Open, ToggleSound, ToggleDoNotDisturb, Settings, Quit, }