Trait MaaCustomController

Source
pub trait MaaCustomController {
Show 13 methods // Provided methods fn connect(&mut self) -> bool { ... } fn request_uuid(&mut self) -> Option<String> { ... } fn request_resolution(&mut self) -> Option<(i32, i32)> { ... } fn start_app(&mut self, intent: String) -> bool { ... } fn stop_app(&mut self, intent: String) -> bool { ... } fn screencap(&mut self) -> Option<(i32, i32, i32, *mut c_void)> { ... } fn click(&mut self, x: i32, y: i32) -> bool { ... } fn swipe( &mut self, x1: i32, y1: i32, x2: i32, y2: i32, duration: i32, ) -> bool { ... } fn touch_down( &mut self, contact: i32, x: i32, y: i32, pressure: i32, ) -> bool { ... } fn touch_move( &mut self, contact: i32, x: i32, y: i32, pressure: i32, ) -> bool { ... } fn touch_up(&mut self, contact: i32) -> bool { ... } fn press_key(&mut self, key: i32) -> bool { ... } fn input_text(&mut self, text: String) -> bool { ... }
}
Available on crate feature custom_controller only.

Provided Methods§

Source

fn connect(&mut self) -> bool

Source

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

Source

fn request_resolution(&mut self) -> Option<(i32, i32)>

Return value

(width, height)

Source

fn start_app(&mut self, intent: String) -> bool

Source

fn stop_app(&mut self, intent: String) -> bool

Source

fn screencap(&mut self) -> Option<(i32, i32, i32, *mut c_void)>

§Return value

(rows,cols,typ,data)

Source

fn click(&mut self, x: i32, y: i32) -> bool

Source

fn swipe(&mut self, x1: i32, y1: i32, x2: i32, y2: i32, duration: i32) -> bool

Source

fn touch_down(&mut self, contact: i32, x: i32, y: i32, pressure: i32) -> bool

Source

fn touch_move(&mut self, contact: i32, x: i32, y: i32, pressure: i32) -> bool

Source

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

Source

fn press_key(&mut self, key: i32) -> bool

Source

fn input_text(&mut self, text: String) -> bool

Implementors§