BlueGit

ict rusty-teams

Files

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

stub.rs

stub.rs 2.1 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(not(target_os = "linux"))]
43pub fn make_window_click_through(_window: &Window) {}
44
45pub fn window_minimized(_handle: NativeHandle) -> bool {
46 false
47}
48
49pub fn window_rect(_handle: NativeHandle) -> Option<ScreenRect> {
50 None
51}
52
53pub fn share_geometry(_kind: ShareKind, _id: u64) -> Option<ShareGeometry> {
54 None
55}
56
57pub fn system_quiet() -> bool {
58 false
59}
60
61pub fn restore_and_raise(_handle: NativeHandle) {}
62
63pub fn hide_window(_handle: NativeHandle) {}
64
65pub fn flash(_handle: NativeHandle) {}
66
67pub fn stop_flash(_handle: NativeHandle) {}
68
69pub fn set_badge(_handle: NativeHandle, _badge: Option<&Badge>) {}
70
71pub fn play_sound() {}
72
73pub fn play_mp3(_bytes: Vec<u8>) {}
74
75pub fn play_mp3_until(_bytes: Vec<u8>, _looped: bool, _stop: Arc<AtomicBool>) {}
76
77pub struct Tray;
78
79impl Tray {
80 pub fn new(_sound_on: bool, _do_not_disturb: bool) -> Option<Self> {
81 None
82 }
83
84 pub fn poll(&self) -> Vec<TrayCommand> {
85 Vec::new()
86 }
87
88 pub fn sync(&self, _sound_on: bool, _do_not_disturb: bool, _mention: bool) {}
89}
90
91pub fn animations_enabled() -> bool {
92 true
93}