| // AUTO GENERATED FILE, DO NOT EDIT. |
| // |
| // Generated by `package:ffigen`. |
| // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package |
| @ffi.DefaultAsset('package:ffigen/objc_test') |
| library; |
| |
| import 'dart:ffi' as ffi; |
| import 'package:objective_c/objective_c.dart' as objc; |
| import 'package:ffi/ffi.dart' as pkg_ffi; |
| |
| const _$objcVersionCheck = objc.ObjCVersionCheck(9, 6); |
| |
| /// Foo |
| extension type Foo._(objc.ObjCObject object$) |
| implements objc.ObjCObject, objc.NSObject { |
| /// Constructs a [Foo] that points to the same underlying object as [other]. |
| Foo.as(objc.ObjCObject other) : object$ = other { |
| assert(isA(object$)); |
| } |
| |
| /// Constructs a [Foo] that wraps the given raw object pointer. |
| Foo.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 [Foo]. |
| static bool isA(objc.ObjCObject? obj) => obj == null |
| ? false |
| : _objc_msgSend_19nvye5(obj.ref.pointer, _sel_isKindOfClass_, _class_Foo); |
| |
| /// alloc |
| static Foo alloc() { |
| final $ret = _objc_msgSend_151sglz(_class_Foo, _sel_alloc); |
| return Foo.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// allocWithZone: |
| static Foo allocWithZone(ffi.Pointer<objc.NSZone> zone) { |
| final $ret = _objc_msgSend_1cwp428(_class_Foo, _sel_allocWithZone_, zone); |
| return Foo.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// makeFoo: |
| static Foo makeFoo(double x) { |
| final $ret = _objc_msgSend_oa8mke(_class_Foo, _sel_makeFoo_, x); |
| return Foo.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// new |
| static Foo new$() { |
| final $ret = _objc_msgSend_151sglz(_class_Foo, _sel_new); |
| return Foo.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// Returns a new instance of Foo constructed with the default `new` method. |
| Foo() : this.as(new$().object$); |
| } |
| |
| extension Foo$Methods on Foo { |
| /// boolVal |
| bool get boolVal { |
| final _$$ref = object$.ref; |
| return _objc_msgSend_91o635(_$$ref.pointer, _sel_boolVal); |
| } |
| |
| /// classVal |
| objc.ObjCObject get classVal { |
| final _$$ref = object$.ref; |
| final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classVal); |
| return objc.ObjCObject($ret, retain: true, release: true); |
| } |
| |
| /// idVal |
| objc.ObjCObject get idVal { |
| final _$$ref = object$.ref; |
| final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_idVal); |
| return objc.ObjCObject($ret, retain: true, release: true); |
| } |
| |
| /// init |
| Foo init() { |
| final _$$ref = object$.ref; |
| objc.checkOsVersionInternal( |
| 'Foo.init', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 0, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz( |
| _$$ref.retainAndReturnPointer(), |
| _sel_init, |
| ); |
| return Foo.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// intVal |
| int get intVal { |
| final _$$ref = object$.ref; |
| return _objc_msgSend_1gcq84o(_$$ref.pointer, _sel_intVal); |
| } |
| |
| /// multiply:withOtherFoo: |
| int multiply(bool useIntVals, {required Foo withOtherFoo}) { |
| final _$$ref = object$.ref; |
| final _$$ref$1 = withOtherFoo.ref; |
| return _objc_msgSend_1t47e0u( |
| _$$ref.pointer, |
| _sel_multiply_withOtherFoo_, |
| useIntVals, |
| _$$ref$1.pointer, |
| ); |
| } |
| |
| /// objVal |
| objc.NSObject get objVal { |
| final _$$ref = object$.ref; |
| final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objVal); |
| return objc.NSObject.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// selVal |
| ffi.Pointer<objc.ObjCSelector> get selVal { |
| final _$$ref = object$.ref; |
| return _objc_msgSend_1ovaulg(_$$ref.pointer, _sel_selVal); |
| } |
| |
| /// setBoolVal: |
| set boolVal(bool value) { |
| final _$$ref = object$.ref; |
| _objc_msgSend_1s56lr9(_$$ref.pointer, _sel_setBoolVal_, value); |
| } |
| |
| /// setClassVal: |
| set classVal(objc.ObjCObject value) { |
| final _$$ref = object$.ref; |
| final _$$ref$1 = value.ref; |
| _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setClassVal_, _$$ref$1.pointer); |
| } |
| |
| /// setDoubleVal: |
| void setDoubleVal(double x) { |
| final _$$ref = object$.ref; |
| _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setDoubleVal_, x); |
| } |
| |
| /// setIdVal: |
| set idVal(objc.ObjCObject value) { |
| final _$$ref = object$.ref; |
| final _$$ref$1 = value.ref; |
| _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setIdVal_, _$$ref$1.pointer); |
| } |
| |
| /// setIntVal: |
| set intVal(int value) { |
| final _$$ref = object$.ref; |
| _objc_msgSend_1bqef4y(_$$ref.pointer, _sel_setIntVal_, value); |
| } |
| |
| /// setObjVal: |
| set objVal(objc.NSObject value) { |
| final _$$ref = object$.ref; |
| final _$$ref$1 = value.ref; |
| _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setObjVal_, _$$ref$1.pointer); |
| } |
| |
| /// setSelVal: |
| set selVal(ffi.Pointer<objc.ObjCSelector> value) { |
| final _$$ref = object$.ref; |
| _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_setSelVal_, value); |
| } |
| } |
| |
| @ffi.Native<ffi.Pointer<objc.ObjCObjectImpl>>(symbol: 'OBJC_CLASS_\$_Foo') |
| external ffi.Pointer<objc.ObjCObjectImpl> _class_Foo_raw; |
| final _class_Foo = objc.getClass( |
| "Foo", |
| () => ffi.Native.addressOf<ffi.Pointer<objc.ObjCObjectImpl>>( |
| _class_Foo_raw, |
| ).cast(), |
| ); |
| 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_1bqef4y = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Int32, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| int, |
| ) |
| >(); |
| 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_1d9e4oe = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| 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_1ovaulg = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCSelector> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCSelector> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_1s56lr9 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Bool, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| bool, |
| ) |
| >(); |
| final _objc_msgSend_1t47e0u = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Int32 Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Bool, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| int Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| bool, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(); |
| final _objc_msgSend_91o635 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_hwm8nu = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Double, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| double, |
| ) |
| >(); |
| final _objc_msgSend_oa8mke = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Double, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| double, |
| ) |
| >(); |
| final _objc_msgSend_xtuoz7 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(); |
| late final _sel_alloc = objc.registerName("alloc"); |
| late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); |
| late final _sel_boolVal = objc.registerName("boolVal"); |
| late final _sel_classVal = objc.registerName("classVal"); |
| late final _sel_idVal = objc.registerName("idVal"); |
| late final _sel_init = objc.registerName("init"); |
| late final _sel_intVal = objc.registerName("intVal"); |
| late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); |
| late final _sel_makeFoo_ = objc.registerName("makeFoo:"); |
| late final _sel_multiply_withOtherFoo_ = objc.registerName( |
| "multiply:withOtherFoo:", |
| ); |
| late final _sel_new = objc.registerName("new"); |
| late final _sel_objVal = objc.registerName("objVal"); |
| late final _sel_selVal = objc.registerName("selVal"); |
| late final _sel_setBoolVal_ = objc.registerName("setBoolVal:"); |
| late final _sel_setClassVal_ = objc.registerName("setClassVal:"); |
| late final _sel_setDoubleVal_ = objc.registerName("setDoubleVal:"); |
| late final _sel_setIdVal_ = objc.registerName("setIdVal:"); |
| late final _sel_setIntVal_ = objc.registerName("setIntVal:"); |
| late final _sel_setObjVal_ = objc.registerName("setObjVal:"); |
| late final _sel_setSelVal_ = objc.registerName("setSelVal:"); |
| typedef instancetype = ffi.Pointer<objc.ObjCObjectImpl>; |
| typedef Dartinstancetype = objc.ObjCObject; |