Struct tray_indicator::Tray

source ·
pub struct Tray { /* private fields */ }

Implementations§

source§

impl Tray

source

pub fn new(guid: u128, title: &str) -> Self

source

pub fn set_click<F: 'static + Fn()>(&mut self, action: F)

source

pub fn set_menu(&mut self, menu: Vec<MenuItem>)

source

pub fn display(self) -> Result<(), TrayError>

source

pub fn exit()

source

pub fn set_icon(&mut self, bytes: &[u8])

Trait Implementations§

source§

impl Tray for Tray

source§

fn id(&self) -> String

It’s a name that should be unique for this application and consistent between sessions, such as the application name itself.
source§

fn title(&self) -> String

It’s a name that describes the application, it can be more descriptive than Id.
source§

fn category(&self) -> Category

Describes the category of this item.
source§

fn activate(&mut self, _x: i32, _y: i32)

Asks the status notifier item for activation, this is typically a consequence of user input, such as mouse left click over the graphical representation of the item. The application will perform any task is considered appropriate as an activation request. Read more
source§

fn icon_pixmap(&self) -> Vec<Icon>

Carries an ARGB32 binary representation of the icon
source§

fn menu(&self) -> Vec<MenuItem<Self>>

The menu that you want to display
source§

fn watcher_offine(&self) -> bool

The org.kde.StatusNotifierWatcher is offine Read more
source§

fn secondary_activate(&mut self, _x: i32, _y: i32)

Is to be considered a secondary and less important form of activation compared to Activate. This is typically a consequence of user input, such as mouse middle click over the graphical representation of the item. The application will perform any task is considered appropriate as an activation request. Read more
source§

fn scroll(&mut self, _delta: i32, _dir: &str)

The user asked for a scroll action. This is caused from input such as mouse wheel over the graphical representation of the item. Read more
source§

fn status(&self) -> Status

Describes the status of this item or of the associated application.
source§

fn window_id(&self) -> i32

It’s the windowing-system dependent identifier for a window, the application can chose one of its windows to be available through this property or just set 0 if it’s not interested.
source§

fn icon_theme_path(&self) -> String

An additional path to add to the theme search path to find the icons.
source§

fn icon_name(&self) -> String

The item only support the context menu, the visualization should prefer showing the menu or sending ContextMenu() instead of Activate() The StatusNotifierItem can carry an icon that can be used by the visualization to identify the item.
source§

fn overlay_icon_name(&self) -> 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.
source§

fn overlay_icon_pixmap(&self) -> Vec<Icon>

ARGB32 binary representation of the overlay icon described in the previous paragraph.
source§

fn attention_icon_name(&self) -> String

The Freedesktop-compliant name of an icon. this can be used by the visualization to indicate that the item is in RequestingAttention state.
source§

fn attention_icon_pixmap(&self) -> Vec<Icon>

ARGB32 binary representation of the requesting attention icon describe in the previous paragraph.
source§

fn attention_movie_name(&self) -> 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 chose between the movie or AttentionIconPixmap (or using neither of those) at its discretion.
source§

fn tool_tip(&self) -> 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.
source§

fn text_direction(&self) -> TextDirection

Represents the way the text direction of the application. This allows the server to handle mismatches intelligently.
source§

fn watcher_online(&self)

The org.kde.StatusNotifierWatcher is online

Auto Trait Implementations§

§

impl Freeze for Tray

§

impl !RefUnwindSafe for Tray

§

impl !Send for Tray

§

impl !Sync for Tray

§

impl Unpin for Tray

§

impl !UnwindSafe for Tray

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.