pub struct VdSymbols<'lib> {Show 22 fields
pub GetCurrentDesktopNumber: Result<Symbol<'lib, extern "C" fn() -> i32>, Error>,
pub GetDesktopCount: Result<Symbol<'lib, extern "C" fn() -> i32>, Error>,
pub GetDesktopIdByNumber: Result<Symbol<'lib, extern "C" fn(i32) -> GUID>, Error>,
pub GetDesktopNumberById: Result<Symbol<'lib, extern "C" fn(GUID) -> i32>, Error>,
pub GetWindowDesktopId: Result<Symbol<'lib, extern "C" fn(HWND) -> GUID>, Error>,
pub GetWindowDesktopNumber: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub IsWindowOnCurrentVirtualDesktop: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub MoveWindowToDesktopNumber: Result<Symbol<'lib, extern "C" fn(HWND, i32) -> i32>, Error>,
pub GoToDesktopNumber: Result<Symbol<'lib, extern "C" fn(i32) -> i32>, Error>,
pub SetDesktopName: Result<Symbol<'lib, unsafe extern "C" fn(i32, *const i8) -> i32>, Error>,
pub GetDesktopName: Result<Symbol<'lib, unsafe extern "C" fn(i32, *mut u8, usize) -> i32>, Error>,
pub RegisterPostMessageHook: Result<Symbol<'lib, unsafe extern "C" fn(HWND, u32) -> i32>, Error>,
pub UnregisterPostMessageHook: Result<Symbol<'lib, unsafe extern "C" fn(HWND) -> i32>, Error>,
pub IsPinnedWindow: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub PinWindow: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub UnPinWindow: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub IsPinnedApp: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub PinApp: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub UnPinApp: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>,
pub IsWindowOnDesktopNumber: Result<Symbol<'lib, extern "C" fn(HWND, i32) -> i32>, Error>,
pub CreateDesktop: Result<Symbol<'lib, extern "C" fn() -> i32>, Error>,
pub RemoveDesktop: Result<Symbol<'lib, extern "C" fn(i32, i32) -> i32>, Error>,
}
Fields§
§GetCurrentDesktopNumber: Result<Symbol<'lib, extern "C" fn() -> i32>, Error>
§GetDesktopCount: Result<Symbol<'lib, extern "C" fn() -> i32>, Error>
§GetDesktopIdByNumber: Result<Symbol<'lib, extern "C" fn(i32) -> GUID>, Error>
§GetDesktopNumberById: Result<Symbol<'lib, extern "C" fn(GUID) -> i32>, Error>
§GetWindowDesktopId: Result<Symbol<'lib, extern "C" fn(HWND) -> GUID>, Error>
§GetWindowDesktopNumber: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§IsWindowOnCurrentVirtualDesktop: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§MoveWindowToDesktopNumber: Result<Symbol<'lib, extern "C" fn(HWND, i32) -> i32>, Error>
§GoToDesktopNumber: Result<Symbol<'lib, extern "C" fn(i32) -> i32>, Error>
§SetDesktopName: Result<Symbol<'lib, unsafe extern "C" fn(i32, *const i8) -> i32>, Error>
§GetDesktopName: Result<Symbol<'lib, unsafe extern "C" fn(i32, *mut u8, usize) -> i32>, Error>
§RegisterPostMessageHook: Result<Symbol<'lib, unsafe extern "C" fn(HWND, u32) -> i32>, Error>
§UnregisterPostMessageHook: Result<Symbol<'lib, unsafe extern "C" fn(HWND) -> i32>, Error>
§IsPinnedWindow: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§PinWindow: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§UnPinWindow: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§IsPinnedApp: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§PinApp: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§UnPinApp: Result<Symbol<'lib, extern "C" fn(HWND) -> i32>, Error>
§IsWindowOnDesktopNumber: Result<Symbol<'lib, extern "C" fn(HWND, i32) -> i32>, Error>
§CreateDesktop: Result<Symbol<'lib, extern "C" fn() -> i32>, Error>
§RemoveDesktop: Result<Symbol<'lib, extern "C" fn(i32, i32) -> i32>, Error>
Implementations§
Source§impl<'lib> VdSymbols<'lib>
impl<'lib> VdSymbols<'lib>
Sourcepub unsafe fn new(lib: &'lib Library) -> Self
pub unsafe fn new(lib: &'lib Library) -> Self
Load symbols from the specified library.
§Safety
The symbol names must have the correct function signatures.
pub fn ensure_required_methods_exists(&self) -> Result<(), DynamicError>
Sourcepub fn GetCurrentDesktopNumber(&self) -> Result<i32, DynamicError>
pub fn GetCurrentDesktopNumber(&self) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn GetDesktopCount(&self) -> Result<i32, DynamicError>
pub fn GetDesktopCount(&self) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn GetDesktopIdByNumber(&self, number: i32) -> Result<GUID, DynamicError>
pub fn GetDesktopIdByNumber(&self, number: i32) -> Result<GUID, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn GetDesktopNumberById(
&self,
desktop_id: GUID,
) -> Result<i32, DynamicError>
pub fn GetDesktopNumberById( &self, desktop_id: GUID, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn GetWindowDesktopId(&self, hwnd: HWND) -> Result<GUID, DynamicError>
pub fn GetWindowDesktopId(&self, hwnd: HWND) -> Result<GUID, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn GetWindowDesktopNumber(&self, hwnd: HWND) -> Result<i32, DynamicError>
pub fn GetWindowDesktopNumber(&self, hwnd: HWND) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn IsWindowOnCurrentVirtualDesktop(
&self,
hwnd: HWND,
) -> Result<i32, DynamicError>
pub fn IsWindowOnCurrentVirtualDesktop( &self, hwnd: HWND, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn MoveWindowToDesktopNumber(
&self,
hwnd: HWND,
desktop_number: i32,
) -> Result<i32, DynamicError>
pub fn MoveWindowToDesktopNumber( &self, hwnd: HWND, desktop_number: i32, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn GoToDesktopNumber(
&self,
desktop_number: i32,
) -> Result<i32, DynamicError>
pub fn GoToDesktopNumber( &self, desktop_number: i32, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub unsafe fn SetDesktopName(
&self,
desktop_number: i32,
in_name_ptr: *const i8,
) -> Result<i32, DynamicError>
pub unsafe fn SetDesktopName( &self, desktop_number: i32, in_name_ptr: *const i8, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub unsafe fn GetDesktopName(
&self,
desktop_number: i32,
out_utf8_ptr: *mut u8,
out_utf8_len: usize,
) -> Result<i32, DynamicError>
pub unsafe fn GetDesktopName( &self, desktop_number: i32, out_utf8_ptr: *mut u8, out_utf8_len: usize, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub unsafe fn RegisterPostMessageHook(
&self,
listener_hwnd: HWND,
message_offset: u32,
) -> Result<i32, DynamicError>
pub unsafe fn RegisterPostMessageHook( &self, listener_hwnd: HWND, message_offset: u32, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub unsafe fn UnregisterPostMessageHook(
&self,
listener_hwnd: HWND,
) -> Result<i32, DynamicError>
pub unsafe fn UnregisterPostMessageHook( &self, listener_hwnd: HWND, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn IsPinnedWindow(&self, hwnd: HWND) -> Result<i32, DynamicError>
pub fn IsPinnedWindow(&self, hwnd: HWND) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn PinWindow(&self, hwnd: HWND) -> Result<i32, DynamicError>
pub fn PinWindow(&self, hwnd: HWND) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn UnPinWindow(&self, hwnd: HWND) -> Result<i32, DynamicError>
pub fn UnPinWindow(&self, hwnd: HWND) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn IsPinnedApp(&self, hwnd: HWND) -> Result<i32, DynamicError>
pub fn IsPinnedApp(&self, hwnd: HWND) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn PinApp(&self, hwnd: HWND) -> Result<i32, DynamicError>
pub fn PinApp(&self, hwnd: HWND) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn UnPinApp(&self, hwnd: HWND) -> Result<i32, DynamicError>
pub fn UnPinApp(&self, hwnd: HWND) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn IsWindowOnDesktopNumber(
&self,
hwnd: HWND,
desktop_number: i32,
) -> Result<i32, DynamicError>
pub fn IsWindowOnDesktopNumber( &self, hwnd: HWND, desktop_number: i32, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn CreateDesktop(&self) -> Result<i32, DynamicError>
pub fn CreateDesktop(&self) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Sourcepub fn RemoveDesktop(
&self,
remove_desktop_number: i32,
fallback_desktop_number: i32,
) -> Result<i32, DynamicError>
pub fn RemoveDesktop( &self, remove_desktop_number: i32, fallback_desktop_number: i32, ) -> Result<i32, DynamicError>
Call the specified function in the dynamic library.
§Safety
Depends on the function. Likely any pointers must be valid.
Auto Trait Implementations§
impl<'lib> Freeze for VdSymbols<'lib>
impl<'lib> !RefUnwindSafe for VdSymbols<'lib>
impl<'lib> Send for VdSymbols<'lib>
impl<'lib> Sync for VdSymbols<'lib>
impl<'lib> Unpin for VdSymbols<'lib>
impl<'lib> !UnwindSafe for VdSymbols<'lib>
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.