Struct tauri::SystemTrayHandle
source · [−]Expand description
A handle to a system tray. Allows updating the context menu items.
Implementations
sourceimpl<R: Runtime> SystemTrayHandle<R>
impl<R: Runtime> SystemTrayHandle<R>
sourcepub fn get_item(&self, id: MenuIdRef<'_>) -> SystemTrayMenuItemHandle<R>
pub fn get_item(&self, id: MenuIdRef<'_>) -> SystemTrayMenuItemHandle<R>
Gets a handle to the menu item that has the specified id
.
Updates the tray menu.
sourcepub fn set_icon_as_template(&self, is_template: bool) -> Result<()>
pub fn set_icon_as_template(&self, is_template: bool) -> Result<()>
Support macOS tray icon template to adjust automatically based on taskbar color.
Trait Implementations
sourceimpl<R: Runtime> Clone for SystemTrayHandle<R>
impl<R: Runtime> Clone for SystemTrayHandle<R>
Auto Trait Implementations
impl<R> RefUnwindSafe for SystemTrayHandle<R> where
<R as Runtime<EventLoopMessage>>::TrayHandler: RefUnwindSafe,
impl<R> Send for SystemTrayHandle<R>
impl<R> Sync for SystemTrayHandle<R>
impl<R> Unpin for SystemTrayHandle<R> where
<R as Runtime<EventLoopMessage>>::TrayHandler: Unpin,
impl<R> UnwindSafe for SystemTrayHandle<R> where
<R as Runtime<EventLoopMessage>>::TrayHandler: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more