pub struct TaskbarInterface { /* private fields */ }
Implementations§
Source§impl TaskbarInterface
impl TaskbarInterface
pub fn new(window: RawWindowHandle) -> Result<Self, Box<dyn Error>>
Sourcepub fn unity_app_uri(self, uri: impl AsRef<str>) -> Result<Self, Box<dyn Error>>
pub fn unity_app_uri(self, uri: impl AsRef<str>) -> Result<Self, Box<dyn Error>>
Refer to set_unity_app_uri
.
Sourcepub fn set_unity_app_uri(&mut self, uri: impl AsRef<str>) -> Result<(), Error>
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
.
Sourcepub fn set_progress(&mut self, progress: f64) -> Result<(), Box<dyn Error>>
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
.
Sourcepub fn set_progress_state(
&mut self,
state: ProgressIndicatorState,
) -> Result<(), Box<dyn Error>>
pub fn set_progress_state( &mut self, state: ProgressIndicatorState, ) -> Result<(), Box<dyn Error>>
Changes the progress indicator state.
Sourcepub fn needs_attention(
&mut self,
needs_attention: bool,
) -> Result<(), Box<dyn Error>>
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.