#[cfg(not(target_os = "linux"))] use std::sync::Arc; #[cfg(not(target_os = "linux"))] use std::sync::atomic::AtomicBool; use gpui_kit::Window; use calling::ShareKind; #[cfg(not(target_os = "linux"))] use super::TrayCommand; use super::{NativeHandle, ScreenRect, ShareGeometry, WorkArea}; use crate::notify::badge::Badge; pub fn native_handle(_window: &Window) -> Option { None } pub fn prepare_toast_window(_handle: NativeHandle) {} pub fn set_activatable(_handle: NativeHandle, _activatable: bool) {} pub fn work_area(_handle: NativeHandle) -> Option { None } pub fn work_area_at(_x: i32, _y: i32) -> Option { None } pub fn place(_handle: NativeHandle, _x: i32, _y: i32, _width: i32, _height: i32) {} pub fn place_rect(_handle: NativeHandle, _x: i32, _y: i32, _width: i32, _height: i32) {} pub fn stack_group_above(_shared: NativeHandle, _group: &[NativeHandle]) {} pub fn show_window_inactive(_handle: NativeHandle) {} pub fn exclude_from_capture(_handle: NativeHandle) {} #[cfg(target_os = "linux")] pub fn make_window_click_through(window: &Window) { super::x11_input::make_input_transparent(window); } #[cfg(target_os = "linux")] pub fn window_transparency_available(window: &Window) -> bool { super::x11_input::window_transparency_available(window) } #[cfg(not(target_os = "linux"))] pub fn window_transparency_available(_window: &Window) -> bool { true } #[cfg(not(target_os = "linux"))] pub fn make_window_click_through(_window: &Window) {} #[cfg(target_os = "linux")] pub fn set_window_icon(window: &Window, png: &[u8]) { super::x11_input::set_window_icon(window, png); } #[cfg(not(target_os = "linux"))] pub fn set_window_icon(_window: &Window, _png: &[u8]) {} pub fn window_minimized(_handle: NativeHandle) -> bool { false } pub fn window_rect(_handle: NativeHandle) -> Option { None } pub fn share_geometry(_kind: ShareKind, _id: u64) -> Option { None } pub fn system_quiet() -> bool { #[cfg(target_os = "linux")] { super::notifications_inhibited() } #[cfg(not(target_os = "linux"))] { false } } pub fn restore_and_raise(_handle: NativeHandle) {} pub fn hide_window(_handle: NativeHandle) {} pub fn flash(_handle: NativeHandle) {} pub fn stop_flash(_handle: NativeHandle) {} pub fn set_badge(_handle: NativeHandle, _badge: Option<&Badge>) {} #[cfg(any(target_os = "linux", target_os = "macos"))] pub use super::linux_sound::{play_mp3, play_mp3_until, play_sound, set_sound_output}; #[cfg(not(any(target_os = "linux", target_os = "macos")))] pub fn play_sound() {} #[cfg(not(any(target_os = "linux", target_os = "macos")))] pub fn set_sound_output(_device_key: Option) {} #[cfg(not(any(target_os = "linux", target_os = "macos")))] pub fn play_mp3(_bytes: Vec) {} #[cfg(not(any(target_os = "linux", target_os = "macos")))] pub fn play_mp3_until(_bytes: Vec, _looped: bool, _stop: Arc) {} #[cfg(not(any(target_os = "linux", target_os = "macos")))] pub struct Tray; #[cfg(not(any(target_os = "linux", target_os = "macos")))] impl Tray { pub fn new(_presence: super::TrayPresence, _icon_png: &[u8]) -> Option { None } pub fn set_app_icon(&mut self, _icon_png: &[u8], _mention: bool) {} pub fn poll(&self) -> Vec { Vec::new() } pub fn sync(&self, _presence: super::TrayPresence) {} pub fn relocalize(&self) {} } pub fn animations_enabled() -> bool { true }