Struct maa_framework::toolkit::MaaToolkit
source · pub struct MaaToolkit;Available on crate feature
toolkit only.Implementations§
source§impl MaaToolkit
impl MaaToolkit
pub 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_param_json: &str ) -> 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_param_json: &str ) -> 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.Trait Implementations§
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