forked from MaaAssistantArknights/MaaAssistantArknights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbind.rs
92 lines (91 loc) · 2.48 KB
/
bind.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* automatically generated by rust-bindgen 0.60.1 */
pub type AsstHandle = *mut ::std::os::raw::c_void;
pub type TaskId = ::std::os::raw::c_int;
pub type AsstApiCallback = ::std::option::Option<
unsafe extern "C" fn(
msg: ::std::os::raw::c_int,
detail_json: *const ::std::os::raw::c_char,
custom_arg: *mut ::std::os::raw::c_void,
),
>;
extern "C" {
pub fn AsstLoadResource(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn AsstCreate() -> AsstHandle;
}
extern "C" {
pub fn AsstCreateEx(
callback: AsstApiCallback,
custom_arg: *mut ::std::os::raw::c_void,
) -> AsstHandle;
}
extern "C" {
pub fn AsstDestroy(handle: AsstHandle);
}
extern "C" {
pub fn AsstConnect(
handle: AsstHandle,
adb_path: *const ::std::os::raw::c_char,
address: *const ::std::os::raw::c_char,
config: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn AsstAppendTask(
handle: AsstHandle,
type_: *const ::std::os::raw::c_char,
params: *const ::std::os::raw::c_char,
) -> TaskId;
}
extern "C" {
pub fn AsstSetTaskParams(
handle: AsstHandle,
id: TaskId,
params: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn AsstStart(handle: AsstHandle) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn AsstStop(handle: AsstHandle) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn AsstCtrlerClick(
handle: AsstHandle,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
block: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn AsstGetImage(
handle: AsstHandle,
buff: *mut ::std::os::raw::c_void,
buff_size: ::std::os::raw::c_ulonglong,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub fn AsstGetUUID(
handle: AsstHandle,
buff: *mut ::std::os::raw::c_char,
buff_size: ::std::os::raw::c_ulonglong,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub fn AsstGetTasksList(
handle: AsstHandle,
buff: *mut TaskId,
buff_size: ::std::os::raw::c_ulonglong,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub fn AsstGetNullSize() -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub fn AsstGetVersion() -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn AsstLog(level: *const ::std::os::raw::c_char, message: *const ::std::os::raw::c_char);
}