pub struct Taskbar { /* private fields */ }
Available on crate feature
ui
only.Expand description
Taskbar functionality.
Implementations§
Source§impl Taskbar
impl Taskbar
pub fn new() -> Result<Self>
Sourcepub fn set_progress_state(
&self,
window: &WindowHandle,
state: ProgressState,
) -> Result<()>
pub fn set_progress_state( &self, window: &WindowHandle, state: ProgressState, ) -> Result<()>
Sets the progress state taskbar animation of a window.
See also: Microsoft docs
§Examples
use winapi_easy::ui::{
ProgressState,
Taskbar,
WindowHandle,
};
use std::thread;
use std::time::Duration;
let window = WindowHandle::get_console_window().expect("Cannot get console window");
let taskbar = Taskbar::new()?;
taskbar.set_progress_state(&window, ProgressState::Indeterminate)?;
thread::sleep(Duration::from_millis(3000));
taskbar.set_progress_state(&window, ProgressState::NoProgress)?;
Sourcepub fn set_progress_value(
&self,
window: &WindowHandle,
completed: u64,
total: u64,
) -> Result<()>
pub fn set_progress_value( &self, window: &WindowHandle, completed: u64, total: u64, ) -> Result<()>
Sets the completion amount of the taskbar progress state animation.
Auto Trait Implementations§
impl Freeze for Taskbar
impl RefUnwindSafe for Taskbar
impl !Send for Taskbar
impl !Sync for Taskbar
impl Unpin for Taskbar
impl UnwindSafe for Taskbar
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
Mutably borrows from an owned value. Read more