BlueGit

ict rusty-teams

Files

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

mod.rs

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