pub struct Toolkit;Expand description
Toolkit utilities for device discovery and configuration.
Implementations§
Source§impl Toolkit
impl Toolkit
Sourcepub fn init_option(user_path: &str, default_config: &str) -> MaaResult<()>
pub fn init_option(user_path: &str, default_config: &str) -> MaaResult<()>
Initialize MAA framework options.
§Arguments
user_path- Path to user data directorydefault_config- Default configuration JSON string
Sourcepub fn find_adb_devices() -> MaaResult<Vec<AdbDevice>>
pub fn find_adb_devices() -> MaaResult<Vec<AdbDevice>>
Find connected ADB devices.
Scans for all known Android emulators and connected ADB devices.
§Returns
List of discovered ADB devices with their configurations.
Sourcepub fn find_desktop_windows() -> MaaResult<Vec<DesktopWindow>>
pub fn find_desktop_windows() -> MaaResult<Vec<DesktopWindow>>
Sourcepub fn macos_check_permission(permission: MacOSPermission) -> MaaResult<bool>
pub fn macos_check_permission(permission: MacOSPermission) -> MaaResult<bool>
Check whether the current process has the specified macOS permission.
Sourcepub fn macos_request_permission(permission: MacOSPermission) -> MaaResult<bool>
pub fn macos_request_permission(permission: MacOSPermission) -> MaaResult<bool>
Request the specified macOS permission from the system.
A successful return means the request API call succeeded. It does not necessarily mean the user has already granted the permission.
Sourcepub fn macos_reveal_permission_settings(
permission: MacOSPermission,
) -> MaaResult<bool>
pub fn macos_reveal_permission_settings( permission: MacOSPermission, ) -> MaaResult<bool>
Open the corresponding macOS settings page for the permission.
Sourcepub fn find_gamescope_instances() -> MaaResult<Vec<GamescopeInstance>>
pub fn find_gamescope_instances() -> MaaResult<Vec<GamescopeInstance>>
Find gamescope instances on the session.
Each instance bundles a display number, a PipeWire capture node and an
EIS socket. The pipewire_node_id / eis_socket_path can be passed to
crate::common::LinuxControllerConfig to capture and control a
gamescope window directly, without going through the ScreenCast portal.
Returns an empty list when gamescope is not running, and on non-Linux platforms (where the underlying C API returns no instances).