Skip to main content

CustomControllerCallback

Trait CustomControllerCallback 

Source
pub trait CustomControllerCallback: Send + Sync {
Show 17 methods // Required method fn connect(&self) -> bool; // Provided methods fn connected(&self) -> bool { ... } fn request_uuid(&self) -> Option<String> { ... } fn get_features(&self) -> ControllerFeature { ... } fn start_app(&self, _intent: &str) -> bool { ... } fn stop_app(&self, _intent: &str) -> bool { ... } fn screencap(&self) -> Option<Vec<u8>> { ... } fn click(&self, _x: i32, _y: i32) -> bool { ... } fn swipe( &self, _x1: i32, _y1: i32, _x2: i32, _y2: i32, _duration: i32, ) -> bool { ... } fn touch_down( &self, _contact: i32, _x: i32, _y: i32, _pressure: i32, ) -> bool { ... } fn touch_move( &self, _contact: i32, _x: i32, _y: i32, _pressure: i32, ) -> bool { ... } fn touch_up(&self, _contact: i32) -> bool { ... } fn click_key(&self, _keycode: i32) -> bool { ... } fn input_text(&self, _text: &str) -> bool { ... } fn key_down(&self, _keycode: i32) -> bool { ... } fn key_up(&self, _keycode: i32) -> bool { ... } fn scroll(&self, _dx: i32, _dy: i32) -> bool { ... }
}
Expand description

Custom controller callback trait for implementing custom device control.

Required Methods§

Source

fn connect(&self) -> bool

Provided Methods§

Source

fn connected(&self) -> bool

Source

fn request_uuid(&self) -> Option<String>

Source

fn get_features(&self) -> ControllerFeature

Get the features supported by this controller.

Returns a combination of ControllerFeature flags.

Source

fn start_app(&self, _intent: &str) -> bool

Source

fn stop_app(&self, _intent: &str) -> bool

Source

fn screencap(&self) -> Option<Vec<u8>>

Returns PNG-encoded screenshot data.

Source

fn click(&self, _x: i32, _y: i32) -> bool

Source

fn swipe(&self, _x1: i32, _y1: i32, _x2: i32, _y2: i32, _duration: i32) -> bool

Source

fn touch_down(&self, _contact: i32, _x: i32, _y: i32, _pressure: i32) -> bool

Source

fn touch_move(&self, _contact: i32, _x: i32, _y: i32, _pressure: i32) -> bool

Source

fn touch_up(&self, _contact: i32) -> bool

Source

fn click_key(&self, _keycode: i32) -> bool

Source

fn input_text(&self, _text: &str) -> bool

Source

fn key_down(&self, _keycode: i32) -> bool

Source

fn key_up(&self, _keycode: i32) -> bool

Source

fn scroll(&self, _dx: i32, _dy: i32) -> bool

Implementors§