[][src]Struct winapi_easy::ui::Taskbar

pub struct Taskbar { /* fields omitted */ }

Taskbar functionality.

Methods

impl Taskbar[src]

pub fn new() -> Result<Self>[src]

pub fn set_progress_state(
    &mut self,
    window: &mut Window,
    state: ProgressState
) -> Result<()>
[src]

Sets the progress state taskbar animation of a window.

See also: Microsoft docs

Examples

Warning: On Windows 7 (and possibly newer versions as well), when changing the progress state too quickly, the change may be ignored. As a workaround, you can sleep for a short time:

use winapi_easy::ui::{
    ProgressState,
    Taskbar,
    Window,
};

use std::thread;
use std::time::Duration;

let mut window = Window::get_console_window().expect("Cannot get console window");
let mut taskbar = Taskbar::new()?;

taskbar.set_progress_state(&mut window, ProgressState::Indeterminate)?;
thread::sleep(Duration::from_millis(20));
taskbar.set_progress_state(&mut window, ProgressState::NoProgress)?;

pub fn set_progress_value(
    &mut self,
    window: &mut Window,
    completed: u64,
    total: u64
) -> Result<()>
[src]

Sets the completion amount of the taskbar progress state animation.

Auto Trait Implementations

impl !Send for Taskbar

impl !Sync for Taskbar

impl Unpin for Taskbar

impl UnwindSafe for Taskbar

impl RefUnwindSafe for Taskbar

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]