BlueGit

ict rusty-teams

Files

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

stub.rs

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