This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
/
_expected_native_test_bindings.dart
264 lines (223 loc) · 6.06 KB
/
_expected_native_test_bindings.dart
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
// ignore_for_file: camel_case_types, non_constant_identifier_names
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint
import 'dart:ffi' as ffi;
/// Native tests.
class NativeLibrary {
/// Holds the symbol lookup function.
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
_lookup;
/// The symbols are looked up in [dynamicLibrary].
NativeLibrary(ffi.DynamicLibrary dynamicLibrary)
: _lookup = dynamicLibrary.lookup;
/// The symbols are looked up with [lookup].
NativeLibrary.fromLookup(
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
lookup)
: _lookup = lookup;
bool Function1Bool(
bool x,
) {
return _Function1Bool(
x,
);
}
late final _Function1BoolPtr =
_lookup<ffi.NativeFunction<ffi.Bool Function(ffi.Bool)>>('Function1Bool');
late final _Function1Bool =
_Function1BoolPtr.asFunction<bool Function(bool)>();
int Function1Uint8(
int x,
) {
return _Function1Uint8(
x,
);
}
late final _Function1Uint8Ptr =
_lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Uint8)>>(
'Function1Uint8');
late final _Function1Uint8 =
_Function1Uint8Ptr.asFunction<int Function(int)>();
int Function1Uint16(
int x,
) {
return _Function1Uint16(
x,
);
}
late final _Function1Uint16Ptr =
_lookup<ffi.NativeFunction<ffi.Uint16 Function(ffi.Uint16)>>(
'Function1Uint16');
late final _Function1Uint16 =
_Function1Uint16Ptr.asFunction<int Function(int)>();
int Function1Uint32(
int x,
) {
return _Function1Uint32(
x,
);
}
late final _Function1Uint32Ptr =
_lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.Uint32)>>(
'Function1Uint32');
late final _Function1Uint32 =
_Function1Uint32Ptr.asFunction<int Function(int)>();
int Function1Uint64(
int x,
) {
return _Function1Uint64(
x,
);
}
late final _Function1Uint64Ptr =
_lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.Uint64)>>(
'Function1Uint64');
late final _Function1Uint64 =
_Function1Uint64Ptr.asFunction<int Function(int)>();
int Function1Int8(
int x,
) {
return _Function1Int8(
x,
);
}
late final _Function1Int8Ptr =
_lookup<ffi.NativeFunction<ffi.Int8 Function(ffi.Int8)>>('Function1Int8');
late final _Function1Int8 = _Function1Int8Ptr.asFunction<int Function(int)>();
int Function1Int16(
int x,
) {
return _Function1Int16(
x,
);
}
late final _Function1Int16Ptr =
_lookup<ffi.NativeFunction<ffi.Int16 Function(ffi.Int16)>>(
'Function1Int16');
late final _Function1Int16 =
_Function1Int16Ptr.asFunction<int Function(int)>();
int Function1Int32(
int x,
) {
return _Function1Int32(
x,
);
}
late final _Function1Int32Ptr =
_lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>(
'Function1Int32');
late final _Function1Int32 =
_Function1Int32Ptr.asFunction<int Function(int)>();
int Function1Int64(
int x,
) {
return _Function1Int64(
x,
);
}
late final _Function1Int64Ptr =
_lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.Int64)>>(
'Function1Int64');
late final _Function1Int64 =
_Function1Int64Ptr.asFunction<int Function(int)>();
int Function1IntPtr(
int x,
) {
return _Function1IntPtr(
x,
);
}
late final _Function1IntPtrPtr =
_lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
'Function1IntPtr');
late final _Function1IntPtr =
_Function1IntPtrPtr.asFunction<int Function(int)>();
int Function1UintPtr(
int x,
) {
return _Function1UintPtr(
x,
);
}
late final _Function1UintPtrPtr =
_lookup<ffi.NativeFunction<ffi.UintPtr Function(ffi.UintPtr)>>(
'Function1UintPtr');
late final _Function1UintPtr =
_Function1UintPtrPtr.asFunction<int Function(int)>();
double Function1Float(
double x,
) {
return _Function1Float(
x,
);
}
late final _Function1FloatPtr =
_lookup<ffi.NativeFunction<ffi.Float Function(ffi.Float)>>(
'Function1Float');
late final _Function1Float =
_Function1FloatPtr.asFunction<double Function(double)>();
double Function1Double(
double x,
) {
return _Function1Double(
x,
);
}
late final _Function1DoublePtr =
_lookup<ffi.NativeFunction<ffi.Double Function(ffi.Double)>>(
'Function1Double');
late final _Function1Double =
_Function1DoublePtr.asFunction<double Function(double)>();
ffi.Pointer<Struct1> getStruct1() {
return _getStruct1();
}
late final _getStruct1Ptr =
_lookup<ffi.NativeFunction<ffi.Pointer<Struct1> Function()>>(
'getStruct1');
late final _getStruct1 =
_getStruct1Ptr.asFunction<ffi.Pointer<Struct1> Function()>();
Struct3 Function1StructReturnByValue(
int a,
int b,
int c,
) {
return _Function1StructReturnByValue(
a,
b,
c,
);
}
late final _Function1StructReturnByValuePtr =
_lookup<ffi.NativeFunction<Struct3 Function(ffi.Int, ffi.Int, ffi.Int)>>(
'Function1StructReturnByValue');
late final _Function1StructReturnByValue = _Function1StructReturnByValuePtr
.asFunction<Struct3 Function(int, int, int)>();
int Function1StructPassByValue(
Struct3 sum_a_b_c,
) {
return _Function1StructPassByValue(
sum_a_b_c,
);
}
late final _Function1StructPassByValuePtr =
_lookup<ffi.NativeFunction<ffi.Int Function(Struct3)>>(
'Function1StructPassByValue');
late final _Function1StructPassByValue =
_Function1StructPassByValuePtr.asFunction<int Function(Struct3)>();
}
final class Struct1 extends ffi.Struct {
@ffi.Int8()
external int a;
@ffi.Array.multi([3, 1, 2])
external ffi.Array<ffi.Array<ffi.Array<ffi.Int32>>> data;
}
final class Struct3 extends ffi.Struct {
@ffi.Int()
external int a;
@ffi.Int()
external int b;
@ffi.Int()
external int c;
}