generated_bindings.dart 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. // AUTO GENERATED FILE, DO NOT EDIT.
  2. //
  3. // Generated by `package:ffigen`.
  4. import 'dart:ffi' as ffi;
  5. /// Bindings to `headers/example.h`.
  6. class NativeLibrary {
  7. /// Holds the symbol lookup function.
  8. final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
  9. _lookup;
  10. /// The symbols are looked up in [dynamicLibrary].
  11. NativeLibrary(ffi.DynamicLibrary dynamicLibrary)
  12. : _lookup = dynamicLibrary.lookup;
  13. /// The symbols are looked up with [lookup].
  14. NativeLibrary.fromLookup(
  15. ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
  16. lookup)
  17. : _lookup = lookup;
  18. void __va_start(
  19. ffi.Pointer<va_list> arg0,
  20. ) {
  21. return ___va_start(
  22. arg0,
  23. );
  24. }
  25. late final ___va_startPtr =
  26. _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<va_list>)>>(
  27. '__va_start');
  28. late final ___va_start =
  29. ___va_startPtr.asFunction<void Function(ffi.Pointer<va_list>)>();
  30. void __security_init_cookie() {
  31. return ___security_init_cookie();
  32. }
  33. late final ___security_init_cookiePtr =
  34. _lookup<ffi.NativeFunction<ffi.Void Function()>>(
  35. '__security_init_cookie');
  36. late final ___security_init_cookie =
  37. ___security_init_cookiePtr.asFunction<void Function()>();
  38. void __security_check_cookie(
  39. int _StackCookie,
  40. ) {
  41. return ___security_check_cookie(
  42. _StackCookie,
  43. );
  44. }
  45. late final ___security_check_cookiePtr =
  46. _lookup<ffi.NativeFunction<ffi.Void Function(uintptr_t)>>(
  47. '__security_check_cookie');
  48. late final ___security_check_cookie =
  49. ___security_check_cookiePtr.asFunction<void Function(int)>();
  50. void __report_gsfailure(
  51. int _StackCookie,
  52. ) {
  53. return ___report_gsfailure(
  54. _StackCookie,
  55. );
  56. }
  57. late final ___report_gsfailurePtr =
  58. _lookup<ffi.NativeFunction<ffi.Void Function(uintptr_t)>>(
  59. '__report_gsfailure');
  60. late final ___report_gsfailure =
  61. ___report_gsfailurePtr.asFunction<void Function(int)>();
  62. late final ffi.Pointer<uintptr_t> ___security_cookie =
  63. _lookup<uintptr_t>('__security_cookie');
  64. int get __security_cookie => ___security_cookie.value;
  65. set __security_cookie(int value) => ___security_cookie.value = value;
  66. void gameInit(
  67. int gameType,
  68. int count,
  69. ) {
  70. return _gameInit(
  71. gameType,
  72. count,
  73. );
  74. }
  75. late final _gameInitPtr =
  76. _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int32, ffi.Int32)>>(
  77. 'gameInit');
  78. late final _gameInit = _gameInitPtr.asFunction<void Function(int, int)>();
  79. void gameProcess(
  80. int id,
  81. ffi.Pointer<ffi.Uint8> buf,
  82. int len,
  83. ffi.Pointer<ffi.Int32> result,
  84. ) {
  85. return _gameProcess(
  86. id,
  87. buf,
  88. len,
  89. result,
  90. );
  91. }
  92. late final _gameProcessPtr = _lookup<
  93. ffi.NativeFunction<
  94. ffi.Void Function(ffi.Int32, ffi.Pointer<ffi.Uint8>, ffi.Int32,
  95. ffi.Pointer<ffi.Int32>)>>('gameProcess');
  96. late final _gameProcess = _gameProcessPtr.asFunction<
  97. void Function(
  98. int, ffi.Pointer<ffi.Uint8>, int, ffi.Pointer<ffi.Int32>)>();
  99. void getGameResult(
  100. int id,
  101. ffi.Pointer<ffi.Int32> result,
  102. ) {
  103. return _getGameResult(
  104. id,
  105. result,
  106. );
  107. }
  108. late final _getGameResultPtr = _lookup<
  109. ffi.NativeFunction<
  110. ffi.Void Function(
  111. ffi.Int32, ffi.Pointer<ffi.Int32>)>>('getGameResult');
  112. late final _getGameResult = _getGameResultPtr
  113. .asFunction<void Function(int, ffi.Pointer<ffi.Int32>)>();
  114. void getGameDataStr(
  115. int id,
  116. ffi.Pointer<ffi.Int8> result,
  117. ) {
  118. return _getGameDataStr(
  119. id,
  120. result,
  121. );
  122. }
  123. late final _getGameDataStrPtr = _lookup<
  124. ffi.NativeFunction<
  125. ffi.Void Function(
  126. ffi.Int32, ffi.Pointer<ffi.Int8>)>>('getGameDataStr');
  127. late final _getGameDataStr = _getGameDataStrPtr
  128. .asFunction<void Function(int, ffi.Pointer<ffi.Int8>)>();
  129. int getInteractionCMD() {
  130. return _getInteractionCMD();
  131. }
  132. late final _getInteractionCMDPtr =
  133. _lookup<ffi.NativeFunction<ffi.Int32 Function()>>('getInteractionCMD');
  134. late final _getInteractionCMD =
  135. _getInteractionCMDPtr.asFunction<int Function()>();
  136. void getGameVersion(
  137. ffi.Pointer<ffi.Int8> version,
  138. ) {
  139. return _getGameVersion(
  140. version,
  141. );
  142. }
  143. late final _getGameVersionPtr =
  144. _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Int8>)>>(
  145. 'getGameVersion');
  146. late final _getGameVersion =
  147. _getGameVersionPtr.asFunction<void Function(ffi.Pointer<ffi.Int8>)>();
  148. int getStepFreq(
  149. int id,
  150. ) {
  151. return _getStepFreq(
  152. id,
  153. );
  154. }
  155. late final _getStepFreqPtr =
  156. _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>('getStepFreq');
  157. late final _getStepFreq = _getStepFreqPtr.asFunction<int Function(int)>();
  158. int getStepCount(
  159. int id,
  160. ) {
  161. return _getStepCount(
  162. id,
  163. );
  164. }
  165. late final _getStepCountPtr =
  166. _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>(
  167. 'getStepCount');
  168. late final _getStepCount = _getStepCountPtr.asFunction<int Function(int)>();
  169. int getMotionCount(
  170. int id,
  171. int type,
  172. ) {
  173. return _getMotionCount(
  174. id,
  175. type,
  176. );
  177. }
  178. late final _getMotionCountPtr =
  179. _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32, ffi.Int32)>>(
  180. 'getMotionCount');
  181. late final _getMotionCount =
  182. _getMotionCountPtr.asFunction<int Function(int, int)>();
  183. int getGameStepVel(
  184. int id,
  185. ) {
  186. return _getGameStepVel(
  187. id,
  188. );
  189. }
  190. late final _getGameStepVelPtr =
  191. _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>(
  192. 'getGameStepVel');
  193. late final _getGameStepVel =
  194. _getGameStepVelPtr.asFunction<int Function(int)>();
  195. int NativeGetAttX(
  196. int id,
  197. ) {
  198. return _NativeGetAttX(
  199. id,
  200. );
  201. }
  202. late final _NativeGetAttXPtr =
  203. _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>(
  204. 'NativeGetAttX');
  205. late final _NativeGetAttX = _NativeGetAttXPtr.asFunction<int Function(int)>();
  206. }
  207. typedef va_list = ffi.Pointer<ffi.Int8>;
  208. typedef uintptr_t = ffi.Uint64;
  209. const int _VCRT_COMPILER_PREPROCESSOR = 1;
  210. const int _SAL_VERSION = 20;
  211. const int __SAL_H_VERSION = 180000000;
  212. const int _USE_DECLSPECS_FOR_SAL = 0;
  213. const int _USE_ATTRIBUTES_FOR_SAL = 0;
  214. const int _CRT_PACKING = 8;
  215. const int _VCRUNTIME_DISABLED_WARNINGS = 4514;
  216. const int _HAS_EXCEPTIONS = 1;
  217. const int _WCHAR_T_DEFINED = 1;
  218. const int NULL = 0;
  219. const int _HAS_CXX17 = 0;
  220. const int _HAS_CXX20 = 0;
  221. const int _HAS_NODISCARD = 1;
  222. const int INT8_MIN = -128;
  223. const int INT16_MIN = -32768;
  224. const int INT32_MIN = -2147483648;
  225. const int INT64_MIN = -9223372036854775808;
  226. const int INT8_MAX = 127;
  227. const int INT16_MAX = 32767;
  228. const int INT32_MAX = 2147483647;
  229. const int INT64_MAX = 9223372036854775807;
  230. const int UINT8_MAX = 255;
  231. const int UINT16_MAX = 65535;
  232. const int UINT32_MAX = 4294967295;
  233. const int UINT64_MAX = -1;
  234. const int INT_LEAST8_MIN = -128;
  235. const int INT_LEAST16_MIN = -32768;
  236. const int INT_LEAST32_MIN = -2147483648;
  237. const int INT_LEAST64_MIN = -9223372036854775808;
  238. const int INT_LEAST8_MAX = 127;
  239. const int INT_LEAST16_MAX = 32767;
  240. const int INT_LEAST32_MAX = 2147483647;
  241. const int INT_LEAST64_MAX = 9223372036854775807;
  242. const int UINT_LEAST8_MAX = 255;
  243. const int UINT_LEAST16_MAX = 65535;
  244. const int UINT_LEAST32_MAX = 4294967295;
  245. const int UINT_LEAST64_MAX = -1;
  246. const int INT_FAST8_MIN = -128;
  247. const int INT_FAST16_MIN = -2147483648;
  248. const int INT_FAST32_MIN = -2147483648;
  249. const int INT_FAST64_MIN = -9223372036854775808;
  250. const int INT_FAST8_MAX = 127;
  251. const int INT_FAST16_MAX = 2147483647;
  252. const int INT_FAST32_MAX = 2147483647;
  253. const int INT_FAST64_MAX = 9223372036854775807;
  254. const int UINT_FAST8_MAX = 255;
  255. const int UINT_FAST16_MAX = 4294967295;
  256. const int UINT_FAST32_MAX = 4294967295;
  257. const int UINT_FAST64_MAX = -1;
  258. const int INTPTR_MIN = -9223372036854775808;
  259. const int INTPTR_MAX = 9223372036854775807;
  260. const int UINTPTR_MAX = -1;
  261. const int INTMAX_MIN = -9223372036854775808;
  262. const int INTMAX_MAX = 9223372036854775807;
  263. const int UINTMAX_MAX = -1;
  264. const int PTRDIFF_MIN = -9223372036854775808;
  265. const int PTRDIFF_MAX = 9223372036854775807;
  266. const int SIZE_MAX = -1;
  267. const int SIG_ATOMIC_MIN = -2147483648;
  268. const int SIG_ATOMIC_MAX = 2147483647;
  269. const int WCHAR_MIN = 0;
  270. const int WCHAR_MAX = 65535;
  271. const int WINT_MIN = 0;
  272. const int WINT_MAX = 65535;