Struct libxdo::XDo [] [src]

pub struct XDo {
    // some fields omitted

An XDo instance


impl XDo

fn new(display: Option<&str>) -> Result<XDo, XDoCreationError>

Creates a new XDo instance.


display - An optional string display name, such as ":0". If None, uses the environment DISPLAY.


Returns a new XDo instance, or an XDoCreationError on error.

fn move_mouse(&self, x: i32, y: i32, screen: i32) -> OpResult

Moves the mouse to the specified position.

fn move_mouse_relative(&self, x: i32, y: i32) -> OpResult

Moves the mouse relative to the current position.

fn click(&self, button: i32) -> OpResult

Does a mouse click.

fn mouse_down(&self, button: i32) -> OpResult

Holds a mouse button down.

fn mouse_up(&self, button: i32) -> OpResult

Releases a mouse button.

fn enter_text(&self, text: &str, delay_microsecs: u32) -> OpResult

Types the specified text.

fn send_keysequence(&self, sequence: &str, delay_microsecs: u32) -> OpResult

Does the specified key sequence.

fn send_keysequence_up(&self, sequence: &str, delay_microsecs: u32) -> OpResult

Releases the specified key sequence.

fn send_keysequence_down(&self, sequence: &str, delay_microsecs: u32) -> OpResult

Presses the specified key sequence down.

Trait Implementations

impl Drop for XDo

fn drop(&mut self)