Struct TaskbarInterface

Source
pub struct TaskbarInterface { /* private fields */ }

Implementations§

Source§

impl TaskbarInterface

Source

pub fn new(window: RawWindowHandle) -> Result<Self, Box<dyn Error>>

Source

pub fn unity_app_uri(self, uri: impl AsRef<str>) -> Result<Self, Box<dyn Error>>

Refer to set_unity_app_uri.

Source

pub fn set_unity_app_uri(&mut self, uri: impl AsRef<str>) -> Result<(), Error>

For the majority of the desktops that looks like had made an attempt to adopt the Unity launcher protocol for indicators, which is not great. Therefore will need to specific a “Unity app uri” for the said desktops that is a path to the .desktop file from where your application was called. This uri has the next format: application://$desktop_file_id so for example for Firefox it would be application://firefox.desktop.

Source

pub fn set_progress(&mut self, progress: f64) -> Result<(), Box<dyn Error>>

Changes the indicate progress proportion 0.0-1.0, as a note, this will set the progress indicator state to Normal if it is in NoProgress or Indeterminate.

Source

pub fn set_progress_state( &mut self, state: ProgressIndicatorState, ) -> Result<(), Box<dyn Error>>

Changes the progress indicator state.

Source

pub fn needs_attention( &mut self, needs_attention: bool, ) -> Result<(), Box<dyn Error>>

Hightlights the app in the taskbar. Doubt to platform limitations if this is enable on Windows and the app window is focused in then this will be disable automatically and you will need to enable it again.

Trait Implementations§

Auto Trait Implementations§

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>,

Source§

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>,

Source§

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.