BlueGit

ict rusty-teams

Files

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

mod.rs

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