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§
Provided Methods§
fn connected(&self) -> bool
fn request_uuid(&self) -> Option<String>
Sourcefn get_features(&self) -> ControllerFeature
fn get_features(&self) -> ControllerFeature
Get the features supported by this controller.
Returns a combination of ControllerFeature flags.