| // 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< |
| ffi.Void Function( |
| ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>> |
| unnamed1, |
| ) { |
| return _func( |
| unnamed1, |
| ); |
| } |
| |
| late final _func_ptr = _lookup< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Void Function()>>)>>)>>('func'); |
| late final _func = _func_ptr.asFunction< |
| void Function( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer< |
| ffi.NativeFunction<ffi.Void Function()>>)>>)>(); |
| |
| void funcWithNativeFunc( |
| withTypedefReturnType named, |
| ) { |
| return _funcWithNativeFunc( |
| named, |
| ); |
| } |
| |
| late final _funcWithNativeFunc_ptr = |
| _lookup<ffi.NativeFunction<ffi.Void Function(withTypedefReturnType)>>( |
| 'funcWithNativeFunc'); |
| late final _funcWithNativeFunc = _funcWithNativeFunc_ptr |
| .asFunction<void Function(withTypedefReturnType)>(); |
| } |
| |
| class struc extends ffi.Struct { |
| external ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>> unnamed1; |
| } |
| |
| typedef withTypedefReturnType |
| = ffi.Pointer<ffi.NativeFunction<insideReturnType Function()>>; |
| typedef insideReturnType = ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>; |
| |
| class Struc2 extends ffi.Struct { |
| external VoidFuncPointer constFuncPointer; |
| } |
| |
| typedef VoidFuncPointer = ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>; |