mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
整理目录结构,分离Task
This commit is contained in:
29
include/AsstCaller.h
Normal file
29
include/AsstCaller.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "AsstPort.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
namespace asst {
|
||||
class Assistance;
|
||||
}
|
||||
typedef void (MEO_CALL* AsstCallback)(int msg, const char* detail_json, void* custom_arg);
|
||||
|
||||
MEOAPI_PORT asst::Assistance* AsstCreate();
|
||||
MEOAPI_PORT asst::Assistance* AsstCreateEx(AsstCallback callback, void* custom_arg);
|
||||
MEOAPI_PORT void AsstDestory(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstCatchEmulator(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstStart(asst::Assistance* p_asst, const char* task);
|
||||
MEOAPI_PORT void AsstStop(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstSetParam(asst::Assistance* p_asst, const char* type, const char* param, const char* value);
|
||||
MEOAPI_PORT bool AsstRunOpenRecruit(asst::Assistance* p_asst, const int required_level[], bool set_time);
|
||||
MEOAPI_PORT bool AsstStartInfrast(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstTestOcr(asst::Assistance* p_asst, const char** text_array, int array_size, bool need_click);
|
||||
|
||||
MEOAPI_PORT bool CheckVersionUpdate(char* tag_buffer, int tag_bufsize, char* html_url_buffer, int html_bufsize, char* body_buffer, int body_bufsize);
|
||||
|
||||
MEOAPI_PORT bool AsstTestSwipe(asst::Assistance* p_asst, int x1, int y1, int x2, int y2);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
37
include/AsstPort.h
Normal file
37
include/AsstPort.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
// The way how the function is called
|
||||
#if !defined(MEO_CALL)
|
||||
#if defined(_WIN32)
|
||||
#define MEO_CALL __stdcall
|
||||
#else
|
||||
#define MEO_CALL
|
||||
#endif /* _WIN32 */
|
||||
#endif /* MEO_CALL */
|
||||
|
||||
// The function exported symbols
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define MEO_DLL_IMPORT __declspec(dllimport)
|
||||
#define MEO_DLL_EXPORT __declspec(dllexport)
|
||||
#define MEO_DLL_LOCAL
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define MEO_DLL_IMPORT __attribute__ ((visibility ("default")))
|
||||
#define MEO_DLL_EXPORT __attribute__ ((visibility ("default")))
|
||||
#define MEO_DLL_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#else
|
||||
#define MEO_DLL_IMPORT
|
||||
#define MEO_DLL_EXPORT
|
||||
#define MEO_DLL_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MEO_DLL_EXPORTS // defined if we are building the DLL (instead of using it)
|
||||
#define MEOAPI_PORT MEO_DLL_EXPORT
|
||||
#else
|
||||
#define MEOAPI_PORT MEO_DLL_IMPORT
|
||||
#endif // MEO_DLL_EXPORTS
|
||||
|
||||
#define MEOAPI MEOAPI_PORT MEO_CALL
|
||||
|
||||
#define MEOLOCAL MEO_DLL_LOCAL MEO_CALL
|
||||
Reference in New Issue
Block a user