[−][src]Struct winvd::VirtualDesktopService
Provides the stateful helper to accessing the Windows 10 Virtual Desktop functions.
If you don't use other COM objects in your project, you have to use
VirtualDesktopService::create_with_com()
constructor.
Implementations
impl VirtualDesktopService
[src]
pub fn create_with_com() -> Result<VirtualDesktopService, Error>
[src]
Initialize service and COM apartment. If you don't use other COM API's, you have to use this initialization.
pub fn create() -> Result<VirtualDesktopService, Error>
[src]
Initialize only the service, must be-created on TaskbarCreated message
pub fn get_desktops(&self) -> Result<Vec<DesktopID>, Error>
[src]
Get desktops (GUID's)
pub fn get_desktop_count(&self) -> Result<u32, Error>
[src]
Get number of desktops
pub fn get_current_desktop(&self) -> Result<DesktopID, Error>
[src]
Get current desktop GUID
pub fn get_desktop_by_window(&self, hwnd: HWND) -> Result<DesktopID, Error>
[src]
Get window desktop ID
pub fn is_window_on_current_virtual_desktop(
&self,
hwnd: HWND
) -> Result<bool, Error>
[src]
&self,
hwnd: HWND
) -> Result<bool, Error>
Is window on current virtual desktop
pub fn is_window_on_desktop(
&self,
hwnd: HWND,
desktop: &DesktopID
) -> Result<bool, Error>
[src]
&self,
hwnd: HWND,
desktop: &DesktopID
) -> Result<bool, Error>
Is window on desktop
pub fn move_window_to_desktop(
&self,
hwnd: HWND,
desktop: &DesktopID
) -> Result<(), Error>
[src]
&self,
hwnd: HWND,
desktop: &DesktopID
) -> Result<(), Error>
Move window to desktop
pub fn go_to_desktop(&self, desktop: &DesktopID) -> Result<(), Error>
[src]
Go to desktop
pub fn is_pinned_window(&self, hwnd: HWND) -> Result<bool, Error>
[src]
Is window pinned?
pub fn pin_window(&self, hwnd: HWND) -> Result<(), Error>
[src]
Pin window
pub fn unpin_window(&self, hwnd: HWND) -> Result<(), Error>
[src]
Unpin window
pub fn on_desktop_change(&self, callback: Box<dyn Fn(DesktopID, DesktopID)>)
[src]
Callback for desktop change event, callback gets old desktop id, and new desktop id
pub fn on_desktop_created(&self, callback: Box<dyn Fn(DesktopID)>)
[src]
Callback for desktop creation, callback recieves new desktop id
pub fn on_desktop_destroyed(&self, callback: Box<dyn Fn(DesktopID)>)
[src]
Callback for on desktop destroy event, callback recieves old desktop id
pub fn on_window_change(&self, callback: Box<dyn Fn(HWND)>)
[src]
Callback for window changes, e.g. if window changes to different desktop, or window gets destroyed. Callback recieves HWND of thumbnail window (most likely top level window HWND).
Note This can be a very chatty callback, and may have some false positives.
Trait Implementations
impl Drop for VirtualDesktopService
[src]
Auto Trait Implementations
impl !RefUnwindSafe for VirtualDesktopService
impl !Send for VirtualDesktopService
impl !Sync for VirtualDesktopService
impl !Unpin for VirtualDesktopService
impl !UnwindSafe for VirtualDesktopService
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,