| // AUTO GENERATED FILE, DO NOT EDIT. |
| // |
| // Generated by `package:ffigen`. |
| // ignore_for_file: type=lint, unused_import |
| @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; |
| |
| @ffi.Native< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >() |
| external void _z0xonr_protocolTrampoline_18v1jvf( |
| ffi.Pointer<objc.ObjCObjectImpl> target, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >() |
| external ffi.Pointer<objc.ObjCObjectImpl> _z0xonr_protocolTrampoline_1mbt9g9( |
| ffi.Pointer<objc.ObjCObjectImpl> target, |
| ffi.Pointer<ffi.Void> arg0, |
| ); |
| |
| @ffi.Native< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >() |
| external void _z0xonr_protocolTrampoline_6yc3kd( |
| ffi.Pointer<objc.ObjCObjectImpl> target, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >() |
| external ffi.Pointer<objc.ObjCObjectImpl> _z0xonr_protocolTrampoline_cww6wh( |
| ffi.Pointer<objc.ObjCObjectImpl> target, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >() |
| external ffi.Pointer<objc.ObjCObjectImpl> _z0xonr_protocolTrampoline_xr62hr( |
| ffi.Pointer<objc.ObjCObjectImpl> target, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ); |
| |
| @ffi.Native< |
| EmptyBlock Function(ffi.Pointer<objc.ObjCObjectImpl>, ffi.Pointer<ffi.Void>) |
| >() |
| external EmptyBlock _z0xonr_protocolTrampoline_zb0vvk( |
| ffi.Pointer<objc.ObjCObjectImpl> target, |
| ffi.Pointer<ffi.Void> arg0, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCBlockImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<objc.DOBJC_Context>, |
| ) |
| >(isLeaf: true) |
| external ffi.Pointer<objc.ObjCBlockImpl> _z0xonr_wrapBlockingBlock_18v1jvf( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<objc.ObjCBlockImpl> listnerBlock, |
| ffi.Pointer<objc.DOBJC_Context> context, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCBlockImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<objc.DOBJC_Context>, |
| ) |
| >(isLeaf: true) |
| external ffi.Pointer<objc.ObjCBlockImpl> _z0xonr_wrapBlockingBlock_1pl9qdv( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<objc.ObjCBlockImpl> listnerBlock, |
| ffi.Pointer<objc.DOBJC_Context> context, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCBlockImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<objc.DOBJC_Context>, |
| ) |
| >(isLeaf: true) |
| external ffi.Pointer<objc.ObjCBlockImpl> _z0xonr_wrapBlockingBlock_6yc3kd( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<objc.ObjCBlockImpl> listnerBlock, |
| ffi.Pointer<objc.DOBJC_Context> context, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCBlockImpl> Function(ffi.Pointer<objc.ObjCBlockImpl>) |
| >(isLeaf: true) |
| external ffi.Pointer<objc.ObjCBlockImpl> _z0xonr_wrapListenerBlock_18v1jvf( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCBlockImpl> Function(ffi.Pointer<objc.ObjCBlockImpl>) |
| >(isLeaf: true) |
| external ffi.Pointer<objc.ObjCBlockImpl> _z0xonr_wrapListenerBlock_1pl9qdv( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ); |
| |
| @ffi.Native< |
| ffi.Pointer<objc.ObjCBlockImpl> Function(ffi.Pointer<objc.ObjCBlockImpl>) |
| >(isLeaf: true) |
| external ffi.Pointer<objc.ObjCBlockImpl> _z0xonr_wrapListenerBlock_6yc3kd( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ); |
| |
| @ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>() |
| external void objc_autoreleasePoolPop(ffi.Pointer<ffi.Void> pool); |
| |
| @ffi.Native<ffi.Pointer<ffi.Void> Function()>() |
| external ffi.Pointer<ffi.Void> objc_autoreleasePoolPush(); |
| |
| /// BlockAnnotationTest |
| extension type BlockAnnotationTest._(objc.ObjCObject object$) |
| implements objc.ObjCObject, objc.NSObject { |
| /// Constructs a [BlockAnnotationTest] that points to the same underlying object as [other]. |
| BlockAnnotationTest.as(objc.ObjCObject other) : object$ = other { |
| assert(isA(object$)); |
| } |
| |
| /// Constructs a [BlockAnnotationTest] that wraps the given raw object pointer. |
| BlockAnnotationTest.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 [BlockAnnotationTest]. |
| static bool isA(objc.ObjCObject? obj) => obj == null |
| ? false |
| : _objc_msgSend_19nvye5( |
| obj.ref.pointer, |
| _sel_isKindOfClass_, |
| _class_BlockAnnotationTest, |
| ); |
| |
| /// alloc |
| static BlockAnnotationTest alloc() { |
| final $ret = _objc_msgSend_151sglz(_class_BlockAnnotationTest, _sel_alloc); |
| return BlockAnnotationTest.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// allocWithZone: |
| static BlockAnnotationTest allocWithZone(ffi.Pointer<objc.NSZone> zone) { |
| final $ret = _objc_msgSend_1cwp428( |
| _class_BlockAnnotationTest, |
| _sel_allocWithZone_, |
| zone, |
| ); |
| return BlockAnnotationTest.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// invokeBlockProducer: |
| static DartEmptyBlock invokeBlockProducer( |
| objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > |
| block, |
| ) { |
| final $ret = _objc_msgSend_w08mvv( |
| _class_BlockAnnotationTest, |
| _sel_invokeBlockProducer_, |
| block.ref.pointer, |
| ); |
| return ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// invokeConsumedObjectListenerAsync: |
| static NSThread invokeConsumedObjectListenerAsync( |
| objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> block, |
| ) { |
| final $ret = _objc_msgSend_nnxkei( |
| _class_BlockAnnotationTest, |
| _sel_invokeConsumedObjectListenerAsync_, |
| block.ref.pointer, |
| ); |
| return NSThread.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// invokeConsumedObjectListenerSync: |
| static void invokeConsumedObjectListenerSync( |
| objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> block, |
| ) { |
| _objc_msgSend_f167m6( |
| _class_BlockAnnotationTest, |
| _sel_invokeConsumedObjectListenerSync_, |
| block.ref.pointer, |
| ); |
| } |
| |
| /// invokeConsumedObjectReceiver: |
| static EmptyObject invokeConsumedObjectReceiver( |
| objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject)> |
| block, |
| ) { |
| final $ret = _objc_msgSend_nnxkei( |
| _class_BlockAnnotationTest, |
| _sel_invokeConsumedObjectReceiver_, |
| block.ref.pointer, |
| ); |
| return EmptyObject.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// invokeObjectListenerAsync: |
| static NSThread invokeObjectListenerAsync( |
| objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> block, |
| ) { |
| final $ret = _objc_msgSend_nnxkei( |
| _class_BlockAnnotationTest, |
| _sel_invokeObjectListenerAsync_, |
| block.ref.pointer, |
| ); |
| return NSThread.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// invokeObjectListenerSync: |
| static void invokeObjectListenerSync( |
| objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> block, |
| ) { |
| _objc_msgSend_f167m6( |
| _class_BlockAnnotationTest, |
| _sel_invokeObjectListenerSync_, |
| block.ref.pointer, |
| ); |
| } |
| |
| /// invokeObjectProducer: |
| static EmptyObject invokeObjectProducer( |
| objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> block, |
| ) { |
| final $ret = _objc_msgSend_nnxkei( |
| _class_BlockAnnotationTest, |
| _sel_invokeObjectProducer_, |
| block.ref.pointer, |
| ); |
| return EmptyObject.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// invokeObjectReceiver: |
| static EmptyObject invokeObjectReceiver( |
| objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject)> |
| block, |
| ) { |
| final $ret = _objc_msgSend_nnxkei( |
| _class_BlockAnnotationTest, |
| _sel_invokeObjectReceiver_, |
| block.ref.pointer, |
| ); |
| return EmptyObject.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// invokeRetainedBlockProducer: |
| static DartEmptyBlock invokeRetainedBlockProducer( |
| objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > |
| block, |
| ) { |
| final $ret = _objc_msgSend_w08mvv( |
| _class_BlockAnnotationTest, |
| _sel_invokeRetainedBlockProducer_, |
| block.ref.pointer, |
| ); |
| return ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// invokeRetainedObjectProducer: |
| static EmptyObject invokeRetainedObjectProducer( |
| objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> block, |
| ) { |
| final $ret = _objc_msgSend_nnxkei( |
| _class_BlockAnnotationTest, |
| _sel_invokeRetainedObjectProducer_, |
| block.ref.pointer, |
| ); |
| return EmptyObject.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// new |
| static BlockAnnotationTest new$() { |
| final $ret = _objc_msgSend_151sglz(_class_BlockAnnotationTest, _sel_new); |
| return BlockAnnotationTest.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// newBlockProducer |
| static objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > |
| newBlockProducer() { |
| final $ret = _objc_msgSend_uwvaik( |
| _class_BlockAnnotationTest, |
| _sel_newBlockProducer, |
| ); |
| return ObjCBlock_EmptyBlock_ffiVoid.fromPointer( |
| $ret, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// newConsumedObjectReceiver |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| > |
| newConsumedObjectReceiver() { |
| final $ret = _objc_msgSend_uwvaik( |
| _class_BlockAnnotationTest, |
| _sel_newConsumedObjectReceiver, |
| ); |
| return ObjCBlock_EmptyObject_ffiVoid_EmptyObject.fromPointer( |
| $ret, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// newObjectProducer |
| static objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> |
| newObjectProducer() { |
| final $ret = _objc_msgSend_uwvaik( |
| _class_BlockAnnotationTest, |
| _sel_newObjectProducer, |
| ); |
| return ObjCBlock_EmptyObject_ffiVoid.fromPointer( |
| $ret, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// newObjectReceiver |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| > |
| newObjectReceiver() { |
| final $ret = _objc_msgSend_uwvaik( |
| _class_BlockAnnotationTest, |
| _sel_newObjectReceiver, |
| ); |
| return ObjCBlock_EmptyObject_ffiVoid_EmptyObject.fromPointer( |
| $ret, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// newRetainedBlockProducer |
| static objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > |
| newRetainedBlockProducer() { |
| final $ret = _objc_msgSend_uwvaik( |
| _class_BlockAnnotationTest, |
| _sel_newRetainedBlockProducer, |
| ); |
| return ObjCBlock_EmptyBlock_ffiVoid.fromPointer( |
| $ret, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// newRetainedObjectProducer |
| static objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> |
| newRetainedObjectProducer() { |
| final $ret = _objc_msgSend_uwvaik( |
| _class_BlockAnnotationTest, |
| _sel_newRetainedObjectProducer, |
| ); |
| return ObjCBlock_EmptyObject_ffiVoid.fromPointer( |
| $ret, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// Returns a new instance of BlockAnnotationTest constructed with the default `new` method. |
| BlockAnnotationTest() : this.as(new$().object$); |
| } |
| |
| extension BlockAnnotationTest$Methods on BlockAnnotationTest { |
| /// init |
| BlockAnnotationTest init() { |
| objc.checkOsVersionInternal( |
| 'BlockAnnotationTest.init', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 0, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz( |
| object$.ref.retainAndReturnPointer(), |
| _sel_init, |
| ); |
| return BlockAnnotationTest.fromPointer($ret, retain: false, release: true); |
| } |
| } |
| |
| /// BlockAnnotationTestProtocol |
| extension type BlockAnnotationTestProtocol._(objc.ObjCProtocol object$) |
| implements objc.ObjCProtocol, objc.NSObjectProtocol { |
| /// Constructs a [BlockAnnotationTestProtocol] that points to the same underlying object as [other]. |
| BlockAnnotationTestProtocol.as(objc.ObjCObject other) : object$ = other; |
| |
| /// Constructs a [BlockAnnotationTestProtocol] that wraps the given raw object pointer. |
| BlockAnnotationTestProtocol.fromPointer( |
| ffi.Pointer<objc.ObjCObjectImpl> other, { |
| bool retain = false, |
| bool release = false, |
| }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); |
| |
| /// Returns whether [obj] is an instance of [BlockAnnotationTestProtocol]. |
| static bool conformsTo(objc.ObjCObject obj) { |
| return _objc_msgSend_e3qsqz( |
| obj.ref.pointer, |
| _sel_conformsToProtocol_, |
| _protocol_BlockAnnotationTestProtocol, |
| ); |
| } |
| } |
| |
| extension BlockAnnotationTestProtocol$Methods on BlockAnnotationTestProtocol { |
| /// listenConsumedObject: |
| void listenConsumedObject(EmptyObject obj) { |
| _objc_msgSend_4js6t( |
| object$.ref.pointer, |
| _sel_listenConsumedObject_, |
| obj.ref.retainAndReturnPointer(), |
| ); |
| } |
| |
| /// listenObject: |
| void listenObject(EmptyObject obj) { |
| _objc_msgSend_xtuoz7( |
| object$.ref.pointer, |
| _sel_listenObject_, |
| obj.ref.pointer, |
| ); |
| } |
| |
| /// produceBlock |
| DartEmptyBlock produceBlock() { |
| final $ret = _objc_msgSend_uwvaik(object$.ref.pointer, _sel_produceBlock); |
| return ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// produceObject |
| EmptyObject produceObject() { |
| final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_produceObject); |
| return EmptyObject.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// produceRetainedBlock |
| DartEmptyBlock produceRetainedBlock() { |
| final $ret = _objc_msgSend_uwvaik( |
| object$.ref.pointer, |
| _sel_produceRetainedBlock, |
| ); |
| return ObjCBlock_ffiVoid.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// produceRetainedObject |
| EmptyObject produceRetainedObject() { |
| final $ret = _objc_msgSend_151sglz( |
| object$.ref.pointer, |
| _sel_produceRetainedObject, |
| ); |
| return EmptyObject.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// receiveConsumedObject: |
| EmptyObject receiveConsumedObject(EmptyObject obj) { |
| final $ret = _objc_msgSend_1ploomx( |
| object$.ref.pointer, |
| _sel_receiveConsumedObject_, |
| obj.ref.retainAndReturnPointer(), |
| ); |
| return EmptyObject.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// receiveObject: |
| EmptyObject receiveObject(EmptyObject obj) { |
| final $ret = _objc_msgSend_1sotr3r( |
| object$.ref.pointer, |
| _sel_receiveObject_, |
| obj.ref.pointer, |
| ); |
| return EmptyObject.fromPointer($ret, retain: true, release: true); |
| } |
| } |
| |
| interface class BlockAnnotationTestProtocol$Builder { |
| /// Returns the [objc.Protocol] object for this protocol. |
| static objc.Protocol get $protocol => |
| objc.Protocol.fromPointer(_protocol_BlockAnnotationTestProtocol.cast()); |
| |
| /// Builds an object that implements the BlockAnnotationTestProtocol protocol. To implement |
| /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. |
| /// |
| /// If `$keepIsolateAlive` is true, this protocol will keep this isolate |
| /// alive until it is garbage collected by both Dart and ObjC. |
| static BlockAnnotationTestProtocol implement({ |
| required void Function(EmptyObject) listenConsumedObject_, |
| required void Function(EmptyObject) listenObject_, |
| required DartEmptyBlock Function() produceBlock, |
| required EmptyObject Function() produceObject, |
| required DartEmptyBlock Function() produceRetainedBlock, |
| required EmptyObject Function() produceRetainedObject, |
| required EmptyObject Function(EmptyObject) receiveConsumedObject_, |
| required EmptyObject Function(EmptyObject) receiveObject_, |
| bool $keepIsolateAlive = true, |
| }) { |
| final builder = objc.ObjCProtocolBuilder( |
| debugName: 'BlockAnnotationTestProtocol', |
| ); |
| BlockAnnotationTestProtocol$Builder.listenConsumedObject_.implement( |
| builder, |
| listenConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.listenObject_.implement( |
| builder, |
| listenObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceBlock.implement( |
| builder, |
| produceBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceObject.implement( |
| builder, |
| produceObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedBlock.implement( |
| builder, |
| produceRetainedBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedObject.implement( |
| builder, |
| produceRetainedObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveConsumedObject_.implement( |
| builder, |
| receiveConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveObject_.implement( |
| builder, |
| receiveObject_, |
| ); |
| builder.addProtocol($protocol); |
| return BlockAnnotationTestProtocol.as( |
| builder.build(keepIsolateAlive: $keepIsolateAlive), |
| ); |
| } |
| |
| /// Adds the implementation of the BlockAnnotationTestProtocol protocol to an existing |
| /// [objc.ObjCProtocolBuilder]. |
| /// |
| /// Note: You cannot call this method after you have called `builder.build`. |
| static void addToBuilder( |
| objc.ObjCProtocolBuilder builder, { |
| required void Function(EmptyObject) listenConsumedObject_, |
| required void Function(EmptyObject) listenObject_, |
| required DartEmptyBlock Function() produceBlock, |
| required EmptyObject Function() produceObject, |
| required DartEmptyBlock Function() produceRetainedBlock, |
| required EmptyObject Function() produceRetainedObject, |
| required EmptyObject Function(EmptyObject) receiveConsumedObject_, |
| required EmptyObject Function(EmptyObject) receiveObject_, |
| bool $keepIsolateAlive = true, |
| }) { |
| BlockAnnotationTestProtocol$Builder.listenConsumedObject_.implement( |
| builder, |
| listenConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.listenObject_.implement( |
| builder, |
| listenObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceBlock.implement( |
| builder, |
| produceBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceObject.implement( |
| builder, |
| produceObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedBlock.implement( |
| builder, |
| produceRetainedBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedObject.implement( |
| builder, |
| produceRetainedObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveConsumedObject_.implement( |
| builder, |
| receiveConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveObject_.implement( |
| builder, |
| receiveObject_, |
| ); |
| builder.addProtocol($protocol); |
| } |
| |
| /// Builds an object that implements the BlockAnnotationTestProtocol protocol. To implement |
| /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All |
| /// methods that can be implemented as listeners will be. |
| /// |
| /// If `$keepIsolateAlive` is true, this protocol will keep this isolate |
| /// alive until it is garbage collected by both Dart and ObjC. |
| static BlockAnnotationTestProtocol implementAsListener({ |
| required void Function(EmptyObject) listenConsumedObject_, |
| required void Function(EmptyObject) listenObject_, |
| required DartEmptyBlock Function() produceBlock, |
| required EmptyObject Function() produceObject, |
| required DartEmptyBlock Function() produceRetainedBlock, |
| required EmptyObject Function() produceRetainedObject, |
| required EmptyObject Function(EmptyObject) receiveConsumedObject_, |
| required EmptyObject Function(EmptyObject) receiveObject_, |
| bool $keepIsolateAlive = true, |
| }) { |
| final builder = objc.ObjCProtocolBuilder( |
| debugName: 'BlockAnnotationTestProtocol', |
| ); |
| BlockAnnotationTestProtocol$Builder.listenConsumedObject_ |
| .implementAsListener(builder, listenConsumedObject_); |
| BlockAnnotationTestProtocol$Builder.listenObject_.implementAsListener( |
| builder, |
| listenObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceBlock.implement( |
| builder, |
| produceBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceObject.implement( |
| builder, |
| produceObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedBlock.implement( |
| builder, |
| produceRetainedBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedObject.implement( |
| builder, |
| produceRetainedObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveConsumedObject_.implement( |
| builder, |
| receiveConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveObject_.implement( |
| builder, |
| receiveObject_, |
| ); |
| builder.addProtocol($protocol); |
| return BlockAnnotationTestProtocol.as( |
| builder.build(keepIsolateAlive: $keepIsolateAlive), |
| ); |
| } |
| |
| /// Adds the implementation of the BlockAnnotationTestProtocol protocol to an existing |
| /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will |
| /// be. |
| /// |
| /// Note: You cannot call this method after you have called `builder.build`. |
| static void addToBuilderAsListener( |
| objc.ObjCProtocolBuilder builder, { |
| required void Function(EmptyObject) listenConsumedObject_, |
| required void Function(EmptyObject) listenObject_, |
| required DartEmptyBlock Function() produceBlock, |
| required EmptyObject Function() produceObject, |
| required DartEmptyBlock Function() produceRetainedBlock, |
| required EmptyObject Function() produceRetainedObject, |
| required EmptyObject Function(EmptyObject) receiveConsumedObject_, |
| required EmptyObject Function(EmptyObject) receiveObject_, |
| bool $keepIsolateAlive = true, |
| }) { |
| BlockAnnotationTestProtocol$Builder.listenConsumedObject_ |
| .implementAsListener(builder, listenConsumedObject_); |
| BlockAnnotationTestProtocol$Builder.listenObject_.implementAsListener( |
| builder, |
| listenObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceBlock.implement( |
| builder, |
| produceBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceObject.implement( |
| builder, |
| produceObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedBlock.implement( |
| builder, |
| produceRetainedBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedObject.implement( |
| builder, |
| produceRetainedObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveConsumedObject_.implement( |
| builder, |
| receiveConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveObject_.implement( |
| builder, |
| receiveObject_, |
| ); |
| builder.addProtocol($protocol); |
| } |
| |
| /// Builds an object that implements the BlockAnnotationTestProtocol protocol. To implement |
| /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All |
| /// methods that can be implemented as blocking listeners will be. |
| /// |
| /// If `$keepIsolateAlive` is true, this protocol will keep this isolate |
| /// alive until it is garbage collected by both Dart and ObjC. |
| static BlockAnnotationTestProtocol implementAsBlocking({ |
| required void Function(EmptyObject) listenConsumedObject_, |
| required void Function(EmptyObject) listenObject_, |
| required DartEmptyBlock Function() produceBlock, |
| required EmptyObject Function() produceObject, |
| required DartEmptyBlock Function() produceRetainedBlock, |
| required EmptyObject Function() produceRetainedObject, |
| required EmptyObject Function(EmptyObject) receiveConsumedObject_, |
| required EmptyObject Function(EmptyObject) receiveObject_, |
| bool $keepIsolateAlive = true, |
| }) { |
| final builder = objc.ObjCProtocolBuilder( |
| debugName: 'BlockAnnotationTestProtocol', |
| ); |
| BlockAnnotationTestProtocol$Builder.listenConsumedObject_ |
| .implementAsBlocking(builder, listenConsumedObject_); |
| BlockAnnotationTestProtocol$Builder.listenObject_.implementAsBlocking( |
| builder, |
| listenObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceBlock.implement( |
| builder, |
| produceBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceObject.implement( |
| builder, |
| produceObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedBlock.implement( |
| builder, |
| produceRetainedBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedObject.implement( |
| builder, |
| produceRetainedObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveConsumedObject_.implement( |
| builder, |
| receiveConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveObject_.implement( |
| builder, |
| receiveObject_, |
| ); |
| builder.addProtocol($protocol); |
| return BlockAnnotationTestProtocol.as( |
| builder.build(keepIsolateAlive: $keepIsolateAlive), |
| ); |
| } |
| |
| /// Adds the implementation of the BlockAnnotationTestProtocol protocol to an existing |
| /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking |
| /// listeners will be. |
| /// |
| /// Note: You cannot call this method after you have called `builder.build`. |
| static void addToBuilderAsBlocking( |
| objc.ObjCProtocolBuilder builder, { |
| required void Function(EmptyObject) listenConsumedObject_, |
| required void Function(EmptyObject) listenObject_, |
| required DartEmptyBlock Function() produceBlock, |
| required EmptyObject Function() produceObject, |
| required DartEmptyBlock Function() produceRetainedBlock, |
| required EmptyObject Function() produceRetainedObject, |
| required EmptyObject Function(EmptyObject) receiveConsumedObject_, |
| required EmptyObject Function(EmptyObject) receiveObject_, |
| bool $keepIsolateAlive = true, |
| }) { |
| BlockAnnotationTestProtocol$Builder.listenConsumedObject_ |
| .implementAsBlocking(builder, listenConsumedObject_); |
| BlockAnnotationTestProtocol$Builder.listenObject_.implementAsBlocking( |
| builder, |
| listenObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceBlock.implement( |
| builder, |
| produceBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceObject.implement( |
| builder, |
| produceObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedBlock.implement( |
| builder, |
| produceRetainedBlock, |
| ); |
| BlockAnnotationTestProtocol$Builder.produceRetainedObject.implement( |
| builder, |
| produceRetainedObject, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveConsumedObject_.implement( |
| builder, |
| receiveConsumedObject_, |
| ); |
| BlockAnnotationTestProtocol$Builder.receiveObject_.implement( |
| builder, |
| receiveObject_, |
| ); |
| builder.addProtocol($protocol); |
| } |
| |
| /// listenConsumedObject: |
| static final listenConsumedObject_ = |
| objc.ObjCProtocolListenableMethod<void Function(EmptyObject)>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_listenConsumedObject_, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_6yc3kd) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_listenConsumedObject_, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (void Function(EmptyObject) func) => |
| ObjCBlock_ffiVoid_ffiVoid_EmptyObject$1.fromFunction( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| (void Function(EmptyObject) func) => |
| ObjCBlock_ffiVoid_ffiVoid_EmptyObject$1.listener( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| (void Function(EmptyObject) func) => |
| ObjCBlock_ffiVoid_ffiVoid_EmptyObject$1.blocking( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| ); |
| |
| /// listenObject: |
| static final listenObject_ = |
| objc.ObjCProtocolListenableMethod<void Function(EmptyObject)>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_listenObject_, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_18v1jvf) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_listenObject_, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (void Function(EmptyObject) func) => |
| ObjCBlock_ffiVoid_ffiVoid_EmptyObject.fromFunction( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| (void Function(EmptyObject) func) => |
| ObjCBlock_ffiVoid_ffiVoid_EmptyObject.listener( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| (void Function(EmptyObject) func) => |
| ObjCBlock_ffiVoid_ffiVoid_EmptyObject.blocking( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| ); |
| |
| /// produceBlock |
| static final produceBlock = |
| objc.ObjCProtocolMethod<DartEmptyBlock Function()>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceBlock, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_zb0vvk) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceBlock, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (DartEmptyBlock Function() func) => |
| ObjCBlock_EmptyBlock_ffiVoid.fromFunction( |
| (ffi.Pointer<ffi.Void> _) => func(), |
| ), |
| ); |
| |
| /// produceObject |
| static final produceObject = objc.ObjCProtocolMethod<EmptyObject Function()>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceObject, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_1mbt9g9) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceObject, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (EmptyObject Function() func) => ObjCBlock_EmptyObject_ffiVoid.fromFunction( |
| (ffi.Pointer<ffi.Void> _) => func(), |
| ), |
| ); |
| |
| /// produceRetainedBlock |
| static final produceRetainedBlock = |
| objc.ObjCProtocolMethod<DartEmptyBlock Function()>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceRetainedBlock, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_zb0vvk) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceRetainedBlock, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (DartEmptyBlock Function() func) => |
| ObjCBlock_EmptyBlock_ffiVoid$1.fromFunction( |
| (ffi.Pointer<ffi.Void> _) => func(), |
| ), |
| ); |
| |
| /// produceRetainedObject |
| static final produceRetainedObject = |
| objc.ObjCProtocolMethod<EmptyObject Function()>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceRetainedObject, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_1mbt9g9) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_produceRetainedObject, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (EmptyObject Function() func) => |
| ObjCBlock_EmptyObject_ffiVoid$1.fromFunction( |
| (ffi.Pointer<ffi.Void> _) => func(), |
| ), |
| ); |
| |
| /// receiveConsumedObject: |
| static final receiveConsumedObject_ = |
| objc.ObjCProtocolMethod<EmptyObject Function(EmptyObject)>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_receiveConsumedObject_, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_cww6wh) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_receiveConsumedObject_, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (EmptyObject Function(EmptyObject) func) => |
| ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1.fromFunction( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| ); |
| |
| /// receiveObject: |
| static final receiveObject_ = |
| objc.ObjCProtocolMethod<EmptyObject Function(EmptyObject)>( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_receiveObject_, |
| ffi.Native.addressOf< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >(_z0xonr_protocolTrampoline_xr62hr) |
| .cast(), |
| objc.getProtocolMethodSignature( |
| _protocol_BlockAnnotationTestProtocol, |
| _sel_receiveObject_, |
| isRequired: true, |
| isInstanceMethod: true, |
| ), |
| (EmptyObject Function(EmptyObject) func) => |
| ObjCBlock_EmptyObject_ffiVoid_EmptyObject.fromFunction( |
| (ffi.Pointer<ffi.Void> _, EmptyObject arg1) => func(arg1), |
| ), |
| ); |
| } |
| |
| typedef EmptyBlock = ffi.Pointer<objc.ObjCBlockImpl>; |
| typedef DartEmptyBlock = objc.ObjCBlock<ffi.Void Function()>; |
| |
| /// EmptyObject |
| extension type EmptyObject._(objc.ObjCObject object$) |
| implements objc.ObjCObject, objc.NSObject { |
| /// Constructs a [EmptyObject] that points to the same underlying object as [other]. |
| EmptyObject.as(objc.ObjCObject other) : object$ = other { |
| assert(isA(object$)); |
| } |
| |
| /// Constructs a [EmptyObject] that wraps the given raw object pointer. |
| EmptyObject.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 [EmptyObject]. |
| static bool isA(objc.ObjCObject? obj) => obj == null |
| ? false |
| : _objc_msgSend_19nvye5( |
| obj.ref.pointer, |
| _sel_isKindOfClass_, |
| _class_EmptyObject, |
| ); |
| |
| /// alloc |
| static EmptyObject alloc() { |
| final $ret = _objc_msgSend_151sglz(_class_EmptyObject, _sel_alloc); |
| return EmptyObject.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// allocWithZone: |
| static EmptyObject allocWithZone(ffi.Pointer<objc.NSZone> zone) { |
| final $ret = _objc_msgSend_1cwp428( |
| _class_EmptyObject, |
| _sel_allocWithZone_, |
| zone, |
| ); |
| return EmptyObject.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// new |
| static EmptyObject new$() { |
| final $ret = _objc_msgSend_151sglz(_class_EmptyObject, _sel_new); |
| return EmptyObject.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// Returns a new instance of EmptyObject constructed with the default `new` method. |
| EmptyObject() : this.as(new$().object$); |
| } |
| |
| extension EmptyObject$Methods on EmptyObject { |
| /// init |
| EmptyObject init() { |
| objc.checkOsVersionInternal( |
| 'EmptyObject.init', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 0, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz( |
| object$.ref.retainAndReturnPointer(), |
| _sel_init, |
| ); |
| return EmptyObject.fromPointer($ret, retain: false, release: true); |
| } |
| } |
| |
| /// NSThread |
| extension type NSThread._(objc.ObjCObject object$) |
| implements objc.ObjCObject, objc.NSObject { |
| /// Constructs a [NSThread] that points to the same underlying object as [other]. |
| NSThread.as(objc.ObjCObject other) : object$ = other { |
| assert(isA(object$)); |
| } |
| |
| /// Constructs a [NSThread] that wraps the given raw object pointer. |
| NSThread.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 [NSThread]. |
| static bool isA(objc.ObjCObject? obj) => obj == null |
| ? false |
| : _objc_msgSend_19nvye5( |
| obj.ref.pointer, |
| _sel_isKindOfClass_, |
| _class_NSThread, |
| ); |
| |
| /// alloc |
| static NSThread alloc() { |
| final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); |
| return NSThread.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// allocWithZone: |
| static NSThread allocWithZone(ffi.Pointer<objc.NSZone> zone) { |
| final $ret = _objc_msgSend_1cwp428( |
| _class_NSThread, |
| _sel_allocWithZone_, |
| zone, |
| ); |
| return NSThread.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// callStackReturnAddresses |
| static objc.NSArray getCallStackReturnAddresses() { |
| objc.checkOsVersionInternal( |
| 'NSThread.callStackReturnAddresses', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz( |
| _class_NSThread, |
| _sel_callStackReturnAddresses, |
| ); |
| return objc.NSArray.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// callStackSymbols |
| static objc.NSArray getCallStackSymbols() { |
| objc.checkOsVersionInternal( |
| 'NSThread.callStackSymbols', |
| iOS: (false, (4, 0, 0)), |
| macOS: (false, (10, 6, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); |
| return objc.NSArray.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// currentThread |
| static NSThread getCurrentThread() { |
| final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); |
| return NSThread.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// detachNewThreadSelector:toTarget:withObject: |
| static void detachNewThreadSelector( |
| ffi.Pointer<objc.ObjCSelector> selector, { |
| required objc.ObjCObject toTarget, |
| objc.ObjCObject? withObject, |
| }) { |
| _objc_msgSend_lzbvjm( |
| _class_NSThread, |
| _sel_detachNewThreadSelector_toTarget_withObject_, |
| selector, |
| toTarget.ref.pointer, |
| withObject?.ref.pointer ?? ffi.nullptr, |
| ); |
| } |
| |
| /// detachNewThreadWithBlock: |
| static void detachNewThreadWithBlock( |
| objc.ObjCBlock<ffi.Void Function()> block, |
| ) { |
| objc.checkOsVersionInternal( |
| 'NSThread.detachNewThreadWithBlock:', |
| iOS: (false, (10, 0, 0)), |
| macOS: (false, (10, 12, 0)), |
| ); |
| _objc_msgSend_f167m6( |
| _class_NSThread, |
| _sel_detachNewThreadWithBlock_, |
| block.ref.pointer, |
| ); |
| } |
| |
| /// exit |
| static void exit() { |
| _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); |
| } |
| |
| /// isMainThread |
| static bool getIsMainThread$1() { |
| objc.checkOsVersionInternal( |
| 'NSThread.isMainThread', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); |
| } |
| |
| /// isMultiThreaded |
| static bool isMultiThreaded() { |
| return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); |
| } |
| |
| /// mainThread |
| static NSThread getMainThread() { |
| objc.checkOsVersionInternal( |
| 'NSThread.mainThread', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); |
| return NSThread.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// new |
| static NSThread new$() { |
| final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); |
| return NSThread.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// setThreadPriority: |
| static bool setThreadPriority(double p) { |
| return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); |
| } |
| |
| /// sleepForTimeInterval: |
| static void sleepForTimeInterval(double ti) { |
| _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); |
| } |
| |
| /// sleepUntilDate: |
| static void sleepUntilDate(objc.NSDate date) { |
| _objc_msgSend_xtuoz7( |
| _class_NSThread, |
| _sel_sleepUntilDate_, |
| date.ref.pointer, |
| ); |
| } |
| |
| /// threadPriority |
| static double threadPriority$1() { |
| return objc.useMsgSendVariants |
| ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) |
| : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); |
| } |
| |
| /// Returns a new instance of NSThread constructed with the default `new` method. |
| NSThread() : this.as(new$().object$); |
| } |
| |
| extension NSThread$Methods on NSThread { |
| /// cancel |
| void cancel() { |
| objc.checkOsVersionInternal( |
| 'NSThread.cancel', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| _objc_msgSend_1pl9qdv(object$.ref.pointer, _sel_cancel); |
| } |
| |
| /// init |
| NSThread init() { |
| objc.checkOsVersionInternal( |
| 'NSThread.init', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 0, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz( |
| object$.ref.retainAndReturnPointer(), |
| _sel_init, |
| ); |
| return NSThread.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// initWithBlock: |
| NSThread initWithBlock(objc.ObjCBlock<ffi.Void Function()> block) { |
| objc.checkOsVersionInternal( |
| 'NSThread.initWithBlock:', |
| iOS: (false, (10, 0, 0)), |
| macOS: (false, (10, 12, 0)), |
| ); |
| final $ret = _objc_msgSend_nnxkei( |
| object$.ref.retainAndReturnPointer(), |
| _sel_initWithBlock_, |
| block.ref.pointer, |
| ); |
| return NSThread.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// initWithTarget:selector:object: |
| NSThread initWithTarget( |
| objc.ObjCObject target, { |
| required ffi.Pointer<objc.ObjCSelector> selector, |
| objc.ObjCObject? object, |
| }) { |
| objc.checkOsVersionInternal( |
| 'NSThread.initWithTarget:selector:object:', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| final $ret = _objc_msgSend_1eldwyi( |
| object$.ref.retainAndReturnPointer(), |
| _sel_initWithTarget_selector_object_, |
| target.ref.pointer, |
| selector, |
| object?.ref.pointer ?? ffi.nullptr, |
| ); |
| return NSThread.fromPointer($ret, retain: false, release: true); |
| } |
| |
| /// isCancelled |
| bool get isCancelled { |
| objc.checkOsVersionInternal( |
| 'NSThread.isCancelled', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| return _objc_msgSend_91o635(object$.ref.pointer, _sel_isCancelled); |
| } |
| |
| /// isExecuting |
| bool get isExecuting { |
| objc.checkOsVersionInternal( |
| 'NSThread.isExecuting', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| return _objc_msgSend_91o635(object$.ref.pointer, _sel_isExecuting); |
| } |
| |
| /// isFinished |
| bool get isFinished { |
| objc.checkOsVersionInternal( |
| 'NSThread.isFinished', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| return _objc_msgSend_91o635(object$.ref.pointer, _sel_isFinished); |
| } |
| |
| /// isMainThread |
| bool get isMainThread { |
| objc.checkOsVersionInternal( |
| 'NSThread.isMainThread', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| return _objc_msgSend_91o635(object$.ref.pointer, _sel_isMainThread); |
| } |
| |
| /// main |
| void main() { |
| objc.checkOsVersionInternal( |
| 'NSThread.main', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| _objc_msgSend_1pl9qdv(object$.ref.pointer, _sel_main); |
| } |
| |
| /// name |
| objc.NSString? get name { |
| objc.checkOsVersionInternal( |
| 'NSThread.name', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_name); |
| return $ret.address == 0 |
| ? null |
| : objc.NSString.fromPointer($ret, retain: true, release: true); |
| } |
| |
| /// qualityOfService |
| objc.NSQualityOfService get qualityOfService { |
| objc.checkOsVersionInternal( |
| 'NSThread.qualityOfService', |
| iOS: (false, (8, 0, 0)), |
| macOS: (false, (10, 10, 0)), |
| ); |
| final $ret = _objc_msgSend_oi8iq9( |
| object$.ref.pointer, |
| _sel_qualityOfService, |
| ); |
| return objc.NSQualityOfService.fromValue($ret); |
| } |
| |
| /// setName: |
| set name(objc.NSString? value) { |
| objc.checkOsVersionInternal( |
| 'NSThread.setName:', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| _objc_msgSend_xtuoz7( |
| object$.ref.pointer, |
| _sel_setName_, |
| value?.ref.pointer ?? ffi.nullptr, |
| ); |
| } |
| |
| /// setQualityOfService: |
| set qualityOfService(objc.NSQualityOfService value) { |
| objc.checkOsVersionInternal( |
| 'NSThread.setQualityOfService:', |
| iOS: (false, (8, 0, 0)), |
| macOS: (false, (10, 10, 0)), |
| ); |
| _objc_msgSend_n2da1l( |
| object$.ref.pointer, |
| _sel_setQualityOfService_, |
| value.value, |
| ); |
| } |
| |
| /// setStackSize: |
| set stackSize(int value) { |
| objc.checkOsVersionInternal( |
| 'NSThread.setStackSize:', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| _objc_msgSend_1i9r4xy(object$.ref.pointer, _sel_setStackSize_, value); |
| } |
| |
| /// setThreadPriority: |
| set threadPriority(double value) { |
| objc.checkOsVersionInternal( |
| 'NSThread.setThreadPriority:', |
| iOS: (false, (4, 0, 0)), |
| macOS: (false, (10, 6, 0)), |
| ); |
| _objc_msgSend_hwm8nu(object$.ref.pointer, _sel_setThreadPriority_, value); |
| } |
| |
| /// stackSize |
| int get stackSize { |
| objc.checkOsVersionInternal( |
| 'NSThread.stackSize', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| return _objc_msgSend_xw2lbc(object$.ref.pointer, _sel_stackSize); |
| } |
| |
| /// start |
| void start() { |
| objc.checkOsVersionInternal( |
| 'NSThread.start', |
| iOS: (false, (2, 0, 0)), |
| macOS: (false, (10, 5, 0)), |
| ); |
| _objc_msgSend_1pl9qdv(object$.ref.pointer, _sel_start); |
| } |
| |
| /// threadDictionary |
| objc.NSMutableDictionary get threadDictionary { |
| final $ret = _objc_msgSend_151sglz( |
| object$.ref.pointer, |
| _sel_threadDictionary, |
| ); |
| return objc.NSMutableDictionary.fromPointer( |
| $ret, |
| retain: true, |
| release: true, |
| ); |
| } |
| |
| /// threadPriority |
| double get threadPriority { |
| objc.checkOsVersionInternal( |
| 'NSThread.threadPriority', |
| iOS: (false, (4, 0, 0)), |
| macOS: (false, (10, 6, 0)), |
| ); |
| return objc.useMsgSendVariants |
| ? _objc_msgSend_1ukqyt8Fpret(object$.ref.pointer, _sel_threadPriority) |
| : _objc_msgSend_1ukqyt8(object$.ref.pointer, _sel_threadPriority); |
| } |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>)>`. |
| abstract final class ObjCBlock_EmptyBlock_ffiVoid { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => |
| objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| >(pointer, retain: retain, release: release); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction<EmptyBlock Function(ffi.Pointer<ffi.Void> arg0)> |
| > |
| ptr, |
| ) => |
| objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| >( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > |
| fromFunction( |
| DartEmptyBlock Function(ffi.Pointer<ffi.Void>) fn, { |
| bool keepIsolateAlive = true, |
| }) => |
| objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| >( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0) => fn(arg0).ref.retainAndAutorelease(), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| static EmptyBlock _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction<EmptyBlock Function(ffi.Pointer<ffi.Void> arg0)> |
| >() |
| .asFunction<EmptyBlock Function(ffi.Pointer<ffi.Void>)>()(arg0); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static EmptyBlock _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => |
| (objc.getBlockClosure(block) |
| as EmptyBlock Function(ffi.Pointer<ffi.Void>))(arg0); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>)>`. |
| extension ObjCBlock_EmptyBlock_ffiVoid$CallExtension |
| on |
| objc.ObjCBlock< |
| objc.ObjCBlock<ffi.Void Function()> Function(ffi.Pointer<ffi.Void>) |
| > { |
| DartEmptyBlock call(ffi.Pointer<ffi.Void> arg0) => |
| ObjCBlock_ffiVoid.fromPointer( |
| ref.pointer.ref.invoke |
| .cast< |
| ffi.NativeFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) |
| > |
| >() |
| .asFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >()(ref.pointer, arg0), |
| retain: true, |
| release: true, |
| ); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function(ffi.Pointer<ffi.Void>)>`. |
| abstract final class ObjCBlock_EmptyBlock_ffiVoid$1 { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock< |
| objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function( |
| ffi.Pointer<ffi.Void>, |
| ) |
| > |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => |
| objc.ObjCBlock< |
| objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function( |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(pointer, retain: retain, release: release); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock< |
| objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function( |
| ffi.Pointer<ffi.Void>, |
| ) |
| > |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction<EmptyBlock Function(ffi.Pointer<ffi.Void> arg0)> |
| > |
| ptr, |
| ) => |
| objc.ObjCBlock< |
| objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function( |
| ffi.Pointer<ffi.Void>, |
| ) |
| >( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock< |
| objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function( |
| ffi.Pointer<ffi.Void>, |
| ) |
| > |
| fromFunction( |
| DartEmptyBlock Function(ffi.Pointer<ffi.Void>) fn, { |
| bool keepIsolateAlive = true, |
| }) => |
| objc.ObjCBlock< |
| objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function( |
| ffi.Pointer<ffi.Void>, |
| ) |
| >( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0) => fn(arg0).ref.retainAndReturnPointer(), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| static EmptyBlock _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction<EmptyBlock Function(ffi.Pointer<ffi.Void> arg0)> |
| >() |
| .asFunction<EmptyBlock Function(ffi.Pointer<ffi.Void>)>()(arg0); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static EmptyBlock _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => |
| (objc.getBlockClosure(block) |
| as EmptyBlock Function(ffi.Pointer<ffi.Void>))(arg0); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function(ffi.Pointer<ffi.Void>)>`. |
| extension ObjCBlock_EmptyBlock_ffiVoid$1$CallExtension |
| on |
| objc.ObjCBlock< |
| objc.Retained<objc.ObjCBlock<ffi.Void Function()>> Function( |
| ffi.Pointer<ffi.Void>, |
| ) |
| > { |
| DartEmptyBlock call(ffi.Pointer<ffi.Void> arg0) => |
| ObjCBlock_ffiVoid.fromPointer( |
| ref.pointer.ref.invoke |
| .cast< |
| ffi.NativeFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) |
| > |
| >() |
| .asFunction< |
| EmptyBlock Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >()(ref.pointer, arg0), |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)>`. |
| abstract final class ObjCBlock_EmptyObject_ffiVoid { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)>( |
| pointer, |
| retain: retain, |
| release: release, |
| ); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void> arg0) |
| > |
| > |
| ptr, |
| ) => objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)>( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> |
| fromFunction( |
| EmptyObject Function(ffi.Pointer<ffi.Void>) fn, { |
| bool keepIsolateAlive = true, |
| }) => objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)>( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0) => fn(arg0).ref.retainAndAutorelease(), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| static ffi.Pointer<objc.ObjCObjectImpl> _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void> arg0) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void>) |
| >()(arg0); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static ffi.Pointer<objc.ObjCObjectImpl> _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => |
| (objc.getBlockClosure(block) |
| as ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void>))( |
| arg0, |
| ); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)>`. |
| extension ObjCBlock_EmptyObject_ffiVoid$CallExtension |
| on objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>)> { |
| EmptyObject call(ffi.Pointer<ffi.Void> arg0) => EmptyObject.fromPointer( |
| ref.pointer.ref.invoke |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >()(ref.pointer, arg0), |
| retain: true, |
| release: true, |
| ); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>)>`. |
| abstract final class ObjCBlock_EmptyObject_ffiVoid$1 { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock< |
| objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>) |
| > |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => |
| objc.ObjCBlock< |
| objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>) |
| >(pointer, retain: retain, release: release); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock< |
| objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>) |
| > |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void> arg0) |
| > |
| > |
| ptr, |
| ) => |
| objc.ObjCBlock< |
| objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>) |
| >( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock< |
| objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>) |
| > |
| fromFunction( |
| EmptyObject Function(ffi.Pointer<ffi.Void>) fn, { |
| bool keepIsolateAlive = true, |
| }) => |
| objc.ObjCBlock< |
| objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>) |
| >( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0) => fn(arg0).ref.retainAndReturnPointer(), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| static ffi.Pointer<objc.ObjCObjectImpl> _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void> arg0) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void>) |
| >()(arg0); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static ffi.Pointer<objc.ObjCObjectImpl> _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) => |
| (objc.getBlockClosure(block) |
| as ffi.Pointer<objc.ObjCObjectImpl> Function(ffi.Pointer<ffi.Void>))( |
| arg0, |
| ); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>)>`. |
| extension ObjCBlock_EmptyObject_ffiVoid$1$CallExtension |
| on |
| objc.ObjCBlock< |
| objc.Retained<EmptyObject> Function(ffi.Pointer<ffi.Void>) |
| > { |
| EmptyObject call(ffi.Pointer<ffi.Void> arg0) => EmptyObject.fromPointer( |
| ref.pointer.ref.invoke |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >()(ref.pointer, arg0), |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject)>`. |
| abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| > |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => |
| objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject)>( |
| pointer, |
| retain: retain, |
| release: release, |
| ); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| > |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| > |
| ptr, |
| ) => objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject)>( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| > |
| fromFunction( |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) => |
| objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject)>( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn( |
| arg0, |
| EmptyObject.fromPointer(arg1, retain: true, release: true), |
| ).ref.retainAndAutorelease(), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| static ffi.Pointer<objc.ObjCObjectImpl> _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >()(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static ffi.Pointer<objc.ObjCObjectImpl> _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => |
| (objc.getBlockClosure(block) |
| as ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject)>`. |
| extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension |
| on |
| objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| > { |
| EmptyObject call(ffi.Pointer<ffi.Void> arg0, EmptyObject arg1) => |
| EmptyObject.fromPointer( |
| ref.pointer.ref.invoke |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >()(ref.pointer, arg0, arg1.ref.pointer), |
| retain: true, |
| release: true, |
| ); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>)>`. |
| abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => |
| objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >(pointer, retain: retain, release: release); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| > |
| ptr, |
| ) => |
| objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| fromFunction( |
| EmptyObject Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) => |
| objc.ObjCBlock< |
| EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn( |
| arg0, |
| EmptyObject.fromPointer(arg1, retain: false, release: true), |
| ).ref.retainAndAutorelease(), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| static ffi.Pointer<objc.ObjCObjectImpl> _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >()(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static ffi.Pointer<objc.ObjCObjectImpl> _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => |
| (objc.getBlockClosure(block) |
| as ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<EmptyObject Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>)>`. |
| extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension |
| on |
| objc.ObjCBlock< |
| EmptyObject Function( |
| ffi.Pointer<ffi.Void>, |
| objc.Consumed<EmptyObject>, |
| ) |
| > { |
| EmptyObject call(ffi.Pointer<ffi.Void> arg0, EmptyObject arg1) => |
| EmptyObject.fromPointer( |
| ref.pointer.ref.invoke |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >()(ref.pointer, arg0, arg1.ref.retainAndReturnPointer()), |
| retain: true, |
| release: true, |
| ); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<ffi.Void Function()>`. |
| abstract final class ObjCBlock_ffiVoid { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock<ffi.Void Function()> fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => objc.ObjCBlock<ffi.Void Function()>( |
| pointer, |
| retain: retain, |
| release: release, |
| ); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock<ffi.Void Function()> fromFunctionPointer( |
| ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> ptr, |
| ) => objc.ObjCBlock<ffi.Void Function()>( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock<ffi.Void Function()> fromFunction( |
| void Function() fn, { |
| bool keepIsolateAlive = true, |
| }) => objc.ObjCBlock<ffi.Void Function()>( |
| objc.newClosureBlock(_closureCallable, () => fn(), keepIsolateAlive), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a listener block from a Dart function. |
| /// |
| /// This is based on FFI's NativeCallable.listener, and has the same |
| /// capabilities and limitations. This block can be invoked from any thread, |
| /// but only supports void functions, and is not run synchronously. See |
| /// NativeCallable.listener for more details. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock<ffi.Void Function()> listener( |
| void Function() fn, { |
| bool keepIsolateAlive = true, |
| }) { |
| final raw = objc.newClosureBlock( |
| _listenerCallable.nativeFunction.cast(), |
| () => fn(), |
| keepIsolateAlive, |
| ); |
| final wrapper = _z0xonr_wrapListenerBlock_1pl9qdv(raw); |
| objc.objectRelease(raw.cast()); |
| return objc.ObjCBlock<ffi.Void Function()>( |
| wrapper, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| /// Creates a blocking block from a Dart function. |
| /// |
| /// This callback can be invoked from any native thread, and will block the |
| /// caller until the callback is handled by the Dart isolate that created |
| /// the block. Async functions are not supported. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. If the owner isolate |
| /// has shut down, and the block is invoked by native code, it may block |
| /// indefinitely, or have other undefined behavior. |
| static objc.ObjCBlock<ffi.Void Function()> blocking( |
| void Function() fn, { |
| bool keepIsolateAlive = true, |
| }) { |
| final raw = objc.newClosureBlock( |
| _blockingCallable.nativeFunction.cast(), |
| () => fn(), |
| keepIsolateAlive, |
| ); |
| final rawListener = objc.newClosureBlock( |
| _blockingListenerCallable.nativeFunction.cast(), |
| () => fn(), |
| keepIsolateAlive, |
| ); |
| final wrapper = _z0xonr_wrapBlockingBlock_1pl9qdv( |
| raw, |
| rawListener, |
| objc.objCContext, |
| ); |
| objc.objectRelease(raw.cast()); |
| objc.objectRelease(rawListener.cast()); |
| return objc.ObjCBlock<ffi.Void Function()>( |
| wrapper, |
| retain: false, |
| release: true, |
| ); |
| } |
| |
| static void _listenerTrampoline(ffi.Pointer<objc.ObjCBlockImpl> block) { |
| (objc.getBlockClosure(block) as void Function())(); |
| objc.objectRelease(block.cast()); |
| } |
| |
| static ffi.NativeCallable<ffi.Void Function(ffi.Pointer<objc.ObjCBlockImpl>)> |
| _listenerCallable = |
| ffi.NativeCallable< |
| ffi.Void Function(ffi.Pointer<objc.ObjCBlockImpl>) |
| >.listener(_listenerTrampoline) |
| ..keepIsolateAlive = false; |
| static void _blockingTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> waiter, |
| ) { |
| try { |
| (objc.getBlockClosure(block) as void Function())(); |
| } catch (e) { |
| } finally { |
| objc.signalWaiter(waiter); |
| objc.objectRelease(block.cast()); |
| } |
| } |
| |
| static ffi.NativeCallable< |
| ffi.Void Function(ffi.Pointer<objc.ObjCBlockImpl>, ffi.Pointer<ffi.Void>) |
| > |
| _blockingCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >.isolateLocal(_blockingTrampoline) |
| ..keepIsolateAlive = false; |
| static ffi.NativeCallable< |
| ffi.Void Function(ffi.Pointer<objc.ObjCBlockImpl>, ffi.Pointer<ffi.Void>) |
| > |
| _blockingListenerCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ) |
| >.listener(_blockingTrampoline) |
| ..keepIsolateAlive = false; |
| static void _fnPtrTrampoline(ffi.Pointer<objc.ObjCBlockImpl> block) => block |
| .ref |
| .target |
| .cast<ffi.NativeFunction<ffi.Void Function()>>() |
| .asFunction<void Function()>()(); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Void Function(ffi.Pointer<objc.ObjCBlockImpl>) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static void _closureTrampoline(ffi.Pointer<objc.ObjCBlockImpl> block) => |
| (objc.getBlockClosure(block) as void Function())(); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Void Function(ffi.Pointer<objc.ObjCBlockImpl>) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<ffi.Void Function()>`. |
| extension ObjCBlock_ffiVoid$CallExtension |
| on objc.ObjCBlock<ffi.Void Function()> { |
| void call() => |
| ref.pointer.ref.invoke |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function(ffi.Pointer<objc.ObjCBlockImpl> block) |
| > |
| >() |
| .asFunction<void Function(ffi.Pointer<objc.ObjCBlockImpl>)>()( |
| ref.pointer, |
| ); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)>`. |
| abstract final class ObjCBlock_ffiVoid_ffiVoid_EmptyObject { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)>( |
| pointer, |
| retain: retain, |
| release: release, |
| ); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| > |
| ptr, |
| ) => objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)>( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> |
| fromFunction( |
| void Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) => objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)>( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn(arg0, EmptyObject.fromPointer(arg1, retain: true, release: true)), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a listener block from a Dart function. |
| /// |
| /// This is based on FFI's NativeCallable.listener, and has the same |
| /// capabilities and limitations. This block can be invoked from any thread, |
| /// but only supports void functions, and is not run synchronously. See |
| /// NativeCallable.listener for more details. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> |
| listener( |
| void Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) { |
| final raw = objc.newClosureBlock( |
| _listenerCallable.nativeFunction.cast(), |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn(arg0, EmptyObject.fromPointer(arg1, retain: false, release: true)), |
| keepIsolateAlive, |
| ); |
| final wrapper = _z0xonr_wrapListenerBlock_18v1jvf(raw); |
| objc.objectRelease(raw.cast()); |
| return objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| >(wrapper, retain: false, release: true); |
| } |
| |
| /// Creates a blocking block from a Dart function. |
| /// |
| /// This callback can be invoked from any native thread, and will block the |
| /// caller until the callback is handled by the Dart isolate that created |
| /// the block. Async functions are not supported. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. If the owner isolate |
| /// has shut down, and the block is invoked by native code, it may block |
| /// indefinitely, or have other undefined behavior. |
| static objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> |
| blocking( |
| void Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) { |
| final raw = objc.newClosureBlock( |
| _blockingCallable.nativeFunction.cast(), |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn(arg0, EmptyObject.fromPointer(arg1, retain: false, release: true)), |
| keepIsolateAlive, |
| ); |
| final rawListener = objc.newClosureBlock( |
| _blockingListenerCallable.nativeFunction.cast(), |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn(arg0, EmptyObject.fromPointer(arg1, retain: false, release: true)), |
| keepIsolateAlive, |
| ); |
| final wrapper = _z0xonr_wrapBlockingBlock_18v1jvf( |
| raw, |
| rawListener, |
| objc.objCContext, |
| ); |
| objc.objectRelease(raw.cast()); |
| objc.objectRelease(rawListener.cast()); |
| return objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject) |
| >(wrapper, retain: false, release: true); |
| } |
| |
| static void _listenerTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) { |
| (objc.getBlockClosure(block) |
| as void Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| objc.objectRelease(block.cast()); |
| } |
| |
| static ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| _listenerCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >.listener(_listenerTrampoline) |
| ..keepIsolateAlive = false; |
| static void _blockingTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> waiter, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) { |
| try { |
| (objc.getBlockClosure(block) |
| as void Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| } catch (e) { |
| } finally { |
| objc.signalWaiter(waiter); |
| objc.objectRelease(block.cast()); |
| } |
| } |
| |
| static ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| _blockingCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >.isolateLocal(_blockingTrampoline) |
| ..keepIsolateAlive = false; |
| static ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| _blockingListenerCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >.listener(_blockingTrampoline) |
| ..keepIsolateAlive = false; |
| static void _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<objc.ObjCObjectImpl>) |
| >()(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static void _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => |
| (objc.getBlockClosure(block) |
| as void Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)>`. |
| extension ObjCBlock_ffiVoid_ffiVoid_EmptyObject$CallExtension |
| on objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, EmptyObject)> { |
| void call(ffi.Pointer<ffi.Void> arg0, EmptyObject arg1) => ref |
| .pointer |
| .ref |
| .invoke |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >()(ref.pointer, arg0, arg1.ref.pointer); |
| } |
| |
| /// Construction methods for `objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>)>`. |
| abstract final class ObjCBlock_ffiVoid_ffiVoid_EmptyObject$1 { |
| /// Returns a block that wraps the given raw block pointer. |
| static objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| fromPointer( |
| ffi.Pointer<objc.ObjCBlockImpl> pointer, { |
| bool retain = false, |
| bool release = false, |
| }) => |
| objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >(pointer, retain: retain, release: release); |
| |
| /// Creates a block from a C function pointer. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| static objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| fromFunctionPointer( |
| ffi.Pointer< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| > |
| ptr, |
| ) => |
| objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >( |
| objc.newPointerBlock(_fnPtrCallable, ptr.cast()), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a block from a Dart function. |
| /// |
| /// This block must be invoked by native code running on the same thread as |
| /// the isolate that registered it. Invoking the block on the wrong thread |
| /// will result in a crash. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| fromFunction( |
| void Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) => |
| objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >( |
| objc.newClosureBlock( |
| _closureCallable, |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn( |
| arg0, |
| EmptyObject.fromPointer(arg1, retain: false, release: true), |
| ), |
| keepIsolateAlive, |
| ), |
| retain: false, |
| release: true, |
| ); |
| |
| /// Creates a listener block from a Dart function. |
| /// |
| /// This is based on FFI's NativeCallable.listener, and has the same |
| /// capabilities and limitations. This block can be invoked from any thread, |
| /// but only supports void functions, and is not run synchronously. See |
| /// NativeCallable.listener for more details. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. |
| static objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| listener( |
| void Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) { |
| final raw = objc.newClosureBlock( |
| _listenerCallable.nativeFunction.cast(), |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn(arg0, EmptyObject.fromPointer(arg1, retain: false, release: true)), |
| keepIsolateAlive, |
| ); |
| final wrapper = _z0xonr_wrapListenerBlock_6yc3kd(raw); |
| objc.objectRelease(raw.cast()); |
| return objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >(wrapper, retain: false, release: true); |
| } |
| |
| /// Creates a blocking block from a Dart function. |
| /// |
| /// This callback can be invoked from any native thread, and will block the |
| /// caller until the callback is handled by the Dart isolate that created |
| /// the block. Async functions are not supported. |
| /// |
| /// If `keepIsolateAlive` is true, this block will keep this isolate alive |
| /// until it is garbage collected by both Dart and ObjC. If the owner isolate |
| /// has shut down, and the block is invoked by native code, it may block |
| /// indefinitely, or have other undefined behavior. |
| static objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > |
| blocking( |
| void Function(ffi.Pointer<ffi.Void>, EmptyObject) fn, { |
| bool keepIsolateAlive = true, |
| }) { |
| final raw = objc.newClosureBlock( |
| _blockingCallable.nativeFunction.cast(), |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn(arg0, EmptyObject.fromPointer(arg1, retain: false, release: true)), |
| keepIsolateAlive, |
| ); |
| final rawListener = objc.newClosureBlock( |
| _blockingListenerCallable.nativeFunction.cast(), |
| (ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCObjectImpl> arg1) => |
| fn(arg0, EmptyObject.fromPointer(arg1, retain: false, release: true)), |
| keepIsolateAlive, |
| ); |
| final wrapper = _z0xonr_wrapBlockingBlock_6yc3kd( |
| raw, |
| rawListener, |
| objc.objCContext, |
| ); |
| objc.objectRelease(raw.cast()); |
| objc.objectRelease(rawListener.cast()); |
| return objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| >(wrapper, retain: false, release: true); |
| } |
| |
| static void _listenerTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) { |
| (objc.getBlockClosure(block) |
| as void Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| objc.objectRelease(block.cast()); |
| } |
| |
| static ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| _listenerCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >.listener(_listenerTrampoline) |
| ..keepIsolateAlive = false; |
| static void _blockingTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> waiter, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) { |
| try { |
| (objc.getBlockClosure(block) |
| as void Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| } catch (e) { |
| } finally { |
| objc.signalWaiter(waiter); |
| objc.objectRelease(block.cast()); |
| } |
| } |
| |
| static ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| _blockingCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >.isolateLocal(_blockingTrampoline) |
| ..keepIsolateAlive = false; |
| static ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| _blockingListenerCallable = |
| ffi.NativeCallable< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >.listener(_blockingTrampoline) |
| ..keepIsolateAlive = false; |
| static void _fnPtrTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => block.ref.target |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<objc.ObjCObjectImpl>) |
| >()(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _fnPtrCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_fnPtrTrampoline) |
| .cast(); |
| static void _closureTrampoline( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) => |
| (objc.getBlockClosure(block) |
| as void Function( |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ))(arg0, arg1); |
| static ffi.Pointer<ffi.Void> _closureCallable = |
| ffi.Pointer.fromFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(_closureTrampoline) |
| .cast(); |
| } |
| |
| /// Call operator for `objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>)>`. |
| extension ObjCBlock_ffiVoid_ffiVoid_EmptyObject$1$CallExtension |
| on |
| objc.ObjCBlock< |
| ffi.Void Function(ffi.Pointer<ffi.Void>, objc.Consumed<EmptyObject>) |
| > { |
| void call(ffi.Pointer<ffi.Void> arg0, EmptyObject arg1) => ref |
| .pointer |
| .ref |
| .invoke |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCBlockImpl> block, |
| ffi.Pointer<ffi.Void> arg0, |
| ffi.Pointer<objc.ObjCObjectImpl> arg1, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ffi.Pointer<ffi.Void>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >()(ref.pointer, arg0, arg1.ref.retainAndReturnPointer()); |
| } |
| |
| late final _class_BlockAnnotationTest = objc.getClass("BlockAnnotationTest"); |
| late final _class_EmptyObject = objc.getClass("EmptyObject"); |
| late final _class_NSThread = objc.getClass("NSThread"); |
| 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_18chyc = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Double, |
| ) |
| > |
| >() |
| .asFunction< |
| bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| double, |
| ) |
| >(); |
| 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_1eldwyi = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(); |
| final _objc_msgSend_1i9r4xy = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.UnsignedLong, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| int, |
| ) |
| >(); |
| final _objc_msgSend_1pl9qdv = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_1ploomx = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(); |
| final _objc_msgSend_1sotr3r = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(); |
| final _objc_msgSend_1ukqyt8 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| double Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_4js6t = 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>, |
| ) |
| >(); |
| 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_e3qsqz = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCProtocolImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| bool Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCProtocolImpl>, |
| ) |
| >(); |
| final _objc_msgSend_f167m6 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ) |
| >(); |
| 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_lzbvjm = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ) |
| >(); |
| final _objc_msgSend_n2da1l = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Long, |
| ) |
| > |
| >() |
| .asFunction< |
| void Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| int, |
| ) |
| >(); |
| final _objc_msgSend_nnxkei = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCObjectImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ) |
| >(); |
| final _objc_msgSend_oi8iq9 = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Long Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| int Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_uwvaik = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCBlockImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCBlockImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| final _objc_msgSend_w08mvv = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.Pointer<objc.ObjCBlockImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ) |
| > |
| >() |
| .asFunction< |
| ffi.Pointer<objc.ObjCBlockImpl> Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ffi.Pointer<objc.ObjCBlockImpl>, |
| ) |
| >(); |
| 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>, |
| ) |
| >(); |
| final _objc_msgSend_xw2lbc = objc.msgSendPointer |
| .cast< |
| ffi.NativeFunction< |
| ffi.UnsignedLong Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| > |
| >() |
| .asFunction< |
| int Function( |
| ffi.Pointer<objc.ObjCObjectImpl>, |
| ffi.Pointer<objc.ObjCSelector>, |
| ) |
| >(); |
| late final _protocol_BlockAnnotationTestProtocol = objc.getProtocol( |
| "BlockAnnotationTestProtocol", |
| ); |
| late final _sel_alloc = objc.registerName("alloc"); |
| late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); |
| late final _sel_callStackReturnAddresses = objc.registerName( |
| "callStackReturnAddresses", |
| ); |
| late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); |
| late final _sel_cancel = objc.registerName("cancel"); |
| late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); |
| late final _sel_currentThread = objc.registerName("currentThread"); |
| late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc |
| .registerName("detachNewThreadSelector:toTarget:withObject:"); |
| late final _sel_detachNewThreadWithBlock_ = objc.registerName( |
| "detachNewThreadWithBlock:", |
| ); |
| late final _sel_exit = objc.registerName("exit"); |
| late final _sel_init = objc.registerName("init"); |
| late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); |
| late final _sel_initWithTarget_selector_object_ = objc.registerName( |
| "initWithTarget:selector:object:", |
| ); |
| late final _sel_invokeBlockProducer_ = objc.registerName( |
| "invokeBlockProducer:", |
| ); |
| late final _sel_invokeConsumedObjectListenerAsync_ = objc.registerName( |
| "invokeConsumedObjectListenerAsync:", |
| ); |
| late final _sel_invokeConsumedObjectListenerSync_ = objc.registerName( |
| "invokeConsumedObjectListenerSync:", |
| ); |
| late final _sel_invokeConsumedObjectReceiver_ = objc.registerName( |
| "invokeConsumedObjectReceiver:", |
| ); |
| late final _sel_invokeObjectListenerAsync_ = objc.registerName( |
| "invokeObjectListenerAsync:", |
| ); |
| late final _sel_invokeObjectListenerSync_ = objc.registerName( |
| "invokeObjectListenerSync:", |
| ); |
| late final _sel_invokeObjectProducer_ = objc.registerName( |
| "invokeObjectProducer:", |
| ); |
| late final _sel_invokeObjectReceiver_ = objc.registerName( |
| "invokeObjectReceiver:", |
| ); |
| late final _sel_invokeRetainedBlockProducer_ = objc.registerName( |
| "invokeRetainedBlockProducer:", |
| ); |
| late final _sel_invokeRetainedObjectProducer_ = objc.registerName( |
| "invokeRetainedObjectProducer:", |
| ); |
| late final _sel_isCancelled = objc.registerName("isCancelled"); |
| late final _sel_isExecuting = objc.registerName("isExecuting"); |
| late final _sel_isFinished = objc.registerName("isFinished"); |
| late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); |
| late final _sel_isMainThread = objc.registerName("isMainThread"); |
| late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); |
| late final _sel_listenConsumedObject_ = objc.registerName( |
| "listenConsumedObject:", |
| ); |
| late final _sel_listenObject_ = objc.registerName("listenObject:"); |
| late final _sel_main = objc.registerName("main"); |
| late final _sel_mainThread = objc.registerName("mainThread"); |
| late final _sel_name = objc.registerName("name"); |
| late final _sel_new = objc.registerName("new"); |
| late final _sel_newBlockProducer = objc.registerName("newBlockProducer"); |
| late final _sel_newConsumedObjectReceiver = objc.registerName( |
| "newConsumedObjectReceiver", |
| ); |
| late final _sel_newObjectProducer = objc.registerName("newObjectProducer"); |
| late final _sel_newObjectReceiver = objc.registerName("newObjectReceiver"); |
| late final _sel_newRetainedBlockProducer = objc.registerName( |
| "newRetainedBlockProducer", |
| ); |
| late final _sel_newRetainedObjectProducer = objc.registerName( |
| "newRetainedObjectProducer", |
| ); |
| late final _sel_produceBlock = objc.registerName("produceBlock"); |
| late final _sel_produceObject = objc.registerName("produceObject"); |
| late final _sel_produceRetainedBlock = objc.registerName( |
| "produceRetainedBlock", |
| ); |
| late final _sel_produceRetainedObject = objc.registerName( |
| "produceRetainedObject", |
| ); |
| late final _sel_qualityOfService = objc.registerName("qualityOfService"); |
| late final _sel_receiveConsumedObject_ = objc.registerName( |
| "receiveConsumedObject:", |
| ); |
| late final _sel_receiveObject_ = objc.registerName("receiveObject:"); |
| late final _sel_setName_ = objc.registerName("setName:"); |
| late final _sel_setQualityOfService_ = objc.registerName( |
| "setQualityOfService:", |
| ); |
| late final _sel_setStackSize_ = objc.registerName("setStackSize:"); |
| late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); |
| late final _sel_sleepForTimeInterval_ = objc.registerName( |
| "sleepForTimeInterval:", |
| ); |
| late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); |
| late final _sel_stackSize = objc.registerName("stackSize"); |
| late final _sel_start = objc.registerName("start"); |
| late final _sel_threadDictionary = objc.registerName("threadDictionary"); |
| late final _sel_threadPriority = objc.registerName("threadPriority"); |
| typedef instancetype = ffi.Pointer<objc.ObjCObjectImpl>; |
| typedef Dartinstancetype = objc.ObjCObject; |