pub struct MaaToolkit;Available on crate feature
toolkit only.Implementations§
Source§impl MaaToolkit
impl MaaToolkit
Sourcepub fn new() -> MaaResult<Self>
👎Deprecated since 0.4.0: Use MaaToolkit::new_with_options instead
pub fn new() -> MaaResult<Self>
MaaToolkit::new_with_options insteadpub fn new_with_options<T: Serialize>( user_path: String, config: T, ) -> MaaResult<Self>
Sourcepub fn find_adb_device(&self) -> MaaResult<Vec<AdbDeviceInfo>>
Available on crate feature adb only.
pub fn find_adb_device(&self) -> MaaResult<Vec<AdbDeviceInfo>>
adb only.Sourcepub fn find_adb_device_with_adb(
&self,
adb_path: &str,
) -> MaaResult<Vec<AdbDeviceInfo>>
Available on crate feature adb only.
pub fn find_adb_device_with_adb( &self, adb_path: &str, ) -> MaaResult<Vec<AdbDeviceInfo>>
adb only.Find all the devices with a given adb path
§Errors
Return an error if fails to convert MaaStringView to String
pub fn register_custom_recognizer_executor<T>( &self, handle: MaaInstance<T>, recognizer_name: &str, recognizer_exec_path: &str, recognizer_exec_params: Vec<String>, ) -> MaaResult<()>
pub fn unregister_custom_recognizer_executor<T>( &self, handle: MaaInstance<T>, recognizer_name: &str, ) -> MaaResult<()>
pub fn register_custom_action_executor<T>( &self, handle: MaaInstance<T>, action_name: &str, action_exec_path: &str, action_exec_params: Vec<String>, ) -> MaaResult<()>
pub fn unregister_custom_action_executor<T>( &self, handle: MaaInstance<T>, action_name: &str, ) -> MaaResult<()>
Sourcepub fn find_win32_window(
&self,
class_name: &str,
window_name: &str,
find: bool,
) -> Vec<MaaWin32Hwnd>
Available on crate feature win32 only.
pub fn find_win32_window( &self, class_name: &str, window_name: &str, find: bool, ) -> Vec<MaaWin32Hwnd>
win32 only.Find all the windows with a given class name and window name
§Parameters
class_name: The class name of the windowwindow_name: The window name of the windowfind: If true, find the window using system win32 api, otherwise search the window with text match
pub fn get_cursor_window(&self) -> MaaWin32Hwnd
Available on crate feature
win32 only.pub fn get_desktop_window(&self) -> MaaWin32Hwnd
Available on crate feature
win32 only.pub fn get_foreground_window(&self) -> MaaWin32Hwnd
Available on crate feature
win32 only.pub fn list_windows(&self) -> Vec<MaaWin32Hwnd>
Available on crate feature
win32 only.Trait Implementations§
impl Send for MaaToolkit
impl Sync for MaaToolkit
Auto Trait Implementations§
impl Freeze for MaaToolkit
impl RefUnwindSafe for MaaToolkit
impl Unpin for MaaToolkit
impl UnwindSafe for MaaToolkit
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