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

The custom controller API. More...

#include <MaaCustomController.h>

Public Attributes

MaaBool(* connect )(void *trans_arg)
 
MaaBool(* request_uuid )(void *trans_arg, MaaStringBuffer *buffer)
 Write result to buffer.
 
MaaBool(* start_app )(const char *intent, void *trans_arg)
 
MaaBool(* stop_app )(const char *intent, void *trans_arg)
 
MaaBool(* screencap )(void *trans_arg, MaaImageBuffer *buffer)
 Write result to buffer.
 
MaaBool(* click )(int32_t x, int32_t y, void *trans_arg)
 
MaaBool(* swipe )(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t duration, void *trans_arg)
 
MaaBool(* touch_down )(int32_t contact, int32_t x, int32_t y, int32_t pressure, void *trans_arg)
 
MaaBool(* touch_move )(int32_t contact, int32_t x, int32_t y, int32_t pressure, void *trans_arg)
 
MaaBool(* touch_up )(int32_t contact, void *trans_arg)
 
MaaBool(* press_key )(int32_t keycode, void *trans_arg)
 
MaaBool(* input_text )(const char *text, void *trans_arg)
 

Detailed Description

The custom controller API.

To create a custom controller, you need to implement this API.

You do not have to implement all the functions in this API. Instead, just implement the functions you need. Do note that if an unimplemented function is called, the framework will likely crash.

Member Data Documentation

◆ connect

MaaBool(* MaaCustomControllerCallbacks::connect) (void *trans_arg)

◆ request_uuid

MaaBool(* MaaCustomControllerCallbacks::request_uuid) (void *trans_arg, MaaStringBuffer *buffer)

Write result to buffer.

◆ start_app

MaaBool(* MaaCustomControllerCallbacks::start_app) (const char *intent, void *trans_arg)

◆ stop_app

MaaBool(* MaaCustomControllerCallbacks::stop_app) (const char *intent, void *trans_arg)

◆ screencap

MaaBool(* MaaCustomControllerCallbacks::screencap) (void *trans_arg, MaaImageBuffer *buffer)

Write result to buffer.

◆ click

MaaBool(* MaaCustomControllerCallbacks::click) (int32_t x, int32_t y, void *trans_arg)

◆ swipe

MaaBool(* MaaCustomControllerCallbacks::swipe) (int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t duration, void *trans_arg)

◆ touch_down

MaaBool(* MaaCustomControllerCallbacks::touch_down) (int32_t contact, int32_t x, int32_t y, int32_t pressure, void *trans_arg)

◆ touch_move

MaaBool(* MaaCustomControllerCallbacks::touch_move) (int32_t contact, int32_t x, int32_t y, int32_t pressure, void *trans_arg)

◆ touch_up

MaaBool(* MaaCustomControllerCallbacks::touch_up) (int32_t contact, void *trans_arg)

◆ press_key

MaaBool(* MaaCustomControllerCallbacks::press_key) (int32_t keycode, void *trans_arg)

◆ input_text

MaaBool(* MaaCustomControllerCallbacks::input_text) (const char *text, void *trans_arg)

The documentation for this struct was generated from the following file: