pub struct TrayHost { /* private fields */ }Expand description
The tray, from cx.tray(). A clone is cheap and shares the one
connection.
Implementations§
Source§impl TrayHost
impl TrayHost
Sourcepub fn items(&self) -> ReadSignal<Vec<TrayItem>>
pub fn items(&self) -> ReadSignal<Vec<TrayItem>>
Every item, in the order they registered. Empty while there is no session bus. An item shows once its properties are read.
Sourcepub fn activate(&self, id: &str)
pub fn activate(&self, id: &str)
Tells item id it was clicked, as a left click does. A Wayland
client can’t know where on screen that was, so the item is told
(0, 0). A refusal or an unknown id is logged.
Sourcepub fn secondary_activate(&self, id: &str)
pub fn secondary_activate(&self, id: &str)
Tells item id it was middle-clicked, as for activate.
Sourcepub fn scroll(&self, id: &str, steps: i32)
pub fn scroll(&self, id: &str, steps: i32)
Tells item id the wheel turned steps, positive for up, as a
button’s on_scroll gives them.
The tray menu that is open, if any. One is open at a time: opening
another closes it. It is None from open_menu
until the app’s layout arrives, and follows the app’s changes while
it stays open.
Opens item id’s menu: tells the app, as a right click does, then
reads the layout into menu. An item with no menu, or
an unknown id, is logged.
Tells the open menu’s app that its submenu entry opens, as a
nested popup does. An app that fills submenus only then sends the
entries, and menu shows them.
Closes the open menu and stops following it.
Tells item id its menu entry entry was clicked. A refusal or an
unknown id is logged.