pub struct TrayItem {
pub id: String,
pub app_id: String,
pub title: String,
pub status: TrayStatus,
pub icon_name: String,
pub icon_pixmaps: Vec<IconPixels>,
pub attention_icon_name: String,
pub icon_theme_path: String,
pub tooltip: String,
pub item_is_menu: bool,
pub menu: String,
}Expand description
One app’s tray icon, as its StatusNotifierItem describes it.
Fields§
§id: StringUnique while the item is registered: its bus name and object path,
such as :1.42/StatusNotifierItem. The key to give
children_keyed, and what TrayHost::activate and the rest take.
app_id: StringThe app’s name for itself, such as nm-applet. Two copies of one
app share it.
title: StringA name for the item, such as Network.
status: TrayStatusWhether it wants to be seen.
icon_name: StringA freedesktop icon name, or empty.
icon_pixmaps: Vec<IconPixels>The icon as raw pixels, in each size the app sent, for an item with no icon name. Each side is at most 512 px.
attention_icon_name: StringThe icon name to show while it needs attention, or empty.
icon_theme_path: StringA directory where the app keeps its own icon files, or empty.
tooltip: StringThe tooltip’s title, or empty.
Whether the item offers only its menu, so a left click opens the
menu instead of calling TrayHost::activate.
Where its menu is on the bus, or empty for none. Open it with
TrayHost::open_menu.
Implementations§
Source§impl TrayItem
impl TrayItem
Sourcepub fn icon(&self, size: u32) -> Option<IconSource>
pub fn icon(&self, size: u32) -> Option<IconSource>
What to draw at size physical pixels, the icon’s logical size
times the output’s scale. That is the attention icon while the item
needs attention and has one, otherwise its icon name, as a file in
icon_theme_path if one is there. An app with an icon_theme_path
that lacks the file keeps its icons apart from the theme, so its
pixmaps, if it sent any, come before the name. With no name, it is
the pixmap closest to size. None when there is nothing to draw.
Trait Implementations§
impl StructuralPartialEq for TrayItem
Auto Trait Implementations§
impl !Send for TrayItem
impl !Sync for TrayItem
impl Forget for TrayItem
impl Freeze for TrayItem
impl Move for TrayItem
impl RefUnwindSafe for TrayItem
impl Unpin for TrayItem
impl UnsafeUnpin for TrayItem
impl UnwindSafe for TrayItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
Source§type NoneType = T
type NoneType = T
NoneValue::null_value produces.