Skip to main content

Module tray

Module tray 

Source
Expand description

System tray / menu-bar extra with a dynamic menu.

Donors: CodeRight os_shell/tray (menu rebuilt from a snapshot, typed actions back to the renderer, never a second authority), HeardRight tray.rs (state icons, left click opens the app, Quit runs the ordered shutdown first). HeardRight’s out-of-process macOS menu-bar helper (a workaround for a Control Center identity bug) is an app packaging choice and stays in HeardRight; this tray is the in-process item every other app uses.

Structs§

TrayHandle
Retain this handle to update one tray; ids & callbacks never use the shell’s primary tray.
TrayOptions
Options for an independently owned tray. Existing install & TraySpec are unchanged.
TrayRuntime
TraySpec
TrayUpdate

Enums§

LeftClick

Constants§

ID_QUIT
ID_SHOW
TRAY_ID

Functions§

install
install_with_options
Install an additional tray without replacing the shell tray. Menu events retain logical id & add trayId; on_menu also handles native actions without a renderer subscription. Call during setup/on the main thread. A duplicate tray id returns an error.
update

Type Aliases§

TrayMenuCallback