blob: 5fc47cdea450ed71e3336bd03171174d8a01bcd9 [file] [log] [blame]
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
import 'dart:ffi' as ffi;
/// Forward Declaration Test
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 func(
ffi.Pointer<A> a,
int b,
) {
return _func(
a,
b,
);
}
late final _func_ptr = _lookup<ffi.NativeFunction<_c_func>>('func');
late final _dart_func _func = _func_ptr.asFunction<_dart_func>();
}
class A extends ffi.Struct {
@ffi.Int32()
external int a;
@ffi.Int32()
external int b;
}
abstract class B {
static const int a = 0;
static const int b = 1;
}
typedef _c_func = ffi.Void Function(
ffi.Pointer<A> a,
ffi.Int32 b,
);
typedef _dart_func = void Function(
ffi.Pointer<A> a,
int b,
);