Skip to main content

start

Function start 

Source
pub fn start(
    paused: Arc<AtomicBool>,
    active_icon: Vec<IconPixmap>,
    paused_icon: Vec<IconPixmap>,
) -> Result<(TrayHandle, Receiver<TrayEvent>), TrayError>
Expand description

Start the tray. Returns a TrayHandle (the caller must hold it for the life of the daemon) and a receiver of menu activations.

paused is the shared pause flag; the tray reads it live and switches between active_icon and paused_icon to reflect it. Each icon is a list of pre-rasterized pixmaps the platform layer publishes as-is; the caller (the daemon) owns rasterization so this crate doesn’t have to drag in resvg/tiny-skia.

§Errors

See TrayError.