Struct VirtualDevice

Source
pub struct VirtualDevice {
    pub sender: ChannelSender,
    /* private fields */
}

Fields§

§sender: ChannelSender

Implementations§

Source§

impl VirtualDevice

Source

pub fn default() -> Result<Self>

Source

pub fn send_to_channel( kind: u16, code: u16, value: i32, sender: &ChannelSender, ) -> EmptyResult

Source

pub fn send_press(button: Button, sender: &ChannelSender) -> EmptyResult

Source

pub fn send_release(button: Button, sender: &ChannelSender) -> EmptyResult

Source

pub fn send_click(button: Button, sender: &ChannelSender) -> EmptyResult

Source

pub fn send_mouse_move_x(x: Coord, sender: &ChannelSender) -> EmptyResult

Source

pub fn send_mouse_move_y(y: Coord, sender: &ChannelSender) -> EmptyResult

Source

pub fn send_mouse_move( x: Coord, y: Coord, sender: &ChannelSender, ) -> EmptyResult

Source

pub fn send_scroll_x(value: Coord, sender: &ChannelSender) -> EmptyResult

Source

pub fn send_scroll_y(value: Coord, sender: &ChannelSender) -> EmptyResult

Source

pub fn flush_channel_every_interval(self) -> JoinHandle<()>

Source

pub fn write_batch(&mut self, batch: &[EventParams]) -> EmptyResult

Source

pub fn synchronize(&mut self) -> EmptyResult

Source

pub fn move_mouse_raw_x(&mut self, x: Coord) -> EmptyResult

Source

pub fn move_mouse_raw_y(&mut self, y: Coord) -> EmptyResult

Source

pub fn move_mouse_raw(&mut self, x: Coord, y: Coord) -> EmptyResult

Source

pub fn buffered_move_mouse_x(&mut self, x: Coord) -> Vec<EventParams>

Source

pub fn buffered_move_mouse_y(&mut self, y: Coord) -> Vec<EventParams>

Source

pub fn buffered_move_mouse(&mut self, x: Coord, y: Coord) -> Vec<EventParams>

Source

pub fn gradual_move_mouse_raw(&mut self, x: Coord, y: Coord) -> Result<()>

Source

pub fn smooth_move_mouse(&mut self, x: Coord, y: Coord) -> Result<()>

Source

pub fn buffered_gradual_move_mouse( &mut self, x: Coord, y: Coord, ) -> Vec<EventParams>

Source

pub fn move_mouse_x(&mut self, x: Coord) -> EmptyResult

Source

pub fn move_mouse_y(&mut self, y: Coord) -> EmptyResult

Source

pub fn move_mouse(&mut self, x: Coord, y: Coord) -> EmptyResult

Source

pub fn scroll_raw_x(&mut self, value: Coord) -> EmptyResult

Source

pub fn scroll_raw_y(&mut self, value: Coord) -> EmptyResult

Source

pub fn buffered_scroll_x(&mut self, value: Coord) -> Vec<EventParams>

Source

pub fn buffered_scroll_y(&mut self, value: Coord) -> Vec<EventParams>

Source

pub fn scroll_x(&mut self, value: Coord) -> EmptyResult

Source

pub fn gradual_scroll_raw(&mut self, x: Coord, y: Coord) -> Result<()>

Source

pub fn smooth_scroll(&mut self, x: Coord, y: Coord) -> Result<()>

Source

pub fn buffered_gradual_scroll( &mut self, x: Coord, y: Coord, ) -> Vec<EventParams>

Source

pub fn scroll_y(&mut self, value: Coord) -> EmptyResult

Source

pub fn buffered_press(&mut self, button: Button) -> Vec<EventParams>

Source

pub fn buffered_release(&mut self, button: Button) -> Vec<EventParams>

Source

pub fn press(&mut self, button: Button) -> EmptyResult

Source

pub fn release(&mut self, button: Button) -> EmptyResult

Source

pub fn click(&mut self, button: Button) -> EmptyResult

Trait Implementations§

Source§

impl Drop for VirtualDevice

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.