Maa Framework (main) v2.2.0-beta.3
A automation black-box testing framework based on image recognition.
Loading...
Searching...
No Matches
MaaController.h File Reference

The controller interface. See MaaControllerPostRequest for details on how to post requests to the controller. More...

#include "../MaaDef.h"
#include "../MaaPort.h"

Go to the source code of this file.

Typedefs

typedef struct MaaCustomControllerCallbacks MaaCustomControllerCallbacks
 

Functions

MAA_FRAMEWORK_API MaaControllerMaaAdbControllerCreate (const char *adb_path, const char *address, MaaAdbScreencapMethod screencap_methods, MaaAdbInputMethod input_methods, const char *config, const char *agent_path, MaaNotificationCallback notify, void *notify_trans_arg)
 
MAA_FRAMEWORK_API MaaControllerMaaWin32ControllerCreate (void *hWnd, MaaWin32ScreencapMethod screencap_method, MaaWin32InputMethod input_method, MaaNotificationCallback notify, void *notify_trans_arg)
 
MAA_FRAMEWORK_API MaaControllerMaaCustomControllerCreate (MaaCustomControllerCallbacks *controller, void *controller_arg, MaaNotificationCallback notify, void *notify_trans_arg)
 
MAA_FRAMEWORK_API MaaControllerMaaDbgControllerCreate (const char *read_path, const char *write_path, MaaDbgControllerType type, const char *config, MaaNotificationCallback notify, void *notify_trans_arg)
 
MAA_FRAMEWORK_API void MaaControllerDestroy (MaaController *ctrl)
 
MAA_FRAMEWORK_API MaaBool MaaControllerSetOption (MaaController *ctrl, MaaCtrlOption key, MaaOptionValue value, MaaOptionValueSize val_size)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostConnection (MaaController *ctrl)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostClick (MaaController *ctrl, int32_t x, int32_t y)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostSwipe (MaaController *ctrl, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t duration)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostPressKey (MaaController *ctrl, int32_t keycode)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostInputText (MaaController *ctrl, const char *text)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostStartApp (MaaController *ctrl, const char *intent)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostStopApp (MaaController *ctrl, const char *intent)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostTouchDown (MaaController *ctrl, int32_t contact, int32_t x, int32_t y, int32_t pressure)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostTouchMove (MaaController *ctrl, int32_t contact, int32_t x, int32_t y, int32_t pressure)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostTouchUp (MaaController *ctrl, int32_t contact)
 
MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostScreencap (MaaController *ctrl)
 
MAA_FRAMEWORK_API MaaStatus MaaControllerStatus (const MaaController *ctrl, MaaCtrlId id)
 
MAA_FRAMEWORK_API MaaStatus MaaControllerWait (const MaaController *ctrl, MaaCtrlId id)
 
MAA_FRAMEWORK_API MaaBool MaaControllerConnected (const MaaController *ctrl)
 
MAA_FRAMEWORK_API MaaBool MaaControllerCachedImage (const MaaController *ctrl, MaaImageBuffer *buffer)
 
MAA_FRAMEWORK_API MaaBool MaaControllerGetUuid (MaaController *ctrl, MaaStringBuffer *buffer)
 

Detailed Description

The controller interface. See MaaControllerPostRequest for details on how to post requests to the controller.

Author

Typedef Documentation

◆ MaaCustomControllerCallbacks

Function Documentation

◆ MaaAdbControllerCreate()

MAA_FRAMEWORK_API MaaController * MaaAdbControllerCreate ( const char *  adb_path,
const char *  address,
MaaAdbScreencapMethod  screencap_methods,
MaaAdbInputMethod  input_methods,
const char *  config,
const char *  agent_path,
MaaNotificationCallback  notify,
void *  notify_trans_arg 
)

◆ MaaWin32ControllerCreate()

MAA_FRAMEWORK_API MaaController * MaaWin32ControllerCreate ( void *  hWnd,
MaaWin32ScreencapMethod  screencap_method,
MaaWin32InputMethod  input_method,
MaaNotificationCallback  notify,
void *  notify_trans_arg 
)

◆ MaaCustomControllerCreate()

MAA_FRAMEWORK_API MaaController * MaaCustomControllerCreate ( MaaCustomControllerCallbacks controller,
void *  controller_arg,
MaaNotificationCallback  notify,
void *  notify_trans_arg 
)

◆ MaaDbgControllerCreate()

MAA_FRAMEWORK_API MaaController * MaaDbgControllerCreate ( const char *  read_path,
const char *  write_path,
MaaDbgControllerType  type,
const char *  config,
MaaNotificationCallback  notify,
void *  notify_trans_arg 
)

◆ MaaControllerDestroy()

MAA_FRAMEWORK_API void MaaControllerDestroy ( MaaController ctrl)

◆ MaaControllerSetOption()

MAA_FRAMEWORK_API MaaBool MaaControllerSetOption ( MaaController ctrl,
MaaCtrlOption  key,
MaaOptionValue  value,
MaaOptionValueSize  val_size 
)
Parameters
[in]value
Parameters
valuebyte array, int*, char*, bool*

◆ MaaControllerPostConnection()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostConnection ( MaaController ctrl)

◆ MaaControllerPostClick()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostClick ( MaaController ctrl,
int32_t  x,
int32_t  y 
)

◆ MaaControllerPostSwipe()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostSwipe ( MaaController ctrl,
int32_t  x1,
int32_t  y1,
int32_t  x2,
int32_t  y2,
int32_t  duration 
)

◆ MaaControllerPostPressKey()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostPressKey ( MaaController ctrl,
int32_t  keycode 
)

◆ MaaControllerPostInputText()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostInputText ( MaaController ctrl,
const char *  text 
)

◆ MaaControllerPostStartApp()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostStartApp ( MaaController ctrl,
const char *  intent 
)

◆ MaaControllerPostStopApp()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostStopApp ( MaaController ctrl,
const char *  intent 
)

◆ MaaControllerPostTouchDown()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostTouchDown ( MaaController ctrl,
int32_t  contact,
int32_t  x,
int32_t  y,
int32_t  pressure 
)

◆ MaaControllerPostTouchMove()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostTouchMove ( MaaController ctrl,
int32_t  contact,
int32_t  x,
int32_t  y,
int32_t  pressure 
)

◆ MaaControllerPostTouchUp()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostTouchUp ( MaaController ctrl,
int32_t  contact 
)

◆ MaaControllerPostScreencap()

MAA_FRAMEWORK_API MaaCtrlId MaaControllerPostScreencap ( MaaController ctrl)

◆ MaaControllerStatus()

MAA_FRAMEWORK_API MaaStatus MaaControllerStatus ( const MaaController ctrl,
MaaCtrlId  id 
)

◆ MaaControllerWait()

MAA_FRAMEWORK_API MaaStatus MaaControllerWait ( const MaaController ctrl,
MaaCtrlId  id 
)

◆ MaaControllerConnected()

MAA_FRAMEWORK_API MaaBool MaaControllerConnected ( const MaaController ctrl)

◆ MaaControllerCachedImage()

MAA_FRAMEWORK_API MaaBool MaaControllerCachedImage ( const MaaController ctrl,
MaaImageBuffer buffer 
)

◆ MaaControllerGetUuid()

MAA_FRAMEWORK_API MaaBool MaaControllerGetUuid ( MaaController ctrl,
MaaStringBuffer buffer 
)