| 1 | #[cfg(windows)] |
| 2 | mod windows_impl; |
| 3 | #[cfg(windows)] |
| 4 | pub use windows_impl::*; |
| 5 | |
| 6 | #[cfg(not(windows))] |
| 7 | mod stub; |
| 8 | #[cfg(not(windows))] |
| 9 | pub use stub::*; |
| 10 | |
| 11 | pub type NativeHandle = isize; |
| 12 | |
| 13 | #[derive(Debug, Clone, Copy, PartialEq)] |
| 14 | pub struct WorkArea { |
| 15 | pub left: i32, |
| 16 | pub top: i32, |
| 17 | pub right: i32, |
| 18 | pub bottom: i32, |
| 19 | pub scale: f32, |
| 20 | } |
| 21 | |
| 22 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
| 23 | pub struct ScreenRect { |
| 24 | pub left: i32, |
| 25 | pub top: i32, |
| 26 | pub right: i32, |
| 27 | pub bottom: i32, |
| 28 | } |
| 29 | |
| 30 | impl ScreenRect { |
| 31 | pub fn width(&self) -> i32 { |
| 32 | self.right - self.left |
| 33 | } |
| 34 | |
| 35 | pub fn height(&self) -> i32 { |
| 36 | self.bottom - self.top |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | #[derive(Debug, Clone, Copy, PartialEq)] |
| 41 | pub struct ShareGeometry { |
| 42 | pub target: ScreenRect, |
| 43 | pub work: WorkArea, |
| 44 | } |
| 45 | |
| 46 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
| 47 | pub enum TrayCommand { |
| 48 | Toggle, |
| 49 | Open, |
| 50 | ToggleSound, |
| 51 | ToggleDoNotDisturb, |
| 52 | Settings, |
| 53 | Quit, |
| 54 | } |