BlueGit

ict rusty-teams

Files

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

stub.rs

stub.rs 2.2 KiB Download Raw
1use gpui_kit::Window;
2
3use calling::ShareKind;
4
5use super::{NativeHandle, ScreenRect, ShareGeometry, TrayCommand, WorkArea};
6use crate::notify::badge::Badge;
7use crate::notify::ring_tone::Ringtone;
8
9pub fn native_handle(_window: &Window) -> Option<NativeHandle> {
10 None
11}
12
13pub fn prepare_toast_window(_handle: NativeHandle) {}
14
15pub fn set_activatable(_handle: NativeHandle, _activatable: bool) {}
16
17pub fn work_area(_handle: NativeHandle) -> Option<WorkArea> {
18 None
19}
20
21pub fn work_area_at(_x: i32, _y: i32) -> Option<WorkArea> {
22 None
23}
24
25pub fn place(_handle: NativeHandle, _x: i32, _y: i32, _width: i32, _height: i32) {}
26
27pub fn place_above(
28 _handle: NativeHandle,
29 _shared: NativeHandle,
30 _x: i32,
31 _y: i32,
32 _width: i32,
33 _height: i32,
34) {
35}
36
37pub fn stack_above(_handle: NativeHandle, _shared: NativeHandle) {}
38
39pub fn show_window_inactive(_handle: NativeHandle) {}
40
41pub fn exclude_from_capture(_handle: NativeHandle) {}
42
43#[cfg(target_os = "linux")]
44pub fn make_window_click_through(window: &Window) {
45 super::x11_input::make_input_transparent(window);
46}
47
48#[cfg(not(target_os = "linux"))]
49pub fn make_window_click_through(_window: &Window) {}
50
51pub fn window_minimized(_handle: NativeHandle) -> bool {
52 false
53}
54
55pub fn window_rect(_handle: NativeHandle) -> Option<ScreenRect> {
56 None
57}
58
59pub fn share_geometry(_kind: ShareKind, _id: u64) -> Option<ShareGeometry> {
60 None
61}
62
63pub fn system_quiet() -> bool {
64 false
65}
66
67pub fn restore_and_raise(_handle: NativeHandle) {}
68
69pub fn hide_window(_handle: NativeHandle) {}
70
71pub fn flash(_handle: NativeHandle) {}
72
73pub fn stop_flash(_handle: NativeHandle) {}
74
75pub fn set_badge(_handle: NativeHandle, _badge: Option<&Badge>) {}
76
77pub fn play_sound() {}
78
79pub struct RingTone;
80
81pub fn start_ring(_ringtone: Ringtone) -> Option<RingTone> {
82 None
83}
84
85pub fn start_ringback() -> Option<RingTone> {
86 None
87}
88
89pub fn play_preview(_ringtone: Ringtone) {}
90
91pub struct Tray;
92
93impl Tray {
94 pub fn new(_sound_on: bool, _do_not_disturb: bool) -> Option<Self> {
95 None
96 }
97
98 pub fn poll(&self) -> Vec<TrayCommand> {
99 Vec::new()
100 }
101
102 pub fn sync(&self, _sound_on: bool, _do_not_disturb: bool, _mention: bool) {}
103}
104
105pub fn animations_enabled() -> bool {
106 true
107}