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§
fn connect(&mut self) -> bool
fn request_uuid(&mut self) -> Option<String>
Sourcefn request_resolution(&mut self) -> Option<(i32, i32)>
fn request_resolution(&mut self) -> Option<(i32, i32)>
Return value
(width, height)
fn start_app(&mut self, intent: String) -> bool
fn stop_app(&mut self, intent: String) -> bool
Sourcefn screencap(&mut self) -> Option<(i32, i32, i32, *mut c_void)>
fn screencap(&mut self) -> Option<(i32, i32, i32, *mut c_void)>
§Return value
(rows,cols,typ,data)