BlueGit

ict rusty-teams

Files

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

mod.rs

mod.rs 935 B Download Raw
1#[cfg(windows)]
2mod windows_impl;
3#[cfg(windows)]
4pub use windows_impl::*;
5
6#[cfg(not(windows))]
7mod stub;
8#[cfg(not(windows))]
9pub use stub::*;
10
11pub type NativeHandle = isize;
12
13#[derive(Debug, Clone, Copy, PartialEq)]
14pub 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)]
23pub struct ScreenRect {
24 pub left: i32,
25 pub top: i32,
26 pub right: i32,
27 pub bottom: i32,
28}
29
30impl 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)]
41pub struct ShareGeometry {
42 pub target: ScreenRect,
43 pub work: WorkArea,
44}
45
46#[derive(Debug, Clone, Copy, PartialEq, Eq)]
47pub enum TrayCommand {
48 Toggle,
49 Open,
50 ToggleSound,
51 ToggleDoNotDisturb,
52 Settings,
53 Quit,
54}