#[cfg(target_os = "windows")]
mod windows;
#[cfg(target_os = "windows")]
pub use windows::PlatformTray;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "macos")]
pub use macos::PlatformTray;
#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "linux")]
pub use linux::PlatformTray;
#[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))]
mod stub;
#[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))]
pub use stub::PlatformTray;
use crate::config::TrayConfig;
use crate::error::TrayResult;
use crate::event::TrayEvent;
use crate::icon::TrayIcon;
use crate::menu::Menu;
use tokio::sync::broadcast;
pub trait PlatformTrayOps: Send + Sync {
fn new(config: &TrayConfig, event_tx: broadcast::Sender<TrayEvent>) -> TrayResult<Self>
where
Self: Sized;
fn set_icon(&self, icon: &TrayIcon) -> TrayResult<()>;
fn set_tooltip(&self, tooltip: &str) -> TrayResult<()>;
fn set_menu(&self, menu: &Menu) -> TrayResult<()>;
fn destroy(&self) -> TrayResult<()>;
}