| // ignore_for_file: camel_case_types |
| |
| // AUTO GENERATED FILE, DO NOT EDIT. |
| // |
| // Generated by `package:ffigen`. |
| // ignore_for_file: type=lint |
| import 'dart:ffi' as ffi; |
| |
| /// VarArgs 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; |
| |
| int myfunc( |
| int a, |
| int va, |
| ffi.Pointer<ffi.Char> va1, |
| SA va2, |
| ) { |
| return _myfunc( |
| a, |
| va, |
| va1, |
| va2, |
| ); |
| } |
| |
| late final _myfuncPtr = _lookup< |
| ffi.NativeFunction< |
| ffi.Int Function( |
| ffi.Int, |
| ffi.VarArgs< |
| ( |
| ffi.Int, |
| ffi.Pointer<ffi.Char>, |
| SA, |
| )>)>>('myfunc'); |
| late final _myfunc = _myfuncPtr |
| .asFunction<int Function(int, int, ffi.Pointer<ffi.Char>, SA)>(); |
| |
| void myfunc2CharPtrLongPtrPtr( |
| int a, |
| int b, |
| ffi.Pointer<ffi.Char> va, |
| ffi.Pointer<ffi.Pointer<ffi.Long>> va1, |
| ) { |
| return _myfunc2CharPtrLongPtrPtr( |
| a, |
| b, |
| va, |
| va1, |
| ); |
| } |
| |
| late final _myfunc2CharPtrLongPtrPtrPtr = _lookup< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Char, |
| ffi.Char, |
| ffi.VarArgs< |
| ( |
| ffi.Pointer<ffi.Char>, |
| ffi.Pointer<ffi.Pointer<ffi.Long>>, |
| )>)>>('myfunc2'); |
| late final _myfunc2CharPtrLongPtrPtr = |
| _myfunc2CharPtrLongPtrPtrPtr.asFunction< |
| void Function(int, int, ffi.Pointer<ffi.Char>, |
| ffi.Pointer<ffi.Pointer<ffi.Long>>)>(); |
| |
| void myfunc2SAIntPtrUnsignedcharPtrPtr( |
| int a, |
| int b, |
| SA va, |
| ffi.Pointer<ffi.Int> va1, |
| ffi.Pointer<ffi.Pointer<ffi.UnsignedChar>> va2, |
| ) { |
| return _myfunc2SAIntPtrUnsignedcharPtrPtr( |
| a, |
| b, |
| va, |
| va1, |
| va2, |
| ); |
| } |
| |
| late final _myfunc2SAIntPtrUnsignedcharPtrPtrPtr = _lookup< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Char, |
| ffi.Char, |
| ffi.VarArgs< |
| ( |
| SA, |
| ffi.Pointer<ffi.Int>, |
| ffi.Pointer<ffi.Pointer<ffi.UnsignedChar>>, |
| )>)>>('myfunc2'); |
| late final _myfunc2SAIntPtrUnsignedcharPtrPtr = |
| _myfunc2SAIntPtrUnsignedcharPtrPtrPtr.asFunction< |
| void Function(int, int, SA, ffi.Pointer<ffi.Int>, |
| ffi.Pointer<ffi.Pointer<ffi.UnsignedChar>>)>(); |
| |
| void myfunc2_custompostfix( |
| int a, |
| int b, |
| SA va, |
| ffi.Pointer<ffi.Int> va1, |
| ffi.Pointer<ffi.Pointer<ffi.UnsignedChar>> va2, |
| ) { |
| return _myfunc2_custompostfix( |
| a, |
| b, |
| va, |
| va1, |
| va2, |
| ); |
| } |
| |
| late final _myfunc2_custompostfixPtr = _lookup< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Char, |
| ffi.Char, |
| ffi.VarArgs< |
| ( |
| SA, |
| ffi.Pointer<ffi.Int>, |
| ffi.Pointer<ffi.Pointer<ffi.UnsignedChar>>, |
| )>)>>('myfunc2'); |
| late final _myfunc2_custompostfix = _myfunc2_custompostfixPtr.asFunction< |
| void Function(int, int, SA, ffi.Pointer<ffi.Int>, |
| ffi.Pointer<ffi.Pointer<ffi.UnsignedChar>>)>(); |
| |
| void myfunc3Struct_WithLong_Name_testPtrFloatPtr( |
| int a, |
| ffi.Pointer<Struct_WithLong_Name_test> va, |
| ffi.Pointer<ffi.Float> va1, |
| ) { |
| return _myfunc3Struct_WithLong_Name_testPtrFloatPtr( |
| a, |
| va, |
| va1, |
| ); |
| } |
| |
| late final _myfunc3Struct_WithLong_Name_testPtrFloatPtrPtr = _lookup< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Long, |
| ffi.VarArgs< |
| ( |
| ffi.Pointer<Struct_WithLong_Name_test>, |
| ffi.Pointer<ffi.Float>, |
| )>)>>('myfunc3'); |
| late final _myfunc3Struct_WithLong_Name_testPtrFloatPtr = |
| _myfunc3Struct_WithLong_Name_testPtrFloatPtrPtr.asFunction< |
| void Function(int, ffi.Pointer<Struct_WithLong_Name_test>, |
| ffi.Pointer<ffi.Float>)>(); |
| |
| void myfunc3_custompostfix2( |
| int a, |
| Struct_WithLong_Name_test va, |
| ) { |
| return _myfunc3_custompostfix2( |
| a, |
| va, |
| ); |
| } |
| |
| late final _myfunc3_custompostfix2Ptr = _lookup< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Long, ffi.VarArgs<(Struct_WithLong_Name_test,)>)>>('myfunc3'); |
| late final _myfunc3_custompostfix2 = _myfunc3_custompostfix2Ptr |
| .asFunction<void Function(int, Struct_WithLong_Name_test)>(); |
| } |
| |
| final class SA extends ffi.Struct { |
| @ffi.Int() |
| external int a; |
| } |
| |
| final class Struct_WithLong_Name_test extends ffi.Struct { |
| @ffi.Int() |
| external int a; |
| } |