123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- // AUTO GENERATED FILE, DO NOT EDIT.
- //
- // Generated by `package:ffigen`.
- import 'dart:ffi' as ffi;
- /// Bindings to `headers/example.h`.
- 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;
- void __va_start(
- ffi.Pointer<va_list> arg0,
- ) {
- return ___va_start(
- arg0,
- );
- }
- late final ___va_startPtr =
- _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<va_list>)>>(
- '__va_start');
- late final ___va_start =
- ___va_startPtr.asFunction<void Function(ffi.Pointer<va_list>)>();
- void __security_init_cookie() {
- return ___security_init_cookie();
- }
- late final ___security_init_cookiePtr =
- _lookup<ffi.NativeFunction<ffi.Void Function()>>(
- '__security_init_cookie');
- late final ___security_init_cookie =
- ___security_init_cookiePtr.asFunction<void Function()>();
- void __security_check_cookie(
- int _StackCookie,
- ) {
- return ___security_check_cookie(
- _StackCookie,
- );
- }
- late final ___security_check_cookiePtr =
- _lookup<ffi.NativeFunction<ffi.Void Function(uintptr_t)>>(
- '__security_check_cookie');
- late final ___security_check_cookie =
- ___security_check_cookiePtr.asFunction<void Function(int)>();
- void __report_gsfailure(
- int _StackCookie,
- ) {
- return ___report_gsfailure(
- _StackCookie,
- );
- }
- late final ___report_gsfailurePtr =
- _lookup<ffi.NativeFunction<ffi.Void Function(uintptr_t)>>(
- '__report_gsfailure');
- late final ___report_gsfailure =
- ___report_gsfailurePtr.asFunction<void Function(int)>();
- late final ffi.Pointer<uintptr_t> ___security_cookie =
- _lookup<uintptr_t>('__security_cookie');
- int get __security_cookie => ___security_cookie.value;
- set __security_cookie(int value) => ___security_cookie.value = value;
- void gameInit(
- int gameType,
- int count,
- ) {
- return _gameInit(
- gameType,
- count,
- );
- }
- late final _gameInitPtr =
- _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int32, ffi.Int32)>>(
- 'gameInit');
- late final _gameInit = _gameInitPtr.asFunction<void Function(int, int)>();
- void gameProcess(
- int id,
- ffi.Pointer<ffi.Uint8> buf,
- int len,
- ffi.Pointer<ffi.Int32> result,
- ) {
- return _gameProcess(
- id,
- buf,
- len,
- result,
- );
- }
- late final _gameProcessPtr = _lookup<
- ffi.NativeFunction<
- ffi.Void Function(ffi.Int32, ffi.Pointer<ffi.Uint8>, ffi.Int32,
- ffi.Pointer<ffi.Int32>)>>('gameProcess');
- late final _gameProcess = _gameProcessPtr.asFunction<
- void Function(
- int, ffi.Pointer<ffi.Uint8>, int, ffi.Pointer<ffi.Int32>)>();
- void getGameResult(
- int id,
- ffi.Pointer<ffi.Int32> result,
- ) {
- return _getGameResult(
- id,
- result,
- );
- }
- late final _getGameResultPtr = _lookup<
- ffi.NativeFunction<
- ffi.Void Function(
- ffi.Int32, ffi.Pointer<ffi.Int32>)>>('getGameResult');
- late final _getGameResult = _getGameResultPtr
- .asFunction<void Function(int, ffi.Pointer<ffi.Int32>)>();
- void getGameDataStr(
- int id,
- ffi.Pointer<ffi.Int8> result,
- ) {
- return _getGameDataStr(
- id,
- result,
- );
- }
- late final _getGameDataStrPtr = _lookup<
- ffi.NativeFunction<
- ffi.Void Function(
- ffi.Int32, ffi.Pointer<ffi.Int8>)>>('getGameDataStr');
- late final _getGameDataStr = _getGameDataStrPtr
- .asFunction<void Function(int, ffi.Pointer<ffi.Int8>)>();
- int getInteractionCMD() {
- return _getInteractionCMD();
- }
- late final _getInteractionCMDPtr =
- _lookup<ffi.NativeFunction<ffi.Int32 Function()>>('getInteractionCMD');
- late final _getInteractionCMD =
- _getInteractionCMDPtr.asFunction<int Function()>();
- void getGameVersion(
- ffi.Pointer<ffi.Int8> version,
- ) {
- return _getGameVersion(
- version,
- );
- }
- late final _getGameVersionPtr =
- _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Int8>)>>(
- 'getGameVersion');
- late final _getGameVersion =
- _getGameVersionPtr.asFunction<void Function(ffi.Pointer<ffi.Int8>)>();
- int getStepFreq(
- int id,
- ) {
- return _getStepFreq(
- id,
- );
- }
- late final _getStepFreqPtr =
- _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>('getStepFreq');
- late final _getStepFreq = _getStepFreqPtr.asFunction<int Function(int)>();
- int getStepCount(
- int id,
- ) {
- return _getStepCount(
- id,
- );
- }
- late final _getStepCountPtr =
- _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>(
- 'getStepCount');
- late final _getStepCount = _getStepCountPtr.asFunction<int Function(int)>();
- int getMotionCount(
- int id,
- int type,
- ) {
- return _getMotionCount(
- id,
- type,
- );
- }
- late final _getMotionCountPtr =
- _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32, ffi.Int32)>>(
- 'getMotionCount');
- late final _getMotionCount =
- _getMotionCountPtr.asFunction<int Function(int, int)>();
- int getGameStepVel(
- int id,
- ) {
- return _getGameStepVel(
- id,
- );
- }
- late final _getGameStepVelPtr =
- _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>(
- 'getGameStepVel');
- late final _getGameStepVel =
- _getGameStepVelPtr.asFunction<int Function(int)>();
- int NativeGetAttX(
- int id,
- ) {
- return _NativeGetAttX(
- id,
- );
- }
- late final _NativeGetAttXPtr =
- _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32)>>(
- 'NativeGetAttX');
- late final _NativeGetAttX = _NativeGetAttXPtr.asFunction<int Function(int)>();
- }
- typedef va_list = ffi.Pointer<ffi.Int8>;
- typedef uintptr_t = ffi.Uint64;
- const int _VCRT_COMPILER_PREPROCESSOR = 1;
- const int _SAL_VERSION = 20;
- const int __SAL_H_VERSION = 180000000;
- const int _USE_DECLSPECS_FOR_SAL = 0;
- const int _USE_ATTRIBUTES_FOR_SAL = 0;
- const int _CRT_PACKING = 8;
- const int _VCRUNTIME_DISABLED_WARNINGS = 4514;
- const int _HAS_EXCEPTIONS = 1;
- const int _WCHAR_T_DEFINED = 1;
- const int NULL = 0;
- const int _HAS_CXX17 = 0;
- const int _HAS_CXX20 = 0;
- const int _HAS_NODISCARD = 1;
- const int INT8_MIN = -128;
- const int INT16_MIN = -32768;
- const int INT32_MIN = -2147483648;
- const int INT64_MIN = -9223372036854775808;
- const int INT8_MAX = 127;
- const int INT16_MAX = 32767;
- const int INT32_MAX = 2147483647;
- const int INT64_MAX = 9223372036854775807;
- const int UINT8_MAX = 255;
- const int UINT16_MAX = 65535;
- const int UINT32_MAX = 4294967295;
- const int UINT64_MAX = -1;
- const int INT_LEAST8_MIN = -128;
- const int INT_LEAST16_MIN = -32768;
- const int INT_LEAST32_MIN = -2147483648;
- const int INT_LEAST64_MIN = -9223372036854775808;
- const int INT_LEAST8_MAX = 127;
- const int INT_LEAST16_MAX = 32767;
- const int INT_LEAST32_MAX = 2147483647;
- const int INT_LEAST64_MAX = 9223372036854775807;
- const int UINT_LEAST8_MAX = 255;
- const int UINT_LEAST16_MAX = 65535;
- const int UINT_LEAST32_MAX = 4294967295;
- const int UINT_LEAST64_MAX = -1;
- const int INT_FAST8_MIN = -128;
- const int INT_FAST16_MIN = -2147483648;
- const int INT_FAST32_MIN = -2147483648;
- const int INT_FAST64_MIN = -9223372036854775808;
- const int INT_FAST8_MAX = 127;
- const int INT_FAST16_MAX = 2147483647;
- const int INT_FAST32_MAX = 2147483647;
- const int INT_FAST64_MAX = 9223372036854775807;
- const int UINT_FAST8_MAX = 255;
- const int UINT_FAST16_MAX = 4294967295;
- const int UINT_FAST32_MAX = 4294967295;
- const int UINT_FAST64_MAX = -1;
- const int INTPTR_MIN = -9223372036854775808;
- const int INTPTR_MAX = 9223372036854775807;
- const int UINTPTR_MAX = -1;
- const int INTMAX_MIN = -9223372036854775808;
- const int INTMAX_MAX = 9223372036854775807;
- const int UINTMAX_MAX = -1;
- const int PTRDIFF_MIN = -9223372036854775808;
- const int PTRDIFF_MAX = 9223372036854775807;
- const int SIZE_MAX = -1;
- const int SIG_ATOMIC_MIN = -2147483648;
- const int SIG_ATOMIC_MAX = 2147483647;
- const int WCHAR_MIN = 0;
- const int WCHAR_MAX = 65535;
- const int WINT_MIN = 0;
- const int WINT_MAX = 65535;
|