pub struct Device { /* private fields */ }Expand description
Represents a handle to the virtual input device.
Implementations§
Source§impl Device
impl Device
Sourcepub fn call_mouse(&self, button: MouseButton, x: i8, y: i8, wheel: i8) -> bool
pub fn call_mouse(&self, button: MouseButton, x: i8, y: i8, wheel: i8) -> bool
Calls the device IOCTL.
§Arguments
button- The mouse button action to perform (e.g., left click, right click, release)x- Horizontal movement delta in pixels. Positive values move right, negative values move lefty- Vertical movement delta in pixels. Positive values move down, negative values move upwheel- Mouse wheel scroll delta. Positive values scroll up, negative values scroll down
§Returns
true if the IOCTL call was successful, false otherwise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl !Send for Device
impl !Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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