blob: 631aff8b73b87536386edb4dc96a83bd0d8f07f2 [file] [log] [blame]
// ignore_for_file: non_constant_identifier_names, camel_case_types
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
import 'dart:ffi' as ffi;
/// Bindings to `headers/a.h`.
class NativeLibraryA {
/// Holds the symbol lookup function.
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
_lookup;
/// The symbols are looked up in [dynamicLibrary].
NativeLibraryA(ffi.DynamicLibrary dynamicLibrary)
: _lookup = dynamicLibrary.lookup;
/// The symbols are looked up with [lookup].
NativeLibraryA.fromLookup(
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
lookup)
: _lookup = lookup;
void base_func1(
BaseTypedef1 t1,
BaseTypedef2 t2,
) {
return _base_func1(
t1,
t2,
);
}
late final _base_func1Ptr = _lookup<
ffi.NativeFunction<ffi.Void Function(BaseTypedef1, BaseTypedef2)>>(
'base_func1');
late final _base_func1 =
_base_func1Ptr.asFunction<void Function(BaseTypedef1, BaseTypedef2)>();
void a_func1() {
return _a_func1();
}
late final _a_func1Ptr =
_lookup<ffi.NativeFunction<ffi.Void Function()>>('a_func1');
late final _a_func1 = _a_func1Ptr.asFunction<void Function()>();
void a_func2(
BaseStruct2 s,
BaseUnion2 u,
BaseTypedef2 t,
) {
return _a_func2(
s,
u,
t,
);
}
late final _a_func2Ptr = _lookup<
ffi.NativeFunction<
ffi.Void Function(BaseStruct2, BaseUnion2, BaseTypedef2)>>('a_func2');
late final _a_func2 = _a_func2Ptr
.asFunction<void Function(BaseStruct2, BaseUnion2, BaseTypedef2)>();
}
class BaseStruct1 extends ffi.Struct {
@ffi.Int()
external int a;
}
class BaseUnion1 extends ffi.Union {
@ffi.Int()
external int a;
}
class BaseStruct2 extends ffi.Struct {
@ffi.Int()
external int a;
}
class BaseUnion2 extends ffi.Union {
@ffi.Int()
external int a;
}
abstract class BaseEnum {
static const int BASE_ENUM_1 = 0;
static const int BASE_ENUM_2 = 1;
}
typedef BaseTypedef1 = BaseStruct1;
typedef BaseTypedef2 = BaseStruct2;
class A_Struct1 extends ffi.Struct {
@ffi.Int()
external int a;
}
class A_Union1 extends ffi.Union {
@ffi.Int()
external int a;
}
abstract class A_Enum {
static const int A_ENUM_1 = 0;
static const int A_ENUM_2 = 1;
}
const int BASE_MACRO_1 = 1;
const int A_MACRO_1 = 1;