BlueGit

ict rusty-teams

Files

rusty-teams / crates / app / src / notify / platform / mod.rs

mod.rs

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