pub struct StatusNotifierItem {Show 16 fields
pub id: String,
pub category: Category,
pub title: Option<String>,
pub status: Status,
pub window_id: u32,
pub icon_theme_path: Option<String>,
pub icon_name: Option<String>,
pub icon_pixmap: Option<Vec<IconPixmap>>,
pub overlay_icon_name: Option<String>,
pub overlay_icon_pixmap: Option<Vec<IconPixmap>>,
pub attention_icon_name: Option<String>,
pub attention_icon_pixmap: Option<Vec<IconPixmap>>,
pub attention_movie_name: Option<String>,
pub tool_tip: Option<Tooltip>,
pub item_is_menu: bool,
pub menu: Option<String>,
}
Expand description
Represents an item to display inside the tray. https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem/
Fields§
§id: String
A name that should be unique for this application and consistent between sessions, such as the application name itself.
category: Category
The category of this item.
The allowed values for the Category property are:
ApplicationStatus
: The item describes the status of a generic application, for instance the current state of a media player. In the case where the category of the item can not be known, such as when the item is being proxied from another incompatible or emulated system,ApplicationStatus
can be used a sensible default fallback.Communications
: The item describes the status of communication oriented applications, like an instant messenger or an email client.SystemServices
: The item describes services of the system not seen as a stand alone application by the user, such as an indicator for the activity of a disk indexing service.Hardware
: The item describes the state and control of a particular hardware, such as an indicator of the battery charge or sound card volume control.
title: Option<String>
A name that describes the application, it can be more descriptive than Id.
status: Status
Describes the status of this item or of the associated application.
The allowed values for the Status property are:
- Passive: The item doesn’t convey important information to the user, it can be considered an “idle” status and is likely that visualizations will chose to hide it.
- Active: The item is active, is more important that the item will be shown in some way to the user.
NeedsAttention
: The item carries really important information for the user, such as battery charge running out and is wants to incentive the direct user intervention. Visualizations should emphasize in some way the items withNeedsAttention
status.
window_id: u32
The windowing-system dependent identifier for a window, the application can choose one of its windows to be available through this property or just set 0 if it’s not interested.
icon_theme_path: Option<String>
§icon_name: Option<String>
The StatusNotifierItem
can carry an icon that can be used by the visualization to identify the item.
An icon can either be identified by its Freedesktop-compliant icon name, carried by this property of by the icon data itself, carried by the property IconPixmap
.
Visualizations are encouraged to prefer icon names over icon pixmaps if both are available
(still not very defined: could be the pixmap used as fallback if an icon name is not found?)
icon_pixmap: Option<Vec<IconPixmap>>
Carries an ARGB32 binary representation of the icon, the format of icon data used in this specification is described in Section Icons
§Icons
All the icons can be transferred over the bus by a particular serialization of their data, capable of representing multiple resolutions of the same image or a brief aimation of images of the same size.
Icons are transferred in an array of raw image data structures of signature a(iiay) whith each one describing the width, height, and image data respectively. The data is represented in ARGB32 format and is in the network byte order, to make easy the communication over the network between little and big endian machines.
overlay_icon_name: Option<String>
The Freedesktop-compliant name of an icon. This can be used by the visualization to indicate extra state information, for instance as an overlay for the main icon.
overlay_icon_pixmap: Option<Vec<IconPixmap>>
ARGB32 binary representation of the overlay icon described in the previous paragraph.
attention_icon_name: Option<String>
The Freedesktop-compliant name of an icon. this can be used by the visualization to indicate that the item is in RequestingAttention
state.
attention_icon_pixmap: Option<Vec<IconPixmap>>
ARGB32 binary representation of the requesting attention icon describe in the previous paragraph.
attention_movie_name: Option<String>
An item can also specify an animation associated to the RequestingAttention
state.
This should be either a Freedesktop-compliant icon name or a full path.
The visualization can choose between the movie or AttentionIconPixmap
(or using neither of those) at its discretion.
tool_tip: Option<Tooltip>
Data structure that describes extra information associated to this item, that can be visualized for instance by a tooltip (or by any other mean the visualization consider appropriate.
The item only support the context menu, the visualization should prefer showing the menu or sending ContextMenu()
instead of Activate()
DBus
path to an object which should implement the com.canonical.dbusmenu
interface
Trait Implementations§
Source§impl Clone for StatusNotifierItem
impl Clone for StatusNotifierItem
Source§fn clone(&self) -> StatusNotifierItem
fn clone(&self) -> StatusNotifierItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more