pub struct MaaSyncContext { /* private fields */ }
Available on crate feature
sync_context
only.Implementations§
Source§impl MaaSyncContext
impl MaaSyncContext
pub fn run_task<T>(&self, task_name: &str, param: T) -> MaaResult<()>where
T: TaskParam,
pub fn run_recognizer<T>(
&self,
image: MaaImageBuffer,
task_name: &str,
task_param: T,
) -> MaaResult<(MaaRectBuffer, String)>where
T: TaskParam,
pub fn run_action<T>(
&self,
task_name: &str,
task_param: T,
cur_box: MaaRectBuffer,
cur_rec_detail: &str,
) -> MaaResult<()>where
T: TaskParam,
pub fn click(&self, x: i32, y: i32) -> MaaResult<()>
pub fn swipe( &self, x1: i32, y1: i32, x2: i32, y2: i32, duration: i32, ) -> MaaResult<()>
pub fn press_key(&self, keycode: i32) -> MaaResult<()>
pub fn input_text(&self, text: &str) -> MaaResult<()>
pub fn touch_down( &self, contact: i32, x: i32, y: i32, pressure: i32, ) -> MaaResult<()>
pub fn touch_move( &self, contact: i32, x: i32, y: i32, pressure: i32, ) -> MaaResult<()>
pub fn touch_up(&self, contact: i32) -> MaaResult<()>
pub fn screencap(&self) -> MaaResult<MaaImageBuffer>
pub fn cached_image(&self) -> MaaResult<MaaImageBuffer>
Trait Implementations§
Source§impl From<*mut MaaSyncContextAPI> for MaaSyncContext
impl From<*mut MaaSyncContextAPI> for MaaSyncContext
Source§fn from(handle: MaaSyncContextHandle) -> Self
fn from(handle: MaaSyncContextHandle) -> Self
Converts to this type from the input type.
impl Send for MaaSyncContext
impl Sync for MaaSyncContext
Auto Trait Implementations§
impl Freeze for MaaSyncContext
impl RefUnwindSafe for MaaSyncContext
impl Unpin for MaaSyncContext
impl UnwindSafe for MaaSyncContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more