Overview of Wrapper (v4.2.0) and Api (v4.2.3)
Enums
Tip
If the name of an Enum ends in the plural, it means that the Enum, with FlagsAttribute, can contain more than one kind of information through "bitwise OR" operation.
- Enum Type
Wrapper | MaaDef |
---|---|
MaaJobStatus | MaaStatusEnum |
LoggingLevel | MaaLoggingLevelEnum |
GlobalOption | MaaGlobalOptionEnum |
ResourceOption | MaaResOptionEnum |
InferenceDevice | MaaInferenceDeviceEnum |
InferenceExecutionProvider | MaaInferenceExecutionProviderEnum |
ControllerOption | MaaCtrlOptionEnum |
TaskerOption | MaaTaskerOptionEnum |
- Macro Definition
Wrapper | MaaDef |
---|---|
AdbScreencapMethods | MaaAdbScreencapMethod |
AdbInputMethods | MaaAdbInputMethod |
Win32ScreencapMethod | MaaWin32ScreencapMethod |
Win32InputMethod | MaaWin32InputMethod |
DbgControllerType | MaaDbgControllerType |
MaaTaskJob : MaaJob
Wrapper | Native API |
---|---|
MaaJob.Id | The MaaId. |
MaaJob.Status | MaaControllerStatus MaaResourceStatus MaaTaskerStatus |
MaaJob.Wait() MaaTaskJob.WaitFor() |
MaaControllerWait MaaResourceWait MaaTaskerWait |
MaaTaskJob.Tasker | A property used to simplify design of TaskDetail.Query |
IMaaCommon
Derived:
- IMaaController
- IMaaResource
- IMaaTasker
- IMaaToolkit.PI
Wrapper | MaaDef |
---|---|
IMaaCommon.Callback | Occurs when MaaFramework calls back. |
IMaaDisposableHandle : IMaaDisposable : IDisposable
IMaaDisposable Derived:
- IMaaDisposableHandle
- IMaaAgentClient
- IMaaController
- IMaaResource
- IMaaTasker
- IMaaRectBuffer
- IMaaImageBuffer
- IMaaStringBuffer
- IMaaListBuffer
- MaaStringListBuffer
- AdbDeviceListBuffer
- DesktopWindowListBuffer
- MaaImageListBuffer
- MaaImage
Wrapper | MaaDef |
---|---|
IDisposable.Dispose() | Destroys the unmanaged resources. |
IMaaDisposable.IsInvalid | Indicates whether the unmanaged resources from MaaFramework are invalid. |
IMaaDisposable.ThrowOnInvalid | Indicates whether an exception is thrown when current resources are invalid but still called. |
IMaaDisposable.IsStateless | Indicates whether the current instance is stateless. |
IMaaDisposableHandle.Handle | The unmanaged resource handle. |
IMaaDisposableHandle.SetHandleAsInvalid() | Marks a handle as no longer available. If you are not sure when to call it, please use IDisposable.Dispose() instead. |
MaaController : IMaaController
Wrapper | Native API |
---|---|
MaaAdbController.ctor() | MaaAdbControllerCreate |
MaaWin32Controller.ctor() | MaaWin32ControllerCreate |
MaaCustomController.ctor() | MaaCustomControllerCreate |
MaaDbgController.ctor() | MaaDbgControllerCreate |
IDisposable.Dispose() | MaaControllerDestroy |
IMaaOption.SetOption() | MaaControllerSetOption |
IMaaController.LinkStart() | MaaControllerPostConnection |
IMaaController.Click() | MaaControllerPostClick |
IMaaController.Swipe() | MaaControllerPostSwipe |
IMaaController.PressKey() | MaaControllerPostPressKey |
IMaaController.InputText() | MaaControllerPostInputText |
IMaaController.StartApp() | MaaControllerPostStartApp |
IMaaController.StopApp() | MaaControllerPostStopApp |
IMaaController.TouchDown() | MaaControllerPostTouchDown |
IMaaController.TouchMove() | MaaControllerPostTouchMove |
IMaaController.TouchUp() | MaaControllerPostTouchUp |
IMaaController.Screencap() | MaaControllerPostScreencap |
IMaaPost.GetStatus() | MaaControllerStatus |
IMaaPost.Wait() | MaaControllerWait |
IMaaController.LinkStop() | MaaControllerConnected |
IMaaController.GetCachedImage() | MaaControllerCachedImage |
IMaaController.Uuid | MaaControllerGetUuid |
IMaaDisposableHandle.Handle | The MaaControllerHandle. |
MaaTasker : IMaaTasker
Wrapper | Native API |
---|---|
MaaTasker.ctor() | MaaTaskerCreate |
IDisposable.Dispose() | MaaTaskerDestroy |
IMaaOption.SetOption() | MaaTaskerSetOption |
IMaaTasker.Resource | MaaTaskerBindResource MaaTaskerGetResource |
IMaaTasker.Controller | MaaTaskerBindController MaaTaskerGetController |
IMaaTasker.Toolkit | Easy to call Toolkit. |
IMaaTasker.Utility | Easy to call Utility. |
IMaaTasker.IsInitialized | MaaTaskerInited |
IMaaTasker.AppendTask() | MaaTaskerPostTask |
IMaaPost.GetStatus() | MaaTaskerStatus |
IMaaPost.Wait() | MaaTaskerWait |
IMaaTasker.IsRunning | MaaTaskerRunning |
IMaaTasker.Stop() | MaaTaskerPostStop |
IMaaTasker.IsStopping | MaaTaskerStopping |
IMaaTasker.ClearCache() | MaaTaskerClearCache |
IMaaTasker.GetRecognitionDetail() RecognitionDetail.Query() NodeDetail.QueryRecognitionDetail() TaskDetail.QueryRecognitionDetail() MaaTaskJob.QueryRecognitionDetail() |
MaaTaskerGetRecognitionDetail |
IMaaTasker.GetNodeDetail() NodeDetail.Query() TaskDetail.QueryNodeDetail() MaaTaskJob.QueryNodeDetail() |
MaaTaskerGetNodeDetail |
IMaaTasker.GetTaskDetail() TaskDetail.Query() MaaTaskJob.QueryTaskDetail() |
MaaTaskerGetTaskDetail |
IMaaTasker.GetLatestNode() NodeDetail.QueryLatest() |
MaaTaskerGetLatestNode |
IMaaTasker.DisposeOptions | Disposes the Resource or the Controller when Dispose() was invoked. |
IMaaDisposableHandle.Handle | The MaaInstanceHandle. |
MaaResource : IMaaResource
Wrapper | Native API |
---|---|
MaaResource.ctor() | MaaResourceCreate |
IDisposable.Dispose() | MaaResourceDestroy |
IMaaResource.Register() | MaaResourceRegisterCustomRecognition MaaResourceRegisterCustomAction |
IMaaResource.Unregister() | MaaResourceUnregisterCustomRecognition MaaResourceUnregisterCustomAction |
IMaaResource.Clear() | MaaResourceClearCustomRecognition MaaResourceClearCustomAction MaaResourceClear |
IMaaResource.AppendBundle() | MaaResourcePostBundle |
IMaaResource.OverridePipeline() | MaaResourceOverridePipeline |
IMaaResource.OverrideNext() | MaaResourceOverrideNext |
IMaaPost.GetStatus() | MaaResourceStatus |
IMaaPost.Wait() | MaaResourceWait |
IMaaResource.IsLoaded | MaaResourceLoaded |
IMaaOption.SetOption() | MaaResourceSetOption |
IMaaResource.Hash | MaaResourceGetHash |
IMaaResource.NodeList | MaaResourceGetNodeList |
IMaaDisposableHandle.Handle | The MaaResourceHandle. |
MaaContext : IMaaContext
Wrapper | Native API |
---|---|
IMaaContext.Handle | The MaaContextHandle. |
IMaaContext.RunTask() | MaaContextRunTask |
IMaaContext.RunRecognition() | MaaContextRunRecognition |
IMaaContext.RunAction() | MaaContextRunAction |
IMaaContext.OverridePipeline() | MaaContextOverridePipeline |
IMaaContext.OverrideNext() | MaaContextOverrideNext |
IMaaContext.TaskJob | MaaContextGetTaskId |
IMaaContext.Tasker | MaaContextGetTasker |
IMaaContext.Clone() ICloneable.Clone() |
MaaContextClone |
Buffers.MaaStringBuffer : Buffers.IMaaStringBuffer
Wrapper | Native API |
---|---|
MaaStringBuffer.ctor() | MaaStringBufferCreate |
IDisposable.Dispose() | MaaStringBufferDestroy |
IMaaStringBuffer.IsEmpty | MaaStringBufferIsEmpty |
IMaaStringBuffer.TryClear() | MaaStringBufferClear |
IMaaStringBuffer.TryGetValue() MaaStringBuffer.TryGetValue() object.ToString() |
MaaStringBufferGet |
IMaaStringBuffer.Size | MaaStringBufferSize |
IMaaStringBuffer.TrySetValue() MaaStringBuffer.TrySetValue() |
MaaStringBufferSet MaaStringBufferSetEx |
IMaaBuffer.TryCopyTo() | Optimization method for copying the same type of buffer. |
IMaaDisposableHandle.Handle | The MaaStringBufferHandle. |
Buffers.MaaStringListBuffer : Buffers.MaaListBuffer : Buffers.IMaaListBuffer
Tip
Be aware that the underlying implementation of MaaListBuffer
stores the values of the Buffer in a fixed, contiguous memory space, rather than storing the references of the Buffer.
Wrapper | Native API |
---|---|
MaaStringListBuffer.ctor() | MaaStringListBufferCreate |
IDisposable.Dispose() | MaaStringListBufferDestroy |
IMaaListBuffer.IsEmpty | MaaStringListBufferIsEmpty |
IMaaListBuffer.MaaSizeCount ICollection<>.Count |
MaaStringListBufferSize |
IMaaListBuffer.this[] IMaaListBuffer.TryIndexOf() IMaaBuffer.TryCopyTo() IList<>.this[] IList<>.IndexOf() ICollection<>.Contains() ICollection<>.CopyTo() ICollection<>.Remove() |
MaaStringListBufferAt |
IMaaListBuffer.TryAdd() IMaaBuffer.TryCopyTo() ICollection<>.Add() ICollection<>.CopyTo() |
MaaStringListBufferAppend |
IMaaListBuffer.TryRemoveAt() IList<>.RemoveAt() ICollection<>.Remove() |
MaaStringListBufferRemove |
IMaaListBuffer.TryClear() ICollection<>.Clear() |
MaaStringListBufferClear |
ICollection<>.IsReadOnly | false |
IEnumerable<>.GetEnumerator() IEnumerable.GetEnumerator() |
Implemented by class Buffers.MaaListEnumerator |
IMaaDisposableHandle.Handle | The MaaStringListBufferHandle. |
MaaStringListBuffer.TryGetList() MaaStringListBuffer.TrySetList() |
Static utility methods used to avoid creating instances of the class. |
Buffers.MaaImageBuffer : Buffers.IMaaImageBuffer
Tip
We designed a tool record MaaFramework.Binding.MaaImage
, for quickly loading external images, as well as in RecognitionDetail.
Wrapper | Native API |
---|---|
MaaImageBuffer.ctor() | MaaImageBufferCreate |
IDisposable.Dispose() | MaaImageBufferDestroy |
IMaaImageBuffer.IsEmpty | MaaImageBufferIsEmpty |
IMaaImageBuffer.TryClear() | MaaImageBufferClear |
MaaImageBuffer.TryGetRawData() | MaaImageBufferGetRawData |
MaaImageBuffer.TrySetRawData() | MaaImageBufferSetRawData |
IMaaImageBuffer.GetInfo() MaaImageBuffer.Width MaaImageBuffer.Height MaaImageBuffer.Channels MaaImageBuffer.Type |
MaaImageBufferWidth MaaImageBufferHeight MaaImageBufferChannels MaaImageBufferType |
IMaaImageBuffer.TryGetEncodedData() MaaImageBuffer.TryGetEncodedData() |
MaaImageBufferGetEncoded MaaImageBufferGetEncodedSize |
IMaaImageBuffer.TrySetEncodedData() MaaImageBuffer.TrySetEncodedData() |
MaaImageBufferSetEncoded |
IMaaBuffer.TryCopyTo() | Optimization method for copying the same type of buffer. |
IMaaDisposableHandle.Handle | The MaaImageBufferHandle. |
Buffers.MaaImageListBuffer : Buffers.MaaListBuffer : Buffers.IMaaListBuffer
Tip
Be aware that the underlying implementation of MaaListBuffer
stores the values of the Buffer in a fixed, contiguous memory space, rather than storing the references of the Buffer.
Important
Please note that after using the Clear
, Remove
, or Dispose
methods, all (or part, if using Remove
) MaaImageBuffer
instances will become unavailable.
This is because the image types in CSharp have different implementations depending on the chosen framework. Therefore, MaaImageListBuffer
is based on MaaImageBuffer
and borrows the memory space from MaaFramework
.
This means that the CSharp Binding violates the design principles of MaaFramework Binding, but it avoids additional space and time consumption.
Wrapper | Native API |
---|---|
MaaImageListBuffer.ctor() | MaaImageListBufferCreate |
IDisposable.Dispose() | MaaImageListBufferDestroy |
IMaaListBuffer.IsEmpty | MaaImageListBufferIsEmpty |
IMaaListBuffer.MaaSizeCount ICollection<>.Count |
MaaImageListBufferSize |
IMaaListBuffer.this[] IMaaListBuffer.TryIndexOf() IMaaBuffer.TryCopyTo() IList<>.this[] IList<>.IndexOf() ICollection<>.Contains() ICollection<>.CopyTo() ICollection<>.Remove() |
MaaImageListBufferAt |
IMaaListBuffer.TryAdd() IMaaBuffer.TryCopyTo() ICollection<>.Add() ICollection<>.CopyTo() |
MaaImageListBufferAppend |
IMaaListBuffer.TryRemoveAt() IList<>.RemoveAt() ICollection<>.Remove() |
MaaImageListBufferRemove |
IMaaListBuffer.TryClear() ICollection<>.Clear() |
MaaImageListBufferClear |
ICollection<>.IsReadOnly | false |
IEnumerable<>.GetEnumerator() IEnumerable.GetEnumerator() |
Implemented by class Buffers.MaaListEnumerator |
IMaaDisposableHandle.Handle | The MaaImageListBufferHandle. |
MaaImageListBuffer.TryGetEncodedDataList() MaaImageListBuffer.TryGetEncodedDataList() |
Static utility methods used to avoid creating instances of the class. |
Buffers.MaaRectBuffer : Buffers.IMaaRectBuffer
Wrapper | Native API |
---|---|
MaaRectBuffer.ctor() | MaaRectCreate |
IDisposable.Dispose() | MaaRectDestroy |
IMaaRectBuffer.X IMaaRectBuffer.Y IMaaRectBuffer.Width IMaaRectBuffer.Height IMaaRectBuffer.TryGetValues() IMaaRectBuffer.GetValues() MaaRectBuffer.TryGetValues() MaaRectBuffer.GetValues() |
MaaGetRectX MaaGetRectY MaaGetRectW MaaGetRectH |
IMaaRectBuffer.TrySetValues() MaaRectBuffer.TrySetValues() |
MaaRectSet |
IMaaBuffer.TryCopyTo() | Optimization method for copying the same type of buffer. |
IMaaDisposableHandle.Handle | The MaaRectHandle. |
MaaUtility : IMaaUtility
Wrapper | Native API |
---|---|
IMaaUtility.Version | MaaVersion |
IMaaOption.SetOption() | MaaSetGlobalOption |
MaaToolkit : IMaaToolkit
Wrapper | Native API |
---|---|
MaaToolkit.ctor() IMaaToolkit.Config.InitOption() |
MaaToolkitConfigInitOption |
IMaaToolkit.AdbDevice.Find() IMaaToolkit.AdbDevice.FindAsync() |
MaaToolkitAdbDeviceFind MaaToolkitAdbDeviceFindSpecified |
IMaaToolkit.Desktop.Window.Find() | MaaToolkitDesktopWindowFindAll |
IMaaToolkit.PI.Register() | MaaToolkitProjectInterfaceRegisterCustomAction MaaToolkitProjectInterfaceRegisterCustomRecognition |
IMaaToolkit.PI.RunCli() | MaaToolkitProjectInterfaceRunCli |
IMaaToolkit.PI.this[] | Gets or creates a PI instance. |
Buffers.AdbDeviceListBuffer : Buffers.MaaListBuffer : Buffers.IMaaListBuffer
Tip
Be aware that the underlying implementation of MaaListBuffer
stores the values of the Buffer in a fixed, contiguous memory space, rather than storing the references of the Buffer.
Wrapper | Native API |
---|---|
AdbDeviceListBuffer.MaaToolkitAdbDeviceInfo : AdbDeviceInfo |
MaaToolkitAdbDeviceGetName MaaToolkitAdbDeviceGetAdbPath MaaToolkitAdbDeviceGetAddress MaaToolkitAdbDeviceGetScreencapMethods MaaToolkitAdbDeviceGetInputMethods MaaToolkitAdbDeviceGetConfig |
AdbDeviceListBuffer.ctor() | MaaToolkitAdbDeviceListCreate |
IDisposable.Dispose() | MaaToolkitAdbDeviceListDestroy |
IMaaListBuffer.IsEmpty IMaaListBuffer.MaaSizeCount ICollection<>.Count |
MaaToolkitAdbDeviceListSize |
IMaaListBuffer.this[] IMaaListBuffer.TryIndexOf() IList<>.this[] IList<>.IndexOf() ICollection<>.Contains() |
MaaToolkitAdbDeviceListAt |
ICollection<>.IsReadOnly | true |
IEnumerable<>.GetEnumerator() IEnumerable.GetEnumerator() |
Implemented by class Buffers.MaaListEnumerator |
IMaaDisposableHandle.Handle | The MaaStringListBufferHandle. |
AdbDeviceListBuffer.TryGetList() | Static utility methods used to avoid creating instances of the class. |
Buffers.DesktopWindowListBuffer : Buffers.MaaListBuffer : Buffers.IMaaListBuffer
Tip
Be aware that the underlying implementation of MaaListBuffer
stores the values of the Buffer in a fixed, contiguous memory space, rather than storing the references of the Buffer.
Wrapper | Native API |
---|---|
DesktopWindowListBuffer.MaaToolkitDesktopWindowInfo : DesktopWindowInfo |
MaaToolkitDesktopWindowGetHandle MaaToolkitDesktopWindowGetClassName MaaToolkitDesktopWindowGetWindowName |
DesktopWindowListBuffer.ctor() | MaaToolkitDesktopWindowListCreate |
IDisposable.Dispose() | MaaToolkitDesktopWindowListDestroy |
IMaaListBuffer.IsEmpty IMaaListBuffer.MaaSizeCount ICollection<>.Count |
MaaToolkitDesktopWindowListSize |
IMaaListBuffer.this[] IMaaListBuffer.TryIndexOf() IList<>.this[] IList<>.IndexOf() ICollection<>.Contains() |
MaaToolkitDesktopWindowListAt |
ICollection<>.IsReadOnly | true |
IEnumerable<>.GetEnumerator() IEnumerable.GetEnumerator() |
Implemented by class Buffers.MaaListEnumerator |
IMaaDisposableHandle.Handle | The MaaStringListBufferHandle. |
DesktopWindowListBuffer.TryGetList() | Static utility methods used to avoid creating instances of the class. |
MaaAgentClient : IMaaAgentClient
Wrapper | Native API |
---|---|
MaaAgentClient.Create() | MaaAgentClientCreateV2 |
IDisposable.Dispose() | MaaAgentClientDestroy |
IMaaAgentClient.Id | MaaAgentClientIdentifier |
IMaaAgentClient.Resource | MaaAgentClientBindResource |
IMaaAgentClient.LinkStart() IMaaAgentClient.LinkStartUnlessProcessExit() |
MaaAgentClientConnect |
IMaaAgentClient.LinkStop() | MaaAgentClientDisconnect |
IMaaAgentClient.IsConnected | MaaAgentClientConnected |
IMaaAgentClient.AgentServerProcess | A process created by LinkStart(), whose lifecycle is managed by the current class. |
IMaaAgentClient.AgentServerStartupMethod | A delegate used to start the agent server process. |
MaaDisposableHandle.Handle | The MaaAgentClientHandle. |
MaaAgentServer : IMaaAgentServer
Wrapper | Native API |
---|---|
MaaAgentServer.CurrentId IMaaAgentServer.WithIdentifier() |
Used to get and modify the identifier. |
IMaaAgentServer.Register() | MaaAgentServerRegisterCustomRecognition MaaAgentServerRegisterCustomAction |
IMaaAgentServer.StartUp() | MaaAgentServerStartUp |
IMaaAgentServer.ShutDown() | MaaAgentServerShutDown |
IMaaAgentServer.Join() | MaaAgentServerJoin |
IMaaAgentServer.Detach() | MaaAgentServerDetach |