Module tao::system_tray[][src]

Expand description

UNSTABLE – The SystemTray struct and associated types.

Use SystemTrayBuilder to create your tray instance.

ContextMenu is used to created a Window menu on Windows and Linux. On macOS it’s used in the menubar.

let mut tray_menu = ContextMenu::new();
let icon = include_bytes!("my_icon.png").to_vec();

tray_menu.add_item(MenuItemAttributes::new("My menu item"));

let mut system_tray = SystemTrayBuilder::new(icon, Some(tray_menu))
  .build(&event_loop)
  .unwrap();

Windows

The icon is not removed automatically.

Use SystemTrayExtWindows and use the remove() function when your application is closing.

Linux

A menu is required or the tray return an error containing assertion 'G_IS_DBUS_CONNECTION (connection)'.

Structs

Represents a System Tray instance.

Object that allows you to build SystemTray instance.