| // AUTO GENERATED FILE, DO NOT EDIT. |
| // |
| // Generated by `package:ffigen`. |
| import 'dart:ffi' as ffi; |
| |
| /// Native Func Typedef 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<ffi.NativeFunction<_typedefC_4>> unnamed1, |
| ) { |
| return _func( |
| unnamed1, |
| ); |
| } |
| |
| late final _func_ptr = _lookup<ffi.NativeFunction<_c_func>>('func'); |
| late final _dart_func _func = _func_ptr.asFunction<_dart_func>(); |
| |
| void funcWithNativeFunc( |
| ffi.Pointer<ffi.NativeFunction<withTypedefReturnType>> named, |
| ) { |
| return _funcWithNativeFunc( |
| named, |
| ); |
| } |
| |
| late final _funcWithNativeFunc_ptr = |
| _lookup<ffi.NativeFunction<_c_funcWithNativeFunc>>('funcWithNativeFunc'); |
| late final _dart_funcWithNativeFunc _funcWithNativeFunc = |
| _funcWithNativeFunc_ptr.asFunction<_dart_funcWithNativeFunc>(); |
| } |
| |
| class struc extends ffi.Struct { |
| external ffi.Pointer<ffi.NativeFunction<_typedefC_2>> unnamed1; |
| } |
| |
| class Struc2 extends ffi.Struct { |
| external ffi.Pointer<ffi.NativeFunction<VoidFuncPointer>> constFuncPointer; |
| } |
| |
| typedef _typedefC_3 = ffi.Void Function(); |
| |
| typedef _typedefC_4 = ffi.Void Function( |
| ffi.Pointer<ffi.NativeFunction<_typedefC_3>>, |
| ); |
| |
| typedef _c_func = ffi.Void Function( |
| ffi.Pointer<ffi.NativeFunction<_typedefC_4>> unnamed1, |
| ); |
| |
| typedef _dart_func = void Function( |
| ffi.Pointer<ffi.NativeFunction<_typedefC_4>> unnamed1, |
| ); |
| |
| typedef insideReturnType = ffi.Void Function(); |
| |
| typedef withTypedefReturnType |
| = ffi.Pointer<ffi.NativeFunction<insideReturnType>> Function(); |
| |
| typedef _c_funcWithNativeFunc = ffi.Void Function( |
| ffi.Pointer<ffi.NativeFunction<withTypedefReturnType>> named, |
| ); |
| |
| typedef _dart_funcWithNativeFunc = void Function( |
| ffi.Pointer<ffi.NativeFunction<withTypedefReturnType>> named, |
| ); |
| |
| typedef _typedefC_1 = ffi.Void Function(); |
| |
| typedef _typedefC_2 = ffi.Void Function( |
| ffi.Pointer<ffi.NativeFunction<_typedefC_1>>, |
| ); |
| |
| typedef VoidFuncPointer = ffi.Void Function(); |