pub trait TrayPlugin: DynamicUiHooks<SystemTray> {
// Provided methods
fn on_desktop_event(&self, _tray_ui: &Rc<SystemTray>, _event: &DesktopEvent) { ... }
fn on_current_desktop_changed(
&self,
_tray_ui: &Rc<SystemTray>,
_current_desktop_index: u32,
) { ... }
fn on_desktop_count_changed(
&self,
_tray_ui: &Rc<SystemTray>,
_new_desktop_count: u32,
) { ... }
fn on_menu_key_press(
&self,
_tray_ui: &Rc<SystemTray>,
_key_code: u32,
_menu_handle: isize,
) -> Option<MenuKeyPressEffect> { ... }
fn on_windows_mode_changed(&self, _tray_ui: &Rc<SystemTray>) { ... }
fn on_settings_changed(
&self,
_tray_ui: &Rc<SystemTray>,
_prev: &Arc<UiSettings>,
_new: &Arc<UiSettings>,
) { ... }
}
Expand description
A trait for Native GUI plugins for the system tray.
Provided Methods§
Sourcefn on_desktop_event(&self, _tray_ui: &Rc<SystemTray>, _event: &DesktopEvent)
fn on_desktop_event(&self, _tray_ui: &Rc<SystemTray>, _event: &DesktopEvent)
React to Virtual Desktop events.
fn on_current_desktop_changed( &self, _tray_ui: &Rc<SystemTray>, _current_desktop_index: u32, )
fn on_desktop_count_changed( &self, _tray_ui: &Rc<SystemTray>, _new_desktop_count: u32, )
Handle keyboard button press on tray context menu. The first return
value that is Some
will be used; if there is no such return value then
MenuKeyPressEffect::Ignore
will be used.
The provided menu_handle
is the currently select parent menu.