Skip to content

Commit

Permalink
chore: 一些参数重命名
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Oct 6, 2023
1 parent 6eb54b2 commit bed2975
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
28 changes: 15 additions & 13 deletions include/MaaFramework/Instance/MaaCustomController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,26 @@ extern "C"

struct MaaCustomControllerAPI
{
MaaBool (*set_option)(MaaCtrlOption key, MaaStringView value, MaaTransparentArg arg);
MaaBool (*set_option)(MaaCtrlOption key, MaaStringView value, MaaTransparentArg handle_arg);

MaaBool (*connect)(MaaTransparentArg arg);
MaaBool (*click)(int32_t x, int32_t y, MaaTransparentArg arg);
MaaBool (*swipe)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t duration, MaaTransparentArg arg);
MaaBool (*press_key)(int32_t keycode, MaaTransparentArg arg);
MaaBool (*connect)(MaaTransparentArg handle_arg);
MaaBool (*click)(int32_t x, int32_t y, MaaTransparentArg handle_arg);
MaaBool (*swipe)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t duration,
MaaTransparentArg handle_arg);
MaaBool (*press_key)(int32_t keycode, MaaTransparentArg handle_arg);

MaaBool (*touch_down)(int32_t contact, int32_t x, int32_t y, int32_t pressure, MaaTransparentArg arg);
MaaBool (*touch_move)(int32_t contact, int32_t x, int32_t y, int32_t pressure, MaaTransparentArg arg);
MaaBool (*touch_up)(int32_t contact, MaaTransparentArg arg);
MaaBool (*touch_down)(int32_t contact, int32_t x, int32_t y, int32_t pressure, MaaTransparentArg handle_arg);
MaaBool (*touch_move)(int32_t contact, int32_t x, int32_t y, int32_t pressure, MaaTransparentArg handle_arg);
MaaBool (*touch_up)(int32_t contact, MaaTransparentArg handle_arg);

MaaBool (*start_app)(MaaStringView package_name, MaaTransparentArg arg);
MaaBool (*stop_app)(MaaStringView package_name, MaaTransparentArg arg);
MaaBool (*start_app)(MaaStringView package_name, MaaTransparentArg handle_arg);
MaaBool (*stop_app)(MaaStringView package_name, MaaTransparentArg handle_arg);

MaaBool (*get_resolution)(MaaTransparentArg arg, /* out */ int32_t* width, /* out */ int32_t* height);
MaaBool (*get_resolution)(MaaTransparentArg handle_arg, /* out */ int32_t* width,
/* out */ int32_t* height);

MaaBool (*get_image)(MaaTransparentArg arg, /* out */ MaaImageBufferHandle buffer);
MaaBool (*get_uuid)(MaaTransparentArg arg, /* out */ MaaStringBufferHandle buffer);
MaaBool (*get_image)(MaaTransparentArg handle_arg, /* out */ MaaImageBufferHandle buffer);
MaaBool (*get_uuid)(MaaTransparentArg handle_arg, /* out */ MaaStringBufferHandle buffer);
};

#ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions include/MaaFramework/Task/MaaCustomAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ extern "C"
struct MaaCustomActionAPI
{
MaaBool (*run)(MaaSyncContextHandle sync_context, MaaStringView task_name, MaaStringView custom_action_param,
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg arg);
MaaRectHandle cur_box, MaaStringView cur_rec_detail, MaaTransparentArg action_arg);

void (*stop)(MaaTransparentArg arg);
void (*stop)(MaaTransparentArg action_arg);
};

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion include/MaaFramework/Task/MaaCustomRecognizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern "C"
struct MaaCustomRecognizerAPI
{
MaaBool (*analyze)(MaaSyncContextHandle sync_context, const MaaImageBufferHandle image, MaaStringView task_name,
MaaStringView custom_recognition_param, MaaTransparentArg arg,
MaaStringView custom_recognition_param, MaaTransparentArg recognizer_arg,
/*out*/ MaaRectHandle out_box,
/*out*/ MaaStringBufferHandle detail_buff);
};
Expand Down

0 comments on commit bed2975

Please sign in to comment.