| // AUTO GENERATED FILE, DO NOT EDIT. |
| // |
| // Generated by `package:ffigen`. |
| // ignore_for_file: type=lint, unused_import |
| import 'dart:ffi' as ffi; |
| import 'package:objective_c/objective_c.dart' as objc; |
| import 'package:ffi/ffi.dart' as pkg_ffi; |
| |
| /// MethodInterface |
| extension type MethodInterface._(objc.ObjCObject object$) |
| implements objc.ObjCObject, objc.NSObject { |
| /// Constructs a [MethodInterface] that points to the same underlying object as [other]. |
| MethodInterface.as(objc.ObjCObject other) : object$ = other { |
| assert(isA(object$)); |
| } |
| |
| /// Constructs a [MethodInterface] that wraps the given raw object pointer. |
| MethodInterface.fromPointer( |
| ffi.Pointer<objc.ObjCObjectImpl> other, { |
| bool retain = false, |
| bool release = false, |
| }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { |
| assert(isA(object$)); |
| } |
| |
| /// Returns whether [obj] is an instance of [MethodInterface]. |
| static bool isA(objc.ObjCObject? obj) => obj == null |
| ? false |
| : _objc_msgSend_19nvye5( |
| obj.ref.pointer, |
| _sel_isKindOfClass_, |
| _class_MethodInterface, |
| ); |
| |
| /// alloc |
| static MethodInterface alloc() { |
| final $ret = _objc_msgSend_151sglz(_class_MethodInterface, _sel_alloc); |
| return MethodInterface.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// allocWithZone: |
| static MethodInterface allocWithZone(ffi.Pointer<objc.NSZone> zone) { |
| final $ret = _objc_msgSend_1cwp428( |
| _class_MethodInterface, |
| _sel_allocWithZone_, |
| zone, |
| ); |
| return MethodInterface.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// instStaticSameName |
| static int instStaticSameName$1() { |
| return _objc_msgSend_1gcq84o( |
| _class_MethodInterface, |
| _sel_instStaticSameName, |
| ); |
| } |
| |
| /// new |
| static MethodInterface new$() { |
| final $ret = _objc_msgSend_151sglz(_class_MethodInterface, _sel_new); |
| return MethodInterface.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// sub |
| static int sub() { |
| return _objc_msgSend_1gcq84o(_class_MethodInterface, _sel_sub); |
| } |
| |
| /// sub: |
| static int sub$1(int x) { |
| return _objc_msgSend_zo3bvx(_class_MethodInterface, _sel_sub_, x); |
| } |
| |
| /// sub:Y: |
| static int sub$2(int x, {required int Y}) { |
| return _objc_msgSend_1q0lyci(_class_MethodInterface, _sel_sub_Y_, x, Y); |
| } |
| |
| /// sub:Y:Z: |
| static int sub$3(int x, {required int Y, required int Z}) { |
| return _objc_msgSend_b9kbqv(_class_MethodInterface, _sel_sub_Y_Z_, x, Y, Z); |
| } |
| |
| /// Returns a new instance of MethodInterface constructed with the default `new` method. |
| MethodInterface() : this.as(new$().object$); |
| } |
| |
| extension MethodInterface$Methods on MethodInterface { |
| /// Vec4 |
| Vec4 Vec4$1() { |
| final $ptr = pkg_ffi.calloc<Vec4>(); |
| objc.useMsgSendVariants |
| ? _objc_msgSend_o6r21bStret($ptr, object$.ref.pointer, _sel_Vec4) |
| : $ptr.ref = _objc_msgSend_o6r21b(object$.ref.pointer, _sel_Vec4); |
| final $finalizable = $ptr.cast<ffi.Uint8>().asTypedList( |
| ffi.sizeOf<Vec4>(), |
| finalizer: pkg_ffi.calloc.nativeFree, |
| ); |
| return ffi.Struct.create<Vec4>($finalizable); |
| } |
| |
| /// add |
| int add() { |
| return _objc_msgSend_1gcq84o(object$.ref.pointer, _sel_add); |
| } |
| |
| /// add: |
| int add$1(int x) { |
| return _objc_msgSend_zo3bvx(object$.ref.pointer, _sel_add_, x); |
| } |
| |
| /// add:Y: |
| int add$2(int x, {required int Y}) { |
| return _objc_msgSend_1q0lyci(object$.ref.pointer, _sel_add_Y_, x, Y); |
| } |
| |
| /// add:Y:Z: |
| int add$3(int x, {required int Y, required int Z}) { |
| return _objc_msgSend_b9kbqv(object$.ref.pointer, _sel_add_Y_Z_, x, Y, Z); |
| } |
| |
| /// addDoubles:Y: |
| double addDoubles(double x, {required double Y}) { |
| return objc.useMsgSendVariants |
| ? _objc_msgSend_srsdcwFpret( |
| object$.ref.pointer, |
| _sel_addDoubles_Y_, |
| x, |
| Y, |
| ) |
| : _objc_msgSend_srsdcw(object$.ref.pointer, _sel_addDoubles_Y_, x, Y); |
| } |
| |
| /// addFloats:Y: |
| double addFloats(double x, {required double Y}) { |
| return objc.useMsgSendVariants |
| ? _objc_msgSend_sk7f6fFpret( |
| object$.ref.pointer, |
| _sel_addFloats_Y_, |
| x, |
| Y, |
| ) |
| : _objc_msgSend_sk7f6f(object$.ref.pointer, _sel_addFloats_Y_, x, Y); |
| } |
| |
| /// init |
| MethodInterface init() { |
| objc.checkOsVersionInternal( |
| 'MethodInterface.init', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 0, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz( |
| object$.ref.retainAndReturnPointer(), |
| _sel_init, |
| ); |
| return MethodInterface.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// instStaticSameName |
| int instStaticSameName() { |
| return _objc_msgSend_1gcq84o(object$.ref.pointer, _sel_instStaticSameName); |
| } |
| |
| /// twiddleVec4Components: |
| Vec4 twiddleVec4Components(Vec4 v) { |
| final $ptr = pkg_ffi.calloc<Vec4>(); |
| objc.useMsgSendVariants |
| ? _objc_msgSend_ivr5s7Stret( |
| $ptr, |
| object$.ref.pointer, |
| _sel_twiddleVec4Components_, |
| v, |
| ) |
| : $ptr.ref = _objc_msgSend_ivr5s7( |
| object$.ref.pointer, |
| _sel_twiddleVec4Components_, |
| v, |
| ); |
| final $finalizable = $ptr.cast<ffi.Uint8>().asTypedList( |
| ffi.sizeOf<Vec4>(), |
| finalizer: pkg_ffi.calloc.nativeFree, |
| ); |
| return ffi.Struct.create<Vec4>($finalizable); |
| } |
| } |
| |
| final class Vec4 extends ffi.Struct { |
| @ffi.Double() |
| external double x; |
| |
| @ffi.Double() |
| external double y; |
| |
| @ffi.Double() |
| external double z; |
| |
| @ffi.Double() |
| external double w; |
| |
| static ffi.Pointer<Vec4> $allocate( |
| ffi.Allocator $allocator, { |
| required double x, |
| required double y, |
| required double z, |
| required double w, |
| }) => $allocator<Vec4>() |
| ..ref.x = x |
| ..ref.y = y |
| ..ref.z = z |
| ..ref.w = w; |
| } |
| |
| late final _class_MethodInterface = objc.getClass("MethodInterface"); |
| final _objc_msgSend_151sglz = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_19nvye5 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(); |
| final _objc_msgSend_1cwp428 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.NSZone>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.NSZone>, |
| ) |
| >(); |
| final _objc_msgSend_1gcq84o = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Int32 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| int Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_1q0lyci = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Int32 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Int32, |
| ffi.Int32, |
| ) |
| > |
| >() |
| .asFunction< |
| int Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| int, |
| int, |
| ) |
| >(); |
| final _objc_msgSend_b9kbqv = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Int32 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Int32, |
| ffi.Int32, |
| ffi.Int32, |
| ) |
| > |
| >() |
| .asFunction< |
| int Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| int, |
| int, |
| int, |
| ) |
| >(); |
| final _objc_msgSend_ivr5s7 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| Vec4 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| Vec4, |
| ) |
| > |
| >() |
| .asFunction< |
| Vec4 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| Vec4, |
| ) |
| >(); |
| final _objc_msgSend_ivr5s7Stret = objc.msgSendStretPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<Vec4>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| Vec4, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<Vec4>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| Vec4, |
| ) |
| >(); |
| final _objc_msgSend_o6r21b = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| Vec4 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| Vec4 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_o6r21bStret = objc.msgSendStretPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<Vec4>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<Vec4>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_sk7f6f = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Float Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Float, |
| ffi.Float, |
| ) |
| > |
| >() |
| .asFunction< |
| double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| double, |
| double, |
| ) |
| >(); |
| final _objc_msgSend_sk7f6fFpret = objc.msgSendFpretPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Float Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Float, |
| ffi.Float, |
| ) |
| > |
| >() |
| .asFunction< |
| double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| double, |
| double, |
| ) |
| >(); |
| final _objc_msgSend_srsdcw = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Double, |
| ffi.Double, |
| ) |
| > |
| >() |
| .asFunction< |
| double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| double, |
| double, |
| ) |
| >(); |
| final _objc_msgSend_srsdcwFpret = objc.msgSendFpretPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Double, |
| ffi.Double, |
| ) |
| > |
| >() |
| .asFunction< |
| double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| double, |
| double, |
| ) |
| >(); |
| final _objc_msgSend_zo3bvx = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Int32 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Int32, |
| ) |
| > |
| >() |
| .asFunction< |
| int Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| int, |
| ) |
| >(); |
| late final _sel_Vec4 = objc.registerName("Vec4"); |
| late final _sel_add = objc.registerName("add"); |
| late final _sel_addDoubles_Y_ = objc.registerName("addDoubles:Y:"); |
| late final _sel_addFloats_Y_ = objc.registerName("addFloats:Y:"); |
| late final _sel_add_ = objc.registerName("add:"); |
| late final _sel_add_Y_ = objc.registerName("add:Y:"); |
| late final _sel_add_Y_Z_ = objc.registerName("add:Y:Z:"); |
| late final _sel_alloc = objc.registerName("alloc"); |
| late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); |
| late final _sel_init = objc.registerName("init"); |
| late final _sel_instStaticSameName = objc.registerName("instStaticSameName"); |
| late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); |
| late final _sel_new = objc.registerName("new"); |
| late final _sel_sub = objc.registerName("sub"); |
| late final _sel_sub_ = objc.registerName("sub:"); |
| late final _sel_sub_Y_ = objc.registerName("sub:Y:"); |
| late final _sel_sub_Y_Z_ = objc.registerName("sub:Y:Z:"); |
| late final _sel_twiddleVec4Components_ = objc.registerName( |
| "twiddleVec4Components:", |
| ); |
| typedef instancetype = ffi.Pointer<objc.ObjCObjectImpl>; |
| typedef Dartinstancetype = objc.ObjCObject; |