mod accent;
mod browse;
pub mod hotkey;
mod icon;
mod marks;
#[cfg(any(target_os = "macos", test))]
mod menu_bar;
mod panel;
mod payload;
mod providers;
mod strip;
#[cfg(windows)]
mod host;
#[cfg(target_os = "macos")]
mod host_macos;
#[cfg(windows)]
mod startup;
#[cfg(target_os = "macos")]
#[path = "startup_macos.rs"]
mod startup;
#[cfg(windows)]
mod taskbar_theme;
#[cfg(windows)]
mod tui_launch;
#[cfg(target_os = "macos")]
#[path = "tui_launch_macos.rs"]
mod tui_launch;
mod update_flow;
mod scoop;
mod updates;
#[cfg_attr(not(windows), allow(dead_code))]
mod placement;
#[cfg_attr(not(windows), allow(dead_code))]
mod blur;
mod profile;
#[cfg_attr(not(any(windows, target_os = "macos")), allow(dead_code))]
mod style;
#[cfg_attr(not(any(windows, target_os = "macos")), allow(dead_code))]
mod options_menu;
pub use browse::http_url;
pub use icon::{Severity, tray_icon_rgba};
pub use payload::{POLL_INTERVAL, host_payload, worst_severity, wrap_report};
pub use strip::{
BARS_PIXEL_SIDE, StripContent, StripStyle, bars_rgba, content_from_payload, parse_strip_ipc,
};
pub(crate) const RELAUNCH_ENV: &str = "AIUB_TRAY_RELAUNCH";
pub(crate) fn now_ms() -> i64 {
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map(|d| d.as_millis() as i64)
.unwrap_or(0)
}
pub fn run() -> i32 {
#[cfg(windows)]
{
host::run()
}
#[cfg(target_os = "macos")]
{
host_macos::run()
}
#[cfg(not(any(windows, target_os = "macos")))]
{
eprintln!(
"ai-usagebar-tray is the Windows/macOS system-tray popover; it is not used on this OS."
);
1
}
}