// ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field, return_of_invalid_type, void_checks, annotate_overrides, no_leading_underscores_for_local_identifiers, library_private_types_in_public_apia // AUTO GENERATED FILE, DO NOT EDIT. // // Generated by `package:ffigen`. // ignore_for_file: type=lint import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSTimer( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSFileHandle( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSError( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSError( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSArray( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSCachedURLResponse( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary( ffi.Pointer block, ); @ffi.Native Function(ffi.Pointer)>( isLeaf: true) external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSURLCredential( ffi.Pointer block, ); /// NSProgress class NSProgress extends objc.NSObject { NSProgress._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSProgress] that points to the same underlying object as [other]. NSProgress.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSProgress] that wraps the given raw object pointer. NSProgress.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSProgress]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProgress); } /// currentProgress static NSProgress? currentProgress() { final _ret = _objc_msgSend_1(_class_NSProgress, _sel_currentProgress); return _ret.address == 0 ? null : NSProgress.castFromPointer(_ret, retain: true, release: true); } /// progressWithTotalUnitCount: static NSProgress progressWithTotalUnitCount_(int unitCount) { final _ret = _objc_msgSend_2( _class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// discreteProgressWithTotalUnitCount: static NSProgress discreteProgressWithTotalUnitCount_(int unitCount) { final _ret = _objc_msgSend_2( _class_NSProgress, _sel_discreteProgressWithTotalUnitCount_, unitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// progressWithTotalUnitCount:parent:pendingUnitCount: static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( int unitCount, NSProgress parent, int portionOfParentTotalUnitCount) { final _ret = _objc_msgSend_3( _class_NSProgress, _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, unitCount, parent.pointer, portionOfParentTotalUnitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// initWithParent:userInfo: NSProgress initWithParent_userInfo_( NSProgress? parentProgressOrNil, objc.ObjCObjectBase? userInfoOrNil) { final _ret = _objc_msgSend_4( this.pointer, _sel_initWithParent_userInfo_, parentProgressOrNil?.pointer ?? ffi.nullptr, userInfoOrNil?.pointer ?? ffi.nullptr); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// becomeCurrentWithPendingUnitCount: void becomeCurrentWithPendingUnitCount_(int unitCount) { _objc_msgSend_5( this.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); } /// performAsCurrentWithPendingUnitCount:usingBlock: void performAsCurrentWithPendingUnitCount_usingBlock_( int unitCount, ObjCBlock_ffiVoid work) { _objc_msgSend_6( this.pointer, _sel_performAsCurrentWithPendingUnitCount_usingBlock_, unitCount, work.pointer); } /// resignCurrent void resignCurrent() { _objc_msgSend_7(this.pointer, _sel_resignCurrent); } /// addChild:withPendingUnitCount: void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { _objc_msgSend_8(this.pointer, _sel_addChild_withPendingUnitCount_, child.pointer, inUnitCount); } /// totalUnitCount int get totalUnitCount { return _objc_msgSend_9(this.pointer, _sel_totalUnitCount); } /// setTotalUnitCount: set totalUnitCount(int value) { return _objc_msgSend_10(this.pointer, _sel_setTotalUnitCount_, value); } /// completedUnitCount int get completedUnitCount { return _objc_msgSend_9(this.pointer, _sel_completedUnitCount); } /// setCompletedUnitCount: set completedUnitCount(int value) { return _objc_msgSend_10(this.pointer, _sel_setCompletedUnitCount_, value); } /// localizedDescription objc.NSString get localizedDescription { final _ret = _objc_msgSend_11(this.pointer, _sel_localizedDescription); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setLocalizedDescription: set localizedDescription(objc.NSString value) { return _objc_msgSend_12( this.pointer, _sel_setLocalizedDescription_, value.pointer); } /// localizedAdditionalDescription objc.NSString get localizedAdditionalDescription { final _ret = _objc_msgSend_11(this.pointer, _sel_localizedAdditionalDescription); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setLocalizedAdditionalDescription: set localizedAdditionalDescription(objc.NSString value) { return _objc_msgSend_12( this.pointer, _sel_setLocalizedAdditionalDescription_, value.pointer); } /// isCancellable bool get cancellable { return _objc_msgSend_13(this.pointer, _sel_isCancellable); } /// setCancellable: set cancellable(bool value) { return _objc_msgSend_14(this.pointer, _sel_setCancellable_, value); } /// isPausable bool get pausable { return _objc_msgSend_13(this.pointer, _sel_isPausable); } /// setPausable: set pausable(bool value) { return _objc_msgSend_14(this.pointer, _sel_setPausable_, value); } /// isCancelled bool get cancelled { return _objc_msgSend_13(this.pointer, _sel_isCancelled); } /// isPaused bool get paused { return _objc_msgSend_13(this.pointer, _sel_isPaused); } /// cancellationHandler ObjCBlock_ffiVoid? get cancellationHandler { final _ret = _objc_msgSend_15(this.pointer, _sel_cancellationHandler); return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setCancellationHandler: set cancellationHandler(ObjCBlock_ffiVoid? value) { return _objc_msgSend_16(this.pointer, _sel_setCancellationHandler_, value?.pointer ?? ffi.nullptr); } /// pausingHandler ObjCBlock_ffiVoid? get pausingHandler { final _ret = _objc_msgSend_15(this.pointer, _sel_pausingHandler); return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setPausingHandler: set pausingHandler(ObjCBlock_ffiVoid? value) { return _objc_msgSend_16( this.pointer, _sel_setPausingHandler_, value?.pointer ?? ffi.nullptr); } /// resumingHandler ObjCBlock_ffiVoid? get resumingHandler { final _ret = _objc_msgSend_15(this.pointer, _sel_resumingHandler); return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setResumingHandler: set resumingHandler(ObjCBlock_ffiVoid? value) { return _objc_msgSend_16( this.pointer, _sel_setResumingHandler_, value?.pointer ?? ffi.nullptr); } /// setUserInfoObject:forKey: void setUserInfoObject_forKey_( objc.ObjCObjectBase? objectOrNil, objc.NSString key) { _objc_msgSend_17(this.pointer, _sel_setUserInfoObject_forKey_, objectOrNil?.pointer ?? ffi.nullptr, key.pointer); } /// isIndeterminate bool get indeterminate { return _objc_msgSend_13(this.pointer, _sel_isIndeterminate); } /// fractionCompleted double get fractionCompleted { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_fractionCompleted) : _objc_msgSend_18(this.pointer, _sel_fractionCompleted); } /// isFinished bool get finished { return _objc_msgSend_13(this.pointer, _sel_isFinished); } /// cancel void cancel() { _objc_msgSend_7(this.pointer, _sel_cancel); } /// pause void pause() { _objc_msgSend_7(this.pointer, _sel_pause); } /// resume void resume() { _objc_msgSend_7(this.pointer, _sel_resume); } /// userInfo objc.ObjCObjectBase get userInfo { final _ret = _objc_msgSend_19(this.pointer, _sel_userInfo); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// kind objc.NSString? get kind { final _ret = _objc_msgSend_20(this.pointer, _sel_kind); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setKind: set kind(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setKind_, value?.pointer ?? ffi.nullptr); } /// estimatedTimeRemaining objc.NSNumber? get estimatedTimeRemaining { final _ret = _objc_msgSend_22(this.pointer, _sel_estimatedTimeRemaining); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setEstimatedTimeRemaining: set estimatedTimeRemaining(objc.NSNumber? value) { return _objc_msgSend_23(this.pointer, _sel_setEstimatedTimeRemaining_, value?.pointer ?? ffi.nullptr); } /// throughput objc.NSNumber? get throughput { final _ret = _objc_msgSend_22(this.pointer, _sel_throughput); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setThroughput: set throughput(objc.NSNumber? value) { return _objc_msgSend_23( this.pointer, _sel_setThroughput_, value?.pointer ?? ffi.nullptr); } /// fileOperationKind objc.NSString? get fileOperationKind { final _ret = _objc_msgSend_20(this.pointer, _sel_fileOperationKind); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setFileOperationKind: set fileOperationKind(objc.NSString? value) { return _objc_msgSend_21(this.pointer, _sel_setFileOperationKind_, value?.pointer ?? ffi.nullptr); } /// fileURL objc.NSURL? get fileURL { final _ret = _objc_msgSend_24(this.pointer, _sel_fileURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setFileURL: set fileURL(objc.NSURL? value) { return _objc_msgSend_25( this.pointer, _sel_setFileURL_, value?.pointer ?? ffi.nullptr); } /// fileTotalCount objc.NSNumber? get fileTotalCount { final _ret = _objc_msgSend_22(this.pointer, _sel_fileTotalCount); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setFileTotalCount: set fileTotalCount(objc.NSNumber? value) { return _objc_msgSend_23( this.pointer, _sel_setFileTotalCount_, value?.pointer ?? ffi.nullptr); } /// fileCompletedCount objc.NSNumber? get fileCompletedCount { final _ret = _objc_msgSend_22(this.pointer, _sel_fileCompletedCount); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setFileCompletedCount: set fileCompletedCount(objc.NSNumber? value) { return _objc_msgSend_23(this.pointer, _sel_setFileCompletedCount_, value?.pointer ?? ffi.nullptr); } /// publish void publish() { _objc_msgSend_7(this.pointer, _sel_publish); } /// unpublish void unpublish() { _objc_msgSend_7(this.pointer, _sel_unpublish); } /// addSubscriberForFileURL:withPublishingHandler: static objc.ObjCObjectBase addSubscriberForFileURL_withPublishingHandler_( objc.NSURL url, ObjCBlock_ffiVoid_NSProgress publishingHandler) { final _ret = _objc_msgSend_26( _class_NSProgress, _sel_addSubscriberForFileURL_withPublishingHandler_, url.pointer, publishingHandler.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// removeSubscriber: static void removeSubscriber_(objc.ObjCObjectBase subscriber) { _objc_msgSend_27( _class_NSProgress, _sel_removeSubscriber_, subscriber.pointer); } /// isOld bool get old { return _objc_msgSend_13(this.pointer, _sel_isOld); } /// init NSProgress init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// new static NSProgress new1() { final _ret = _objc_msgSend_19(_class_NSProgress, _sel_new); return NSProgress.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSProgress allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSProgress, _sel_allocWithZone_, zone); return NSProgress.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSProgress alloc() { final _ret = _objc_msgSend_19(_class_NSProgress, _sel_alloc); return NSProgress.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSProgress, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSProgress, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSProgress, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSProgress, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSProgress, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSProgress, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSProgress, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSProgress, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSProgress = objc.getClass("NSProgress"); late final _sel_currentProgress = objc.registerName("currentProgress"); final _objc_msgSend_1 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_progressWithTotalUnitCount_ = objc.registerName("progressWithTotalUnitCount:"); final _objc_msgSend_2 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int64)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_discreteProgressWithTotalUnitCount_ = objc.registerName("discreteProgressWithTotalUnitCount:"); late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_ = objc.registerName("progressWithTotalUnitCount:parent:pendingUnitCount:"); final _objc_msgSend_3 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Int64, ffi.Pointer, ffi.Int64)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer, int)>(); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObjectBase; late final _sel_initWithParent_userInfo_ = objc.registerName("initWithParent:userInfo:"); final _objc_msgSend_4 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_becomeCurrentWithPendingUnitCount_ = objc.registerName("becomeCurrentWithPendingUnitCount:"); final _objc_msgSend_5 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int64)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); void _ObjCBlock_ffiVoid_fnPtrTrampoline( ffi.Pointer block, ) => block.ref.target .cast>() .asFunction()(); void _ObjCBlock_ffiVoid_closureTrampoline( ffi.Pointer block, ) => (objc.getBlockClosure(block) as void Function())(); class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { ObjCBlock_ffiVoid._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid._(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. ObjCBlock_ffiVoid.fromFunctionPointer( ffi.Pointer> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer)>( _ObjCBlock_ffiVoid_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid.fromFunction(void Function() fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer)>( _ObjCBlock_ffiVoid_closureTrampoline) .cast(), () => fn())); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid.listener(void Function() fn) : this._((objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function( ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), () => fn()))); static ffi.NativeCallable)>? _dartFuncListenerTrampoline; void call() => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block)>>() .asFunction)>()( pointer, ); } late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); final _objc_msgSend_6 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Int64, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_resignCurrent = objc.registerName("resignCurrent"); final _objc_msgSend_7 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_addChild_withPendingUnitCount_ = objc.registerName("addChild:withPendingUnitCount:"); final _objc_msgSend_8 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int64)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_totalUnitCount = objc.registerName("totalUnitCount"); final _objc_msgSend_9 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int64 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setTotalUnitCount_ = objc.registerName("setTotalUnitCount:"); final _objc_msgSend_10 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int64)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_completedUnitCount = objc.registerName("completedUnitCount"); late final _sel_setCompletedUnitCount_ = objc.registerName("setCompletedUnitCount:"); late final _sel_localizedDescription = objc.registerName("localizedDescription"); final _objc_msgSend_11 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setLocalizedDescription_ = objc.registerName("setLocalizedDescription:"); final _objc_msgSend_12 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_localizedAdditionalDescription = objc.registerName("localizedAdditionalDescription"); late final _sel_setLocalizedAdditionalDescription_ = objc.registerName("setLocalizedAdditionalDescription:"); late final _sel_isCancellable = objc.registerName("isCancellable"); final _objc_msgSend_13 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setCancellable_ = objc.registerName("setCancellable:"); final _objc_msgSend_14 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_isPausable = objc.registerName("isPausable"); late final _sel_setPausable_ = objc.registerName("setPausable:"); late final _sel_isCancelled = objc.registerName("isCancelled"); late final _sel_isPaused = objc.registerName("isPaused"); late final _sel_cancellationHandler = objc.registerName("cancellationHandler"); final _objc_msgSend_15 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setCancellationHandler_ = objc.registerName("setCancellationHandler:"); final _objc_msgSend_16 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pausingHandler = objc.registerName("pausingHandler"); late final _sel_setPausingHandler_ = objc.registerName("setPausingHandler:"); late final _sel_resumingHandler = objc.registerName("resumingHandler"); late final _sel_setResumingHandler_ = objc.registerName("setResumingHandler:"); late final _sel_setUserInfoObject_forKey_ = objc.registerName("setUserInfoObject:forKey:"); final _objc_msgSend_17 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); late final _sel_fractionCompleted = objc.registerName("fractionCompleted"); final _objc_msgSend_18 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Double Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< double Function( ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_18Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< ffi.Double Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< double Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_isFinished = objc.registerName("isFinished"); late final _sel_cancel = objc.registerName("cancel"); late final _sel_pause = objc.registerName("pause"); late final _sel_resume = objc.registerName("resume"); late final _sel_userInfo = objc.registerName("userInfo"); final _objc_msgSend_19 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_kind = objc.registerName("kind"); final _objc_msgSend_20 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setKind_ = objc.registerName("setKind:"); final _objc_msgSend_21 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_estimatedTimeRemaining = objc.registerName("estimatedTimeRemaining"); final _objc_msgSend_22 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setEstimatedTimeRemaining_ = objc.registerName("setEstimatedTimeRemaining:"); final _objc_msgSend_23 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_throughput = objc.registerName("throughput"); late final _sel_setThroughput_ = objc.registerName("setThroughput:"); late final _sel_fileOperationKind = objc.registerName("fileOperationKind"); late final _sel_setFileOperationKind_ = objc.registerName("setFileOperationKind:"); late final _sel_fileURL = objc.registerName("fileURL"); final _objc_msgSend_24 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setFileURL_ = objc.registerName("setFileURL:"); final _objc_msgSend_25 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); late final _sel_setFileTotalCount_ = objc.registerName("setFileTotalCount:"); late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); late final _sel_setFileCompletedCount_ = objc.registerName("setFileCompletedCount:"); late final _sel_publish = objc.registerName("publish"); late final _sel_unpublish = objc.registerName("unpublish"); ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer arg0)>>() .asFunction< ffi.Pointer Function( ffi.Pointer)>()(arg0); ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as ffi.Pointer Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSProgress extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSProgress._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSProgress castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSProgress._(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. ObjCBlock_ffiVoid_NSProgress.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSProgress.fromFunction( ObjCBlock_ffiVoid? Function(NSProgress) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn(NSProgress.castFromPointer(arg0, retain: true, release: true)) ?.retainAndReturnPointer() ?? ffi.nullptr)); static ffi.Pointer? _dartFuncTrampoline; ObjCBlock_ffiVoid? call(NSProgress arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction Function(ffi.Pointer, ffi.Pointer)>() (pointer, arg0.pointer) .address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer( pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer), retain: false, release: true); } late final _sel_addSubscriberForFileURL_withPublishingHandler_ = objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); final _objc_msgSend_26 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeSubscriber_ = objc.registerName("removeSubscriber:"); final _objc_msgSend_27 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isOld = objc.registerName("isOld"); late final _sel_init = objc.registerName("init"); late final _sel_new = objc.registerName("new"); final class _NSZone extends ffi.Opaque {} late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); final _objc_msgSend_28 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_NSZone>)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_NSZone>)>(); late final _sel_alloc = objc.registerName("alloc"); late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); final _objc_msgSend_29 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cancelPreviousPerformRequestsWithTarget_ = objc.registerName("cancelPreviousPerformRequestsWithTarget:"); late final _sel_accessInstanceVariablesDirectly = objc.registerName("accessInstanceVariablesDirectly"); late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); late final _sel_keyPathsForValuesAffectingValueForKey_ = objc.registerName("keyPathsForValuesAffectingValueForKey:"); final _objc_msgSend_30 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_automaticallyNotifiesObserversForKey_ = objc.registerName("automaticallyNotifiesObserversForKey:"); final _objc_msgSend_31 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_classFallbacksForKeyedArchiver = objc.registerName("classFallbacksForKeyedArchiver"); final _objc_msgSend_32 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_classForKeyedUnarchiver = objc.registerName("classForKeyedUnarchiver"); final _objc_msgSend_0 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); /// NSBundle class NSBundle extends objc.NSObject { NSBundle._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSBundle] that points to the same underlying object as [other]. NSBundle.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSBundle] that wraps the given raw object pointer. NSBundle.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSBundle]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); } /// mainBundle static NSBundle getMainBundle() { final _ret = _objc_msgSend_33(_class_NSBundle, _sel_mainBundle); return NSBundle.castFromPointer(_ret, retain: true, release: true); } /// bundleWithPath: static NSBundle? bundleWithPath_(objc.NSString path) { final _ret = _objc_msgSend_34(_class_NSBundle, _sel_bundleWithPath_, path.pointer); return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// initWithPath: NSBundle? initWithPath_(objc.NSString path) { final _ret = _objc_msgSend_34(this.pointer, _sel_initWithPath_, path.pointer); return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// bundleWithURL: static NSBundle? bundleWithURL_(objc.NSURL url) { final _ret = _objc_msgSend_35(_class_NSBundle, _sel_bundleWithURL_, url.pointer); return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// initWithURL: NSBundle? initWithURL_(objc.NSURL url) { final _ret = _objc_msgSend_35(this.pointer, _sel_initWithURL_, url.pointer); return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// bundleForClass: static NSBundle bundleForClass_(objc.ObjCObjectBase aClass) { final _ret = _objc_msgSend_36(_class_NSBundle, _sel_bundleForClass_, aClass.pointer); return NSBundle.castFromPointer(_ret, retain: true, release: true); } /// bundleWithIdentifier: static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { final _ret = _objc_msgSend_37( _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// allBundles static objc.NSArray getAllBundles() { final _ret = _objc_msgSend_32(_class_NSBundle, _sel_allBundles); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// allFrameworks static objc.NSArray getAllFrameworks() { final _ret = _objc_msgSend_32(_class_NSBundle, _sel_allFrameworks); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// load bool load() { return _objc_msgSend_13(this.pointer, _sel_load); } /// isLoaded bool get loaded { return _objc_msgSend_13(this.pointer, _sel_isLoaded); } /// unload bool unload() { return _objc_msgSend_13(this.pointer, _sel_unload); } /// preflightAndReturnError: bool preflightAndReturnError_( ffi.Pointer> error) { return _objc_msgSend_38(this.pointer, _sel_preflightAndReturnError_, error); } /// loadAndReturnError: bool loadAndReturnError_(ffi.Pointer> error) { return _objc_msgSend_38(this.pointer, _sel_loadAndReturnError_, error); } /// bundleURL objc.NSURL get bundleURL { final _ret = _objc_msgSend_39(this.pointer, _sel_bundleURL); return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// resourceURL objc.NSURL? get resourceURL { final _ret = _objc_msgSend_24(this.pointer, _sel_resourceURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// executableURL objc.NSURL? get executableURL { final _ret = _objc_msgSend_24(this.pointer, _sel_executableURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// URLForAuxiliaryExecutable: objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { final _ret = _objc_msgSend_40( this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// privateFrameworksURL objc.NSURL? get privateFrameworksURL { final _ret = _objc_msgSend_24(this.pointer, _sel_privateFrameworksURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// sharedFrameworksURL objc.NSURL? get sharedFrameworksURL { final _ret = _objc_msgSend_24(this.pointer, _sel_sharedFrameworksURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// sharedSupportURL objc.NSURL? get sharedSupportURL { final _ret = _objc_msgSend_24(this.pointer, _sel_sharedSupportURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// builtInPlugInsURL objc.NSURL? get builtInPlugInsURL { final _ret = _objc_msgSend_24(this.pointer, _sel_builtInPlugInsURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// appStoreReceiptURL objc.NSURL? get appStoreReceiptURL { final _ret = _objc_msgSend_24(this.pointer, _sel_appStoreReceiptURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// bundlePath objc.NSString get bundlePath { final _ret = _objc_msgSend_11(this.pointer, _sel_bundlePath); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// resourcePath objc.NSString? get resourcePath { final _ret = _objc_msgSend_20(this.pointer, _sel_resourcePath); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// executablePath objc.NSString? get executablePath { final _ret = _objc_msgSend_20(this.pointer, _sel_executablePath); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// pathForAuxiliaryExecutable: objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { final _ret = _objc_msgSend_41( this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// privateFrameworksPath objc.NSString? get privateFrameworksPath { final _ret = _objc_msgSend_20(this.pointer, _sel_privateFrameworksPath); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// sharedFrameworksPath objc.NSString? get sharedFrameworksPath { final _ret = _objc_msgSend_20(this.pointer, _sel_sharedFrameworksPath); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// sharedSupportPath objc.NSString? get sharedSupportPath { final _ret = _objc_msgSend_20(this.pointer, _sel_sharedSupportPath); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// builtInPlugInsPath objc.NSString? get builtInPlugInsPath { final _ret = _objc_msgSend_20(this.pointer, _sel_builtInPlugInsPath); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// URLForResource:withExtension:subdirectory:inBundleWithURL: static objc.NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( objc.NSString? name, objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { final _ret = _objc_msgSend_42( _class_NSBundle, _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_, name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr, bundleURL.pointer); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// URLsForResourcesWithExtension:subdirectory:inBundleWithURL: static objc.NSArray? URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { final _ret = _objc_msgSend_43( _class_NSBundle, _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr, bundleURL.pointer); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// URLForResource:withExtension: objc.NSURL? URLForResource_withExtension_( objc.NSString? name, objc.NSString? ext) { final _ret = _objc_msgSend_44( this.pointer, _sel_URLForResource_withExtension_, name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// URLForResource:withExtension:subdirectory: objc.NSURL? URLForResource_withExtension_subdirectory_( objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { final _ret = _objc_msgSend_45( this.pointer, _sel_URLForResource_withExtension_subdirectory_, name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// URLForResource:withExtension:subdirectory:localization: objc.NSURL? URLForResource_withExtension_subdirectory_localization_( objc.NSString? name, objc.NSString? ext, objc.NSString? subpath, objc.NSString? localizationName) { final _ret = _objc_msgSend_46( this.pointer, _sel_URLForResource_withExtension_subdirectory_localization_, name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr, localizationName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// URLsForResourcesWithExtension:subdirectory: objc.NSArray? URLsForResourcesWithExtension_subdirectory_( objc.NSString? ext, objc.NSString? subpath) { final _ret = _objc_msgSend_47( this.pointer, _sel_URLsForResourcesWithExtension_subdirectory_, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// URLsForResourcesWithExtension:subdirectory:localization: objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( objc.NSString? ext, objc.NSString? subpath, objc.NSString? localizationName) { final _ret = _objc_msgSend_48( this.pointer, _sel_URLsForResourcesWithExtension_subdirectory_localization_, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr, localizationName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// pathForResource:ofType:inDirectory: objc.NSString? pathForResource_ofType_inDirectory_( objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { final _ret = _objc_msgSend_49( this.pointer, _sel_pathForResource_ofType_inDirectory_, name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// pathsForResourcesOfType:inDirectory: objc.NSArray pathsForResourcesOfType_inDirectory_( objc.NSString? ext, objc.NSString? subpath) { final _ret = _objc_msgSend_50( this.pointer, _sel_pathsForResourcesOfType_inDirectory_, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// pathForResource:ofType: objc.NSString? pathForResource_ofType_( objc.NSString? name, objc.NSString? ext) { final _ret = _objc_msgSend_51(this.pointer, _sel_pathForResource_ofType_, name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// pathForResource:ofType:inDirectory:forLocalization: objc.NSString? pathForResource_ofType_inDirectory_forLocalization_( objc.NSString? name, objc.NSString? ext, objc.NSString? subpath, objc.NSString? localizationName) { final _ret = _objc_msgSend_52( this.pointer, _sel_pathForResource_ofType_inDirectory_forLocalization_, name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr, localizationName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// pathsForResourcesOfType:inDirectory:forLocalization: objc.NSArray pathsForResourcesOfType_inDirectory_forLocalization_( objc.NSString? ext, objc.NSString? subpath, objc.NSString? localizationName) { final _ret = _objc_msgSend_53( this.pointer, _sel_pathsForResourcesOfType_inDirectory_forLocalization_, ext?.pointer ?? ffi.nullptr, subpath?.pointer ?? ffi.nullptr, localizationName?.pointer ?? ffi.nullptr); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// localizedStringForKey:value:table: objc.NSString localizedStringForKey_value_table_( objc.NSString key, objc.NSString? value, objc.NSString? tableName) { final _ret = _objc_msgSend_54( this.pointer, _sel_localizedStringForKey_value_table_, key.pointer, value?.pointer ?? ffi.nullptr, tableName?.pointer ?? ffi.nullptr); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringForKey:value:table: NSAttributedString localizedAttributedStringForKey_value_table_( objc.NSString key, objc.NSString? value, objc.NSString? tableName) { final _ret = _objc_msgSend_82( this.pointer, _sel_localizedAttributedStringForKey_value_table_, key.pointer, value?.pointer ?? ffi.nullptr, tableName?.pointer ?? ffi.nullptr); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// bundleIdentifier objc.NSString? get bundleIdentifier { final _ret = _objc_msgSend_20(this.pointer, _sel_bundleIdentifier); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// infoDictionary objc.NSDictionary? get infoDictionary { final _ret = _objc_msgSend_83(this.pointer, _sel_infoDictionary); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// localizedInfoDictionary objc.NSDictionary? get localizedInfoDictionary { final _ret = _objc_msgSend_83(this.pointer, _sel_localizedInfoDictionary); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// objectForInfoDictionaryKey: objc.ObjCObjectBase? objectForInfoDictionaryKey_(objc.NSString key) { final _ret = _objc_msgSend_34( this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// classNamed: objc.ObjCObjectBase? classNamed_(objc.NSString className) { final _ret = _objc_msgSend_34(this.pointer, _sel_classNamed_, className.pointer); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// principalClass objc.ObjCObjectBase? get principalClass { final _ret = _objc_msgSend_84(this.pointer, _sel_principalClass); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// preferredLocalizations objc.NSArray get preferredLocalizations { final _ret = _objc_msgSend_32(this.pointer, _sel_preferredLocalizations); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// localizations objc.NSArray get localizations { final _ret = _objc_msgSend_32(this.pointer, _sel_localizations); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// developmentLocalization objc.NSString? get developmentLocalization { final _ret = _objc_msgSend_20(this.pointer, _sel_developmentLocalization); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// preferredLocalizationsFromArray: static objc.NSArray preferredLocalizationsFromArray_( objc.NSArray localizationsArray) { final _ret = _objc_msgSend_85(_class_NSBundle, _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// preferredLocalizationsFromArray:forPreferences: static objc.NSArray preferredLocalizationsFromArray_forPreferences_( objc.NSArray localizationsArray, objc.NSArray? preferencesArray) { final _ret = _objc_msgSend_86( _class_NSBundle, _sel_preferredLocalizationsFromArray_forPreferences_, localizationsArray.pointer, preferencesArray?.pointer ?? ffi.nullptr); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// executableArchitectures objc.NSArray? get executableArchitectures { final _ret = _objc_msgSend_87(this.pointer, _sel_executableArchitectures); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setPreservationPriority:forTags: void setPreservationPriority_forTags_(double priority, objc.NSSet tags) { _objc_msgSend_88(this.pointer, _sel_setPreservationPriority_forTags_, priority, tags.pointer); } /// preservationPriorityForTag: double preservationPriorityForTag_(objc.NSString tag) { return objc.useMsgSendVariants ? _objc_msgSend_89Fpret( this.pointer, _sel_preservationPriorityForTag_, tag.pointer) : _objc_msgSend_89( this.pointer, _sel_preservationPriorityForTag_, tag.pointer); } /// init NSBundle init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSBundle.castFromPointer(_ret, retain: true, release: true); } /// new static NSBundle new1() { final _ret = _objc_msgSend_19(_class_NSBundle, _sel_new); return NSBundle.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSBundle, _sel_allocWithZone_, zone); return NSBundle.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSBundle alloc() { final _ret = _objc_msgSend_19(_class_NSBundle, _sel_alloc); return NSBundle.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSBundle, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSBundle, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSBundle, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSBundle, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSBundle, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSBundle, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSBundle, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSBundle = objc.getClass("NSBundle"); late final _sel_mainBundle = objc.registerName("mainBundle"); final _objc_msgSend_33 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); final _objc_msgSend_34 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithPath_ = objc.registerName("initWithPath:"); late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); final _objc_msgSend_35 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithURL_ = objc.registerName("initWithURL:"); late final _sel_bundleForClass_ = objc.registerName("bundleForClass:"); final _objc_msgSend_36 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_bundleWithIdentifier_ = objc.registerName("bundleWithIdentifier:"); final _objc_msgSend_37 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_allBundles = objc.registerName("allBundles"); late final _sel_allFrameworks = objc.registerName("allFrameworks"); late final _sel_load = objc.registerName("load"); late final _sel_isLoaded = objc.registerName("isLoaded"); late final _sel_unload = objc.registerName("unload"); late final _sel_preflightAndReturnError_ = objc.registerName("preflightAndReturnError:"); final _objc_msgSend_38 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); late final _sel_bundleURL = objc.registerName("bundleURL"); final _objc_msgSend_39 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_resourceURL = objc.registerName("resourceURL"); late final _sel_executableURL = objc.registerName("executableURL"); late final _sel_URLForAuxiliaryExecutable_ = objc.registerName("URLForAuxiliaryExecutable:"); final _objc_msgSend_40 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_privateFrameworksURL = objc.registerName("privateFrameworksURL"); late final _sel_sharedFrameworksURL = objc.registerName("sharedFrameworksURL"); late final _sel_sharedSupportURL = objc.registerName("sharedSupportURL"); late final _sel_builtInPlugInsURL = objc.registerName("builtInPlugInsURL"); late final _sel_appStoreReceiptURL = objc.registerName("appStoreReceiptURL"); late final _sel_bundlePath = objc.registerName("bundlePath"); late final _sel_resourcePath = objc.registerName("resourcePath"); late final _sel_executablePath = objc.registerName("executablePath"); late final _sel_pathForAuxiliaryExecutable_ = objc.registerName("pathForAuxiliaryExecutable:"); final _objc_msgSend_41 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_privateFrameworksPath = objc.registerName("privateFrameworksPath"); late final _sel_sharedFrameworksPath = objc.registerName("sharedFrameworksPath"); late final _sel_sharedSupportPath = objc.registerName("sharedSupportPath"); late final _sel_builtInPlugInsPath = objc.registerName("builtInPlugInsPath"); late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = objc.registerName( "URLForResource:withExtension:subdirectory:inBundleWithURL:"); final _objc_msgSend_42 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_ = objc.registerName( "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); final _objc_msgSend_43 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLForResource_withExtension_ = objc.registerName("URLForResource:withExtension:"); final _objc_msgSend_44 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLForResource_withExtension_subdirectory_ = objc.registerName("URLForResource:withExtension:subdirectory:"); final _objc_msgSend_45 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc .registerName("URLForResource:withExtension:subdirectory:localization:"); final _objc_msgSend_46 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLsForResourcesWithExtension_subdirectory_ = objc.registerName("URLsForResourcesWithExtension:subdirectory:"); final _objc_msgSend_47 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); final _objc_msgSend_48 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pathForResource_ofType_inDirectory_ = objc.registerName("pathForResource:ofType:inDirectory:"); final _objc_msgSend_49 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pathsForResourcesOfType_inDirectory_ = objc.registerName("pathsForResourcesOfType:inDirectory:"); final _objc_msgSend_50 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pathForResource_ofType_ = objc.registerName("pathForResource:ofType:"); final _objc_msgSend_51 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = objc.registerName("pathForResource:ofType:inDirectory:forLocalization:"); final _objc_msgSend_52 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = objc.registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); final _objc_msgSend_53 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_localizedStringForKey_value_table_ = objc.registerName("localizedStringForKey:value:table:"); final _objc_msgSend_54 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSAttributedString class NSAttributedString extends objc.NSObject { NSAttributedString._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSAttributedString] that points to the same underlying object as [other]. NSAttributedString.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSAttributedString] that wraps the given raw object pointer. NSAttributedString.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSAttributedString]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); } /// string objc.NSString get string { final _ret = _objc_msgSend_11(this.pointer, _sel_string); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// attributesAtIndex:effectiveRange: objc.NSDictionary attributesAtIndex_effectiveRange_( int location, ffi.Pointer<_NSRange> range) { final _ret = _objc_msgSend_55( this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// length int get length { return _objc_msgSend_56(this.pointer, _sel_length); } /// attribute:atIndex:effectiveRange: objc.ObjCObjectBase? attribute_atIndex_effectiveRange_( objc.NSString attrName, int location, ffi.Pointer<_NSRange> range) { final _ret = _objc_msgSend_57( this.pointer, _sel_attribute_atIndex_effectiveRange_, attrName.pointer, location, range); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributedSubstringFromRange: NSAttributedString attributedSubstringFromRange_(_NSRange range) { final _ret = _objc_msgSend_58( this.pointer, _sel_attributedSubstringFromRange_, range); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// attributesAtIndex:longestEffectiveRange:inRange: objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { final _ret = _objc_msgSend_59( this.pointer, _sel_attributesAtIndex_longestEffectiveRange_inRange_, location, range, rangeLimit); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// attribute:atIndex:longestEffectiveRange:inRange: objc.ObjCObjectBase? attribute_atIndex_longestEffectiveRange_inRange_( objc.NSString attrName, int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { final _ret = _objc_msgSend_60( this.pointer, _sel_attribute_atIndex_longestEffectiveRange_inRange_, attrName.pointer, location, range, rangeLimit); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// isEqualToAttributedString: bool isEqualToAttributedString_(NSAttributedString other) { return _objc_msgSend_61( this.pointer, _sel_isEqualToAttributedString_, other.pointer); } /// initWithString: NSAttributedString initWithString_(objc.NSString str) { final _ret = _objc_msgSend_62(this.pointer, _sel_initWithString_, str.pointer); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithString:attributes: NSAttributedString initWithString_attributes_( objc.NSString str, objc.NSDictionary? attrs) { final _ret = _objc_msgSend_63(this.pointer, _sel_initWithString_attributes_, str.pointer, attrs?.pointer ?? ffi.nullptr); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithAttributedString: NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { final _ret = _objc_msgSend_64( this.pointer, _sel_initWithAttributedString_, attrStr.pointer); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// enumerateAttributesInRange:options:usingBlock: void enumerateAttributesInRange_options_usingBlock_( _NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { _objc_msgSend_65( this.pointer, _sel_enumerateAttributesInRange_options_usingBlock_, enumerationRange, opts.value, block.pointer); } /// enumerateAttribute:inRange:options:usingBlock: void enumerateAttribute_inRange_options_usingBlock_( objc.NSString attrName, _NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { _objc_msgSend_66( this.pointer, _sel_enumerateAttribute_inRange_options_usingBlock_, attrName.pointer, enumerationRange, opts.value, block.pointer); } /// initWithContentsOfMarkdownFileAtURL:options:baseURL:error: NSAttributedString? initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( objc.NSURL markdownFile, NSAttributedStringMarkdownParsingOptions? options, objc.NSURL? baseURL, ffi.Pointer> error) { final _ret = _objc_msgSend_71( this.pointer, _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, markdownFile.pointer, options?.pointer ?? ffi.nullptr, baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithMarkdown:options:baseURL:error: NSAttributedString? initWithMarkdown_options_baseURL_error_( objc.NSData markdown, NSAttributedStringMarkdownParsingOptions? options, objc.NSURL? baseURL, ffi.Pointer> error) { final _ret = _objc_msgSend_72( this.pointer, _sel_initWithMarkdown_options_baseURL_error_, markdown.pointer, options?.pointer ?? ffi.nullptr, baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithMarkdownString:options:baseURL:error: NSAttributedString? initWithMarkdownString_options_baseURL_error_( objc.NSString markdownString, NSAttributedStringMarkdownParsingOptions? options, objc.NSURL? baseURL, ffi.Pointer> error) { final _ret = _objc_msgSend_73( this.pointer, _sel_initWithMarkdownString_options_baseURL_error_, markdownString.pointer, options?.pointer ?? ffi.nullptr, baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale: NSAttributedString initWithFormat_options_locale_(NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale) { final _ret = _objc_msgSend_74( this.pointer, _sel_initWithFormat_options_locale_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale:arguments: NSAttributedString initWithFormat_options_locale_arguments_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale, ffi.Pointer arguments) { final _ret = _objc_msgSend_75( this.pointer, _sel_initWithFormat_options_locale_arguments_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr, arguments); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat: static NSAttributedString localizedAttributedStringWithFormat_( NSAttributedString format) { final _ret = _objc_msgSend_64(_class_NSAttributedString, _sel_localizedAttributedStringWithFormat_, format.pointer); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat:options: static NSAttributedString localizedAttributedStringWithFormat_options_( NSAttributedString format, NSAttributedStringFormattingOptions options) { final _ret = _objc_msgSend_76( _class_NSAttributedString, _sel_localizedAttributedStringWithFormat_options_, format.pointer, options.value); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale:context: NSAttributedString initWithFormat_options_locale_context_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale, objc.NSDictionary context) { final _ret = _objc_msgSend_77( this.pointer, _sel_initWithFormat_options_locale_context_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr, context.pointer); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale:context:arguments: NSAttributedString initWithFormat_options_locale_context_arguments_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale, objc.NSDictionary context, ffi.Pointer arguments) { final _ret = _objc_msgSend_78( this.pointer, _sel_initWithFormat_options_locale_context_arguments_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr, context.pointer, arguments); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat:context: static NSAttributedString localizedAttributedStringWithFormat_context_( NSAttributedString format, objc.NSDictionary context) { final _ret = _objc_msgSend_79( _class_NSAttributedString, _sel_localizedAttributedStringWithFormat_context_, format.pointer, context.pointer); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat:options:context: static NSAttributedString localizedAttributedStringWithFormat_options_context_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSDictionary context) { final _ret = _objc_msgSend_80( _class_NSAttributedString, _sel_localizedAttributedStringWithFormat_options_context_, format.pointer, options.value, context.pointer); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// attributedStringByInflectingString NSAttributedString attributedStringByInflectingString() { final _ret = _objc_msgSend_81(this.pointer, _sel_attributedStringByInflectingString); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// init NSAttributedString init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// new static NSAttributedString new1() { final _ret = _objc_msgSend_19(_class_NSAttributedString, _sel_new); return NSAttributedString.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSAttributedString, _sel_allocWithZone_, zone); return NSAttributedString.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSAttributedString alloc() { final _ret = _objc_msgSend_19(_class_NSAttributedString, _sel_alloc); return NSAttributedString.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSAttributedString, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSAttributedString, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSAttributedString, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSAttributedString, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSAttributedString = objc.getClass("NSAttributedString"); late final _sel_string = objc.registerName("string"); final class _NSRange extends ffi.Struct { @ffi.UnsignedLong() external int location; @ffi.UnsignedLong() external int length; } late final _sel_attributesAtIndex_effectiveRange_ = objc.registerName("attributesAtIndex:effectiveRange:"); final _objc_msgSend_55 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer<_NSRange>)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); late final _sel_length = objc.registerName("length"); final _objc_msgSend_56 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_attribute_atIndex_effectiveRange_ = objc.registerName("attribute:atIndex:effectiveRange:"); final _objc_msgSend_57 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer<_NSRange>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); late final _sel_attributedSubstringFromRange_ = objc.registerName("attributedSubstringFromRange:"); final _objc_msgSend_58 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); final _objc_msgSend_59 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer<_NSRange>, _NSRange)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_NSRange>, _NSRange)>(); late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); final _objc_msgSend_60 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer<_NSRange>, _NSRange)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_NSRange>, _NSRange)>(); late final _sel_isEqualToAttributedString_ = objc.registerName("isEqualToAttributedString:"); final _objc_msgSend_61 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithString_ = objc.registerName("initWithString:"); final _objc_msgSend_62 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithString_attributes_ = objc.registerName("initWithString:attributes:"); final _objc_msgSend_63 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithAttributedString_ = objc.registerName("initWithAttributedString:"); final _objc_msgSend_64 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); enum NSAttributedStringEnumerationOptions { NSAttributedStringEnumerationReverse(2), NSAttributedStringEnumerationLongestEffectiveRangeNotRequired(1048576); final int value; const NSAttributedStringEnumerationOptions(this.value); static NSAttributedStringEnumerationOptions fromValue(int value) => switch (value) { 2 => NSAttributedStringEnumerationReverse, 1048576 => NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, _ => throw ArgumentError( "Unknown value for NSAttributedStringEnumerationOptions: $value"), }; } void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2)>>() .asFunction< void Function(ffi.Pointer, _NSRange, ffi.Pointer)>()(arg0, arg1, arg2); void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => (objc.getBlockClosure(block) as void Function(ffi.Pointer, _NSRange, ffi.Pointer))(arg0, arg1, arg2); class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._( ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSDictionary_NSRange_bool castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._(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. ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunctionPointer( ffi.Pointer< ffi .NativeFunction< ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction( void Function(objc.NSDictionary, _NSRange, ffi.Pointer) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) .cast(), (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.listener( void Function(objc.NSDictionary, _NSRange, ffi.Pointer) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool( objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => fn(objc.NSDictionary.castFromPointer(arg0, retain: false, release: true), arg1, arg2)))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; void call( objc.NSDictionary arg0, _NSRange arg1, ffi.Pointer arg2) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); } late final _sel_enumerateAttributesInRange_options_usingBlock_ = objc.registerName("enumerateAttributesInRange:options:usingBlock:"); final _objc_msgSend_65 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, _NSRange, int, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2)>>() .asFunction< void Function(ffi.Pointer, _NSRange, ffi.Pointer)>()(arg0, arg1, arg2); void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => (objc.getBlockClosure(block) as void Function(ffi.Pointer, _NSRange, ffi.Pointer))(arg0, arg1, arg2); class ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._( ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._(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. ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>( _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunction( void Function(objc.ObjCObjectBase?, _NSRange, ffi.Pointer) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>( _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) .cast(), (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: true, release: true), arg1, arg2))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.listener( void Function(objc.ObjCObjectBase?, _NSRange, ffi.Pointer) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool( objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), arg1, arg2)))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(objc.ObjCObjectBase? arg0, _NSRange arg1, ffi.Pointer arg2) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); } late final _sel_enumerateAttribute_inRange_options_usingBlock_ = objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); final _objc_msgSend_66 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange, int, ffi.Pointer)>(); /// NSAttributedStringMarkdownParsingOptions class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { NSAttributedStringMarkdownParsingOptions._( ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. NSAttributedStringMarkdownParsingOptions.castFromPointer( ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSAttributedStringMarkdownParsingOptions); } /// init NSAttributedStringMarkdownParsingOptions init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: true, release: true); } /// allowsExtendedAttributes bool get allowsExtendedAttributes { return _objc_msgSend_13(this.pointer, _sel_allowsExtendedAttributes); } /// setAllowsExtendedAttributes: set allowsExtendedAttributes(bool value) { return _objc_msgSend_14( this.pointer, _sel_setAllowsExtendedAttributes_, value); } /// interpretedSyntax NSAttributedStringMarkdownInterpretedSyntax get interpretedSyntax { final _ret = _objc_msgSend_67(this.pointer, _sel_interpretedSyntax); return NSAttributedStringMarkdownInterpretedSyntax.fromValue(_ret); } /// setInterpretedSyntax: set interpretedSyntax(NSAttributedStringMarkdownInterpretedSyntax value) { return _objc_msgSend_68( this.pointer, _sel_setInterpretedSyntax_, value.value); } /// failurePolicy NSAttributedStringMarkdownParsingFailurePolicy get failurePolicy { final _ret = _objc_msgSend_69(this.pointer, _sel_failurePolicy); return NSAttributedStringMarkdownParsingFailurePolicy.fromValue(_ret); } /// setFailurePolicy: set failurePolicy(NSAttributedStringMarkdownParsingFailurePolicy value) { return _objc_msgSend_70(this.pointer, _sel_setFailurePolicy_, value.value); } /// languageCode objc.NSString? get languageCode { final _ret = _objc_msgSend_20(this.pointer, _sel_languageCode); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setLanguageCode: set languageCode(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); } /// appliesSourcePositionAttributes bool get appliesSourcePositionAttributes { return _objc_msgSend_13(this.pointer, _sel_appliesSourcePositionAttributes); } /// setAppliesSourcePositionAttributes: set appliesSourcePositionAttributes(bool value) { return _objc_msgSend_14( this.pointer, _sel_setAppliesSourcePositionAttributes_, value); } /// new static NSAttributedStringMarkdownParsingOptions new1() { final _ret = _objc_msgSend_19( _class_NSAttributedStringMarkdownParsingOptions, _sel_new); return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSAttributedStringMarkdownParsingOptions allocWithZone_( ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28( _class_NSAttributedStringMarkdownParsingOptions, _sel_allocWithZone_, zone); return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSAttributedStringMarkdownParsingOptions alloc() { final _ret = _objc_msgSend_19( _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSAttributedStringMarkdownParsingOptions, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSAttributedStringMarkdownParsingOptions, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13(_class_NSAttributedStringMarkdownParsingOptions, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSAttributedStringMarkdownParsingOptions, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30( _class_NSAttributedStringMarkdownParsingOptions, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSAttributedStringMarkdownParsingOptions, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSAttributedStringMarkdownParsingOptions, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSAttributedStringMarkdownParsingOptions, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSAttributedStringMarkdownParsingOptions = objc.getClass("NSAttributedStringMarkdownParsingOptions"); late final _sel_allowsExtendedAttributes = objc.registerName("allowsExtendedAttributes"); late final _sel_setAllowsExtendedAttributes_ = objc.registerName("setAllowsExtendedAttributes:"); enum NSAttributedStringMarkdownInterpretedSyntax { NSAttributedStringMarkdownInterpretedSyntaxFull(0), NSAttributedStringMarkdownInterpretedSyntaxInlineOnly(1), NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace(2); final int value; const NSAttributedStringMarkdownInterpretedSyntax(this.value); static NSAttributedStringMarkdownInterpretedSyntax fromValue(int value) => switch (value) { 0 => NSAttributedStringMarkdownInterpretedSyntaxFull, 1 => NSAttributedStringMarkdownInterpretedSyntaxInlineOnly, 2 => NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace, _ => throw ArgumentError( "Unknown value for NSAttributedStringMarkdownInterpretedSyntax: $value"), }; } late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); final _objc_msgSend_67 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setInterpretedSyntax_ = objc.registerName("setInterpretedSyntax:"); final _objc_msgSend_68 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSAttributedStringMarkdownParsingFailurePolicy { NSAttributedStringMarkdownParsingFailureReturnError(0), NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible(1); final int value; const NSAttributedStringMarkdownParsingFailurePolicy(this.value); static NSAttributedStringMarkdownParsingFailurePolicy fromValue(int value) => switch (value) { 0 => NSAttributedStringMarkdownParsingFailureReturnError, 1 => NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, _ => throw ArgumentError( "Unknown value for NSAttributedStringMarkdownParsingFailurePolicy: $value"), }; } late final _sel_failurePolicy = objc.registerName("failurePolicy"); final _objc_msgSend_69 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); final _objc_msgSend_70 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_languageCode = objc.registerName("languageCode"); late final _sel_setLanguageCode_ = objc.registerName("setLanguageCode:"); late final _sel_appliesSourcePositionAttributes = objc.registerName("appliesSourcePositionAttributes"); late final _sel_setAppliesSourcePositionAttributes_ = objc.registerName("setAppliesSourcePositionAttributes:"); late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = objc.registerName( "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); final _objc_msgSend_71 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_initWithMarkdown_options_baseURL_error_ = objc.registerName("initWithMarkdown:options:baseURL:error:"); final _objc_msgSend_72 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_initWithMarkdownString_options_baseURL_error_ = objc.registerName("initWithMarkdownString:options:baseURL:error:"); final _objc_msgSend_73 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); enum NSAttributedStringFormattingOptions { NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging(1), NSAttributedStringFormattingApplyReplacementIndexAttribute(2); final int value; const NSAttributedStringFormattingOptions(this.value); static NSAttributedStringFormattingOptions fromValue(int value) => switch (value) { 1 => NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, 2 => NSAttributedStringFormattingApplyReplacementIndexAttribute, _ => throw ArgumentError( "Unknown value for NSAttributedStringFormattingOptions: $value"), }; } late final _sel_initWithFormat_options_locale_ = objc.registerName("initWithFormat:options:locale:"); final _objc_msgSend_74 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_initWithFormat_options_locale_arguments_ = objc.registerName("initWithFormat:options:locale:arguments:"); final _objc_msgSend_75 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer)>(); late final _sel_localizedAttributedStringWithFormat_ = objc.registerName("localizedAttributedStringWithFormat:"); late final _sel_localizedAttributedStringWithFormat_options_ = objc.registerName("localizedAttributedStringWithFormat:options:"); final _objc_msgSend_76 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithFormat_options_locale_context_ = objc.registerName("initWithFormat:options:locale:context:"); final _objc_msgSend_77 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithFormat_options_locale_context_arguments_ = objc.registerName("initWithFormat:options:locale:context:arguments:"); final _objc_msgSend_78 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_localizedAttributedStringWithFormat_context_ = objc.registerName("localizedAttributedStringWithFormat:context:"); final _objc_msgSend_79 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_localizedAttributedStringWithFormat_options_context_ = objc.registerName("localizedAttributedStringWithFormat:options:context:"); final _objc_msgSend_80 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_attributedStringByInflectingString = objc.registerName("attributedStringByInflectingString"); final _objc_msgSend_81 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_localizedAttributedStringForKey_value_table_ = objc.registerName("localizedAttributedStringForKey:value:table:"); final _objc_msgSend_82 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_bundleIdentifier = objc.registerName("bundleIdentifier"); late final _sel_infoDictionary = objc.registerName("infoDictionary"); final _objc_msgSend_83 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_localizedInfoDictionary = objc.registerName("localizedInfoDictionary"); late final _sel_objectForInfoDictionaryKey_ = objc.registerName("objectForInfoDictionaryKey:"); late final _sel_classNamed_ = objc.registerName("classNamed:"); late final _sel_principalClass = objc.registerName("principalClass"); final _objc_msgSend_84 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_preferredLocalizations = objc.registerName("preferredLocalizations"); late final _sel_localizations = objc.registerName("localizations"); late final _sel_developmentLocalization = objc.registerName("developmentLocalization"); late final _sel_preferredLocalizationsFromArray_ = objc.registerName("preferredLocalizationsFromArray:"); final _objc_msgSend_85 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_preferredLocalizationsFromArray_forPreferences_ = objc.registerName("preferredLocalizationsFromArray:forPreferences:"); final _objc_msgSend_86 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_executableArchitectures = objc.registerName("executableArchitectures"); final _objc_msgSend_87 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPreservationPriority_forTags_ = objc.registerName("setPreservationPriority:forTags:"); final _objc_msgSend_88 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Double, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, double, ffi.Pointer)>(); late final _sel_preservationPriorityForTag_ = objc.registerName("preservationPriorityForTag:"); final _objc_msgSend_89 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Double Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_89Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< ffi.Double Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSMutableAttributedString class NSMutableAttributedString extends NSAttributedString { NSMutableAttributedString._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSMutableAttributedString] that points to the same underlying object as [other]. NSMutableAttributedString.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSMutableAttributedString] that wraps the given raw object pointer. NSMutableAttributedString.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSMutableAttributedString]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); } /// replaceCharactersInRange:withString: void replaceCharactersInRange_withString_(_NSRange range, objc.NSString str) { _objc_msgSend_90(this.pointer, _sel_replaceCharactersInRange_withString_, range, str.pointer); } /// setAttributes:range: void setAttributes_range_(objc.NSDictionary? attrs, _NSRange range) { _objc_msgSend_91(this.pointer, _sel_setAttributes_range_, attrs?.pointer ?? ffi.nullptr, range); } /// mutableString objc.NSMutableString get mutableString { final _ret = _objc_msgSend_92(this.pointer, _sel_mutableString); return objc.NSMutableString.castFromPointer(_ret, retain: true, release: true); } /// addAttribute:value:range: void addAttribute_value_range_( objc.NSString name, objc.ObjCObjectBase value, _NSRange range) { _objc_msgSend_93(this.pointer, _sel_addAttribute_value_range_, name.pointer, value.pointer, range); } /// addAttributes:range: void addAttributes_range_(objc.NSDictionary attrs, _NSRange range) { _objc_msgSend_94( this.pointer, _sel_addAttributes_range_, attrs.pointer, range); } /// removeAttribute:range: void removeAttribute_range_(objc.NSString name, _NSRange range) { _objc_msgSend_95( this.pointer, _sel_removeAttribute_range_, name.pointer, range); } /// replaceCharactersInRange:withAttributedString: void replaceCharactersInRange_withAttributedString_( _NSRange range, NSAttributedString attrString) { _objc_msgSend_96( this.pointer, _sel_replaceCharactersInRange_withAttributedString_, range, attrString.pointer); } /// insertAttributedString:atIndex: void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { _objc_msgSend_97(this.pointer, _sel_insertAttributedString_atIndex_, attrString.pointer, loc); } /// appendAttributedString: void appendAttributedString_(NSAttributedString attrString) { _objc_msgSend_98( this.pointer, _sel_appendAttributedString_, attrString.pointer); } /// deleteCharactersInRange: void deleteCharactersInRange_(_NSRange range) { _objc_msgSend_99(this.pointer, _sel_deleteCharactersInRange_, range); } /// setAttributedString: void setAttributedString_(NSAttributedString attrString) { _objc_msgSend_98( this.pointer, _sel_setAttributedString_, attrString.pointer); } /// beginEditing void beginEditing() { _objc_msgSend_7(this.pointer, _sel_beginEditing); } /// endEditing void endEditing() { _objc_msgSend_7(this.pointer, _sel_endEditing); } /// appendLocalizedFormat: void appendLocalizedFormat_(NSAttributedString format) { _objc_msgSend_98(this.pointer, _sel_appendLocalizedFormat_, format.pointer); } /// initWithString: NSMutableAttributedString initWithString_(objc.NSString str) { final _ret = _objc_msgSend_62(this.pointer, _sel_initWithString_, str.pointer); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithString:attributes: NSMutableAttributedString initWithString_attributes_( objc.NSString str, objc.NSDictionary? attrs) { final _ret = _objc_msgSend_63(this.pointer, _sel_initWithString_attributes_, str.pointer, attrs?.pointer ?? ffi.nullptr); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithAttributedString: NSMutableAttributedString initWithAttributedString_( NSAttributedString attrStr) { final _ret = _objc_msgSend_64( this.pointer, _sel_initWithAttributedString_, attrStr.pointer); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithContentsOfMarkdownFileAtURL:options:baseURL:error: NSMutableAttributedString? initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( objc.NSURL markdownFile, NSAttributedStringMarkdownParsingOptions? options, objc.NSURL? baseURL, ffi.Pointer> error) { final _ret = _objc_msgSend_71( this.pointer, _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, markdownFile.pointer, options?.pointer ?? ffi.nullptr, baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null : NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithMarkdown:options:baseURL:error: NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( objc.NSData markdown, NSAttributedStringMarkdownParsingOptions? options, objc.NSURL? baseURL, ffi.Pointer> error) { final _ret = _objc_msgSend_72( this.pointer, _sel_initWithMarkdown_options_baseURL_error_, markdown.pointer, options?.pointer ?? ffi.nullptr, baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null : NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithMarkdownString:options:baseURL:error: NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( objc.NSString markdownString, NSAttributedStringMarkdownParsingOptions? options, objc.NSURL? baseURL, ffi.Pointer> error) { final _ret = _objc_msgSend_73( this.pointer, _sel_initWithMarkdownString_options_baseURL_error_, markdownString.pointer, options?.pointer ?? ffi.nullptr, baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null : NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale: NSMutableAttributedString initWithFormat_options_locale_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale) { final _ret = _objc_msgSend_74( this.pointer, _sel_initWithFormat_options_locale_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale:arguments: NSMutableAttributedString initWithFormat_options_locale_arguments_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale, ffi.Pointer arguments) { final _ret = _objc_msgSend_75( this.pointer, _sel_initWithFormat_options_locale_arguments_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr, arguments); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat: static NSMutableAttributedString localizedAttributedStringWithFormat_( NSAttributedString format) { final _ret = _objc_msgSend_64(_class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_, format.pointer); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat:options: static NSMutableAttributedString localizedAttributedStringWithFormat_options_( NSAttributedString format, NSAttributedStringFormattingOptions options) { final _ret = _objc_msgSend_76( _class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_options_, format.pointer, options.value); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale:context: NSMutableAttributedString initWithFormat_options_locale_context_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale, objc.NSDictionary context) { final _ret = _objc_msgSend_77( this.pointer, _sel_initWithFormat_options_locale_context_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr, context.pointer); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// initWithFormat:options:locale:context:arguments: NSMutableAttributedString initWithFormat_options_locale_context_arguments_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale, objc.NSDictionary context, ffi.Pointer arguments) { final _ret = _objc_msgSend_78( this.pointer, _sel_initWithFormat_options_locale_context_arguments_, format.pointer, options.value, locale?.pointer ?? ffi.nullptr, context.pointer, arguments); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat:context: static NSMutableAttributedString localizedAttributedStringWithFormat_context_( NSAttributedString format, objc.NSDictionary context) { final _ret = _objc_msgSend_79( _class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_context_, format.pointer, context.pointer); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// localizedAttributedStringWithFormat:options:context: static NSMutableAttributedString localizedAttributedStringWithFormat_options_context_( NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSDictionary context) { final _ret = _objc_msgSend_80( _class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_options_context_, format.pointer, options.value, context.pointer); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// init NSMutableAttributedString init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); } /// new static NSMutableAttributedString new1() { final _ret = _objc_msgSend_19(_class_NSMutableAttributedString, _sel_new); return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28( _class_NSMutableAttributedString, _sel_allocWithZone_, zone); return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSMutableAttributedString alloc() { final _ret = _objc_msgSend_19(_class_NSMutableAttributedString, _sel_alloc); return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSMutableAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSMutableAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13( _class_NSMutableAttributedString, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSMutableAttributedString, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSMutableAttributedString, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSMutableAttributedString = objc.getClass("NSMutableAttributedString"); late final _sel_replaceCharactersInRange_withString_ = objc.registerName("replaceCharactersInRange:withString:"); final _objc_msgSend_90 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_setAttributes_range_ = objc.registerName("setAttributes:range:"); final _objc_msgSend_91 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_mutableString = objc.registerName("mutableString"); final _objc_msgSend_92 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_addAttribute_value_range_ = objc.registerName("addAttribute:value:range:"); final _objc_msgSend_93 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_addAttributes_range_ = objc.registerName("addAttributes:range:"); final _objc_msgSend_94 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_removeAttribute_range_ = objc.registerName("removeAttribute:range:"); final _objc_msgSend_95 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_replaceCharactersInRange_withAttributedString_ = objc.registerName("replaceCharactersInRange:withAttributedString:"); final _objc_msgSend_96 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_insertAttributedString_atIndex_ = objc.registerName("insertAttributedString:atIndex:"); final _objc_msgSend_97 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_appendAttributedString_ = objc.registerName("appendAttributedString:"); final _objc_msgSend_98 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_deleteCharactersInRange_ = objc.registerName("deleteCharactersInRange:"); final _objc_msgSend_99 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_setAttributedString_ = objc.registerName("setAttributedString:"); late final _sel_beginEditing = objc.registerName("beginEditing"); late final _sel_endEditing = objc.registerName("endEditing"); late final _sel_appendLocalizedFormat_ = objc.registerName("appendLocalizedFormat:"); enum NSLocaleLanguageDirection { NSLocaleLanguageDirectionUnknown(0), NSLocaleLanguageDirectionLeftToRight(1), NSLocaleLanguageDirectionRightToLeft(2), NSLocaleLanguageDirectionTopToBottom(3), NSLocaleLanguageDirectionBottomToTop(4); final int value; const NSLocaleLanguageDirection(this.value); static NSLocaleLanguageDirection fromValue(int value) => switch (value) { 0 => NSLocaleLanguageDirectionUnknown, 1 => NSLocaleLanguageDirectionLeftToRight, 2 => NSLocaleLanguageDirectionRightToLeft, 3 => NSLocaleLanguageDirectionTopToBottom, 4 => NSLocaleLanguageDirectionBottomToTop, _ => throw ArgumentError( "Unknown value for NSLocaleLanguageDirection: $value"), }; } /// NSScanner class NSScanner extends objc.NSObject { NSScanner._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSScanner] that points to the same underlying object as [other]. NSScanner.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSScanner] that wraps the given raw object pointer. NSScanner.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSScanner]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSScanner); } /// string objc.NSString get string { final _ret = _objc_msgSend_11(this.pointer, _sel_string); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// scanLocation int get scanLocation { return _objc_msgSend_56(this.pointer, _sel_scanLocation); } /// setScanLocation: set scanLocation(int value) { return _objc_msgSend_100(this.pointer, _sel_setScanLocation_, value); } /// charactersToBeSkipped objc.NSCharacterSet? get charactersToBeSkipped { final _ret = _objc_msgSend_101(this.pointer, _sel_charactersToBeSkipped); return _ret.address == 0 ? null : objc.NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// setCharactersToBeSkipped: set charactersToBeSkipped(objc.NSCharacterSet? value) { return _objc_msgSend_102(this.pointer, _sel_setCharactersToBeSkipped_, value?.pointer ?? ffi.nullptr); } /// caseSensitive bool get caseSensitive { return _objc_msgSend_13(this.pointer, _sel_caseSensitive); } /// setCaseSensitive: set caseSensitive(bool value) { return _objc_msgSend_14(this.pointer, _sel_setCaseSensitive_, value); } /// locale objc.ObjCObjectBase? get locale { final _ret = _objc_msgSend_84(this.pointer, _sel_locale); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setLocale: set locale(objc.ObjCObjectBase? value) { return _objc_msgSend_103( this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); } /// initWithString: NSScanner initWithString_(objc.NSString string) { final _ret = _objc_msgSend_62(this.pointer, _sel_initWithString_, string.pointer); return NSScanner.castFromPointer(_ret, retain: true, release: true); } /// scanInt: bool scanInt_(ffi.Pointer result) { return _objc_msgSend_104(this.pointer, _sel_scanInt_, result); } /// scanInteger: bool scanInteger_(ffi.Pointer result) { return _objc_msgSend_105(this.pointer, _sel_scanInteger_, result); } /// scanLongLong: bool scanLongLong_(ffi.Pointer result) { return _objc_msgSend_106(this.pointer, _sel_scanLongLong_, result); } /// scanUnsignedLongLong: bool scanUnsignedLongLong_(ffi.Pointer result) { return _objc_msgSend_107(this.pointer, _sel_scanUnsignedLongLong_, result); } /// scanFloat: bool scanFloat_(ffi.Pointer result) { return _objc_msgSend_108(this.pointer, _sel_scanFloat_, result); } /// scanDouble: bool scanDouble_(ffi.Pointer result) { return _objc_msgSend_109(this.pointer, _sel_scanDouble_, result); } /// scanHexInt: bool scanHexInt_(ffi.Pointer result) { return _objc_msgSend_110(this.pointer, _sel_scanHexInt_, result); } /// scanHexLongLong: bool scanHexLongLong_(ffi.Pointer result) { return _objc_msgSend_107(this.pointer, _sel_scanHexLongLong_, result); } /// scanHexFloat: bool scanHexFloat_(ffi.Pointer result) { return _objc_msgSend_108(this.pointer, _sel_scanHexFloat_, result); } /// scanHexDouble: bool scanHexDouble_(ffi.Pointer result) { return _objc_msgSend_109(this.pointer, _sel_scanHexDouble_, result); } /// scanString:intoString: bool scanString_intoString_( objc.NSString string, ffi.Pointer> result) { return _objc_msgSend_111( this.pointer, _sel_scanString_intoString_, string.pointer, result); } /// scanCharactersFromSet:intoString: bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, ffi.Pointer> result) { return _objc_msgSend_112(this.pointer, _sel_scanCharactersFromSet_intoString_, set.pointer, result); } /// scanUpToString:intoString: bool scanUpToString_intoString_( objc.NSString string, ffi.Pointer> result) { return _objc_msgSend_111( this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); } /// scanUpToCharactersFromSet:intoString: bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, ffi.Pointer> result) { return _objc_msgSend_112(this.pointer, _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); } /// isAtEnd bool get atEnd { return _objc_msgSend_13(this.pointer, _sel_isAtEnd); } /// scannerWithString: static NSScanner scannerWithString_(objc.NSString string) { final _ret = _objc_msgSend_62( _class_NSScanner, _sel_scannerWithString_, string.pointer); return NSScanner.castFromPointer(_ret, retain: true, release: true); } /// localizedScannerWithString: static objc.ObjCObjectBase localizedScannerWithString_(objc.NSString string) { final _ret = _objc_msgSend_62( _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// scanDecimal: bool scanDecimal_(ffi.Pointer dcm) { return _objc_msgSend_113(this.pointer, _sel_scanDecimal_, dcm); } /// init NSScanner init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSScanner.castFromPointer(_ret, retain: true, release: true); } /// new static NSScanner new1() { final _ret = _objc_msgSend_19(_class_NSScanner, _sel_new); return NSScanner.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSScanner, _sel_allocWithZone_, zone); return NSScanner.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSScanner alloc() { final _ret = _objc_msgSend_19(_class_NSScanner, _sel_alloc); return NSScanner.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSScanner, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSScanner, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSScanner, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSScanner, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSScanner, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSScanner, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSScanner, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSScanner = objc.getClass("NSScanner"); late final _sel_scanLocation = objc.registerName("scanLocation"); late final _sel_setScanLocation_ = objc.registerName("setScanLocation:"); final _objc_msgSend_100 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_charactersToBeSkipped = objc.registerName("charactersToBeSkipped"); final _objc_msgSend_101 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setCharactersToBeSkipped_ = objc.registerName("setCharactersToBeSkipped:"); final _objc_msgSend_102 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_caseSensitive = objc.registerName("caseSensitive"); late final _sel_setCaseSensitive_ = objc.registerName("setCaseSensitive:"); late final _sel_locale = objc.registerName("locale"); late final _sel_setLocale_ = objc.registerName("setLocale:"); final _objc_msgSend_103 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanInt_ = objc.registerName("scanInt:"); final _objc_msgSend_104 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanInteger_ = objc.registerName("scanInteger:"); final _objc_msgSend_105 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanLongLong_ = objc.registerName("scanLongLong:"); final _objc_msgSend_106 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanUnsignedLongLong_ = objc.registerName("scanUnsignedLongLong:"); final _objc_msgSend_107 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanFloat_ = objc.registerName("scanFloat:"); final _objc_msgSend_108 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanDouble_ = objc.registerName("scanDouble:"); final _objc_msgSend_109 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanHexInt_ = objc.registerName("scanHexInt:"); final _objc_msgSend_110 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_scanHexLongLong_ = objc.registerName("scanHexLongLong:"); late final _sel_scanHexFloat_ = objc.registerName("scanHexFloat:"); late final _sel_scanHexDouble_ = objc.registerName("scanHexDouble:"); late final _sel_scanString_intoString_ = objc.registerName("scanString:intoString:"); final _objc_msgSend_111 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_scanCharactersFromSet_intoString_ = objc.registerName("scanCharactersFromSet:intoString:"); final _objc_msgSend_112 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_scanUpToString_intoString_ = objc.registerName("scanUpToString:intoString:"); late final _sel_scanUpToCharactersFromSet_intoString_ = objc.registerName("scanUpToCharactersFromSet:intoString:"); late final _sel_isAtEnd = objc.registerName("isAtEnd"); late final _sel_scannerWithString_ = objc.registerName("scannerWithString:"); late final _sel_localizedScannerWithString_ = objc.registerName("localizedScannerWithString:"); final class NSDecimal extends ffi.Opaque {} late final _sel_scanDecimal_ = objc.registerName("scanDecimal:"); final _objc_msgSend_113 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSException class NSException extends objc.NSObject { NSException._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSException] that points to the same underlying object as [other]. NSException.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSException] that wraps the given raw object pointer. NSException.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSException]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSException); } /// exceptionWithName:reason:userInfo: static NSException exceptionWithName_reason_userInfo_( objc.NSString name, objc.NSString? reason, objc.NSDictionary? userInfo) { final _ret = _objc_msgSend_114( _class_NSException, _sel_exceptionWithName_reason_userInfo_, name.pointer, reason?.pointer ?? ffi.nullptr, userInfo?.pointer ?? ffi.nullptr); return NSException.castFromPointer(_ret, retain: true, release: true); } /// initWithName:reason:userInfo: NSException initWithName_reason_userInfo_(objc.NSString aName, objc.NSString? aReason, objc.NSDictionary? aUserInfo) { final _ret = _objc_msgSend_115( this.pointer, _sel_initWithName_reason_userInfo_, aName.pointer, aReason?.pointer ?? ffi.nullptr, aUserInfo?.pointer ?? ffi.nullptr); return NSException.castFromPointer(_ret, retain: true, release: true); } /// name objc.NSString get name { final _ret = _objc_msgSend_11(this.pointer, _sel_name); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// reason objc.NSString? get reason { final _ret = _objc_msgSend_20(this.pointer, _sel_reason); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// userInfo objc.NSDictionary? get userInfo { final _ret = _objc_msgSend_83(this.pointer, _sel_userInfo); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// callStackReturnAddresses objc.NSArray get callStackReturnAddresses { final _ret = _objc_msgSend_32(this.pointer, _sel_callStackReturnAddresses); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// callStackSymbols objc.NSArray get callStackSymbols { final _ret = _objc_msgSend_32(this.pointer, _sel_callStackSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// raise void raise() { _objc_msgSend_7(this.pointer, _sel_raise); } /// raise:format: static void raise_format_(objc.NSString name, objc.NSString format) { _objc_msgSend_116( _class_NSException, _sel_raise_format_, name.pointer, format.pointer); } /// raise:format:arguments: static void raise_format_arguments_( objc.NSString name, objc.NSString format, ffi.Pointer argList) { _objc_msgSend_117(_class_NSException, _sel_raise_format_arguments_, name.pointer, format.pointer, argList); } /// init NSException init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSException.castFromPointer(_ret, retain: true, release: true); } /// new static NSException new1() { final _ret = _objc_msgSend_19(_class_NSException, _sel_new); return NSException.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSException, _sel_allocWithZone_, zone); return NSException.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSException alloc() { final _ret = _objc_msgSend_19(_class_NSException, _sel_alloc); return NSException.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSException, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSException, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSException, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSException, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSException, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSException, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSException = objc.getClass("NSException"); late final _sel_exceptionWithName_reason_userInfo_ = objc.registerName("exceptionWithName:reason:userInfo:"); final _objc_msgSend_114 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithName_reason_userInfo_ = objc.registerName("initWithName:reason:userInfo:"); final _objc_msgSend_115 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_name = objc.registerName("name"); late final _sel_reason = objc.registerName("reason"); late final _sel_callStackReturnAddresses = objc.registerName("callStackReturnAddresses"); late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); late final _sel_raise = objc.registerName("raise"); late final _sel_raise_format_ = objc.registerName("raise:format:"); final _objc_msgSend_116 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_raise_format_arguments_ = objc.registerName("raise:format:arguments:"); final _objc_msgSend_117 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSRunLoop class NSRunLoop extends objc.NSObject { NSRunLoop._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSRunLoop] that points to the same underlying object as [other]. NSRunLoop.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSRunLoop] that wraps the given raw object pointer. NSRunLoop.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSRunLoop]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); } /// currentRunLoop static NSRunLoop getCurrentRunLoop() { final _ret = _objc_msgSend_118(_class_NSRunLoop, _sel_currentRunLoop); return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } /// mainRunLoop static NSRunLoop getMainRunLoop() { final _ret = _objc_msgSend_118(_class_NSRunLoop, _sel_mainRunLoop); return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } /// currentMode objc.NSString? get currentMode { final _ret = _objc_msgSend_20(this.pointer, _sel_currentMode); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// getCFRunLoop ffi.Pointer<__CFRunLoop> getCFRunLoop() { return _objc_msgSend_119(this.pointer, _sel_getCFRunLoop); } /// addTimer:forMode: void addTimer_forMode_(NSTimer timer, objc.NSString mode) { _objc_msgSend_128( this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); } /// addPort:forMode: void addPort_forMode_(NSPort aPort, objc.NSString mode) { _objc_msgSend_134( this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); } /// removePort:forMode: void removePort_forMode_(NSPort aPort, objc.NSString mode) { _objc_msgSend_134( this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); } /// limitDateForMode: objc.NSDate? limitDateForMode_(objc.NSString mode) { final _ret = _objc_msgSend_135(this.pointer, _sel_limitDateForMode_, mode.pointer); return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// acceptInputForMode:beforeDate: void acceptInputForMode_beforeDate_( objc.NSString mode, objc.NSDate limitDate) { _objc_msgSend_136(this.pointer, _sel_acceptInputForMode_beforeDate_, mode.pointer, limitDate.pointer); } /// run void run() { _objc_msgSend_7(this.pointer, _sel_run); } /// runUntilDate: void runUntilDate_(objc.NSDate limitDate) { _objc_msgSend_137(this.pointer, _sel_runUntilDate_, limitDate.pointer); } /// runMode:beforeDate: bool runMode_beforeDate_(objc.NSString mode, objc.NSDate limitDate) { return _objc_msgSend_138(this.pointer, _sel_runMode_beforeDate_, mode.pointer, limitDate.pointer); } /// performInModes:block: void performInModes_block_(objc.NSArray modes, ObjCBlock_ffiVoid block) { _objc_msgSend_139( this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); } /// performBlock: void performBlock_(ObjCBlock_ffiVoid block) { _objc_msgSend_140(this.pointer, _sel_performBlock_, block.pointer); } /// performSelector:target:argument:order:modes: void performSelector_target_argument_order_modes_( ffi.Pointer aSelector, objc.ObjCObjectBase target, objc.ObjCObjectBase? arg, int order, objc.NSArray modes) { _objc_msgSend_141( this.pointer, _sel_performSelector_target_argument_order_modes_, aSelector, target.pointer, arg?.pointer ?? ffi.nullptr, order, modes.pointer); } /// cancelPerformSelector:target:argument: void cancelPerformSelector_target_argument_( ffi.Pointer aSelector, objc.ObjCObjectBase target, objc.ObjCObjectBase? arg) { _objc_msgSend_142(this.pointer, _sel_cancelPerformSelector_target_argument_, aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); } /// cancelPerformSelectorsWithTarget: void cancelPerformSelectorsWithTarget_(objc.ObjCObjectBase target) { _objc_msgSend_27( this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); } /// init NSRunLoop init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } /// new static NSRunLoop new1() { final _ret = _objc_msgSend_19(_class_NSRunLoop, _sel_new); return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSRunLoop allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSRunLoop, _sel_allocWithZone_, zone); return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSRunLoop alloc() { final _ret = _objc_msgSend_19(_class_NSRunLoop, _sel_alloc); return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSRunLoop, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSRunLoop, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSRunLoop, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSRunLoop, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSRunLoop, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSRunLoop, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSRunLoop, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSRunLoop = objc.getClass("NSRunLoop"); late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); final _objc_msgSend_118 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_mainRunLoop = objc.registerName("mainRunLoop"); late final _sel_currentMode = objc.registerName("currentMode"); final class __CFRunLoop extends ffi.Opaque {} late final _sel_getCFRunLoop = objc.registerName("getCFRunLoop"); final _objc_msgSend_119 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer<__CFRunLoop> Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer<__CFRunLoop> Function( ffi.Pointer, ffi.Pointer)>(); /// NSTimer class NSTimer extends objc.NSObject { NSTimer._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSTimer] that points to the same underlying object as [other]. NSTimer.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSTimer] that wraps the given raw object pointer. NSTimer.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSTimer]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimer); } /// timerWithTimeInterval:invocation:repeats: static NSTimer timerWithTimeInterval_invocation_repeats_( double ti, objc.NSInvocation invocation, bool yesOrNo) { final _ret = _objc_msgSend_120( _class_NSTimer, _sel_timerWithTimeInterval_invocation_repeats_, ti, invocation.pointer, yesOrNo); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// scheduledTimerWithTimeInterval:invocation:repeats: static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( double ti, objc.NSInvocation invocation, bool yesOrNo) { final _ret = _objc_msgSend_120( _class_NSTimer, _sel_scheduledTimerWithTimeInterval_invocation_repeats_, ti, invocation.pointer, yesOrNo); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// timerWithTimeInterval:target:selector:userInfo:repeats: static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( double ti, objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? userInfo, bool yesOrNo) { final _ret = _objc_msgSend_121( _class_NSTimer, _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, ti, aTarget.pointer, aSelector, userInfo?.pointer ?? ffi.nullptr, yesOrNo); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// scheduledTimerWithTimeInterval:target:selector:userInfo:repeats: static NSTimer scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( double ti, objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? userInfo, bool yesOrNo) { final _ret = _objc_msgSend_121( _class_NSTimer, _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, ti, aTarget.pointer, aSelector, userInfo?.pointer ?? ffi.nullptr, yesOrNo); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// timerWithTimeInterval:repeats:block: static NSTimer timerWithTimeInterval_repeats_block_( double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { final _ret = _objc_msgSend_122( _class_NSTimer, _sel_timerWithTimeInterval_repeats_block_, interval, repeats, block.pointer); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// scheduledTimerWithTimeInterval:repeats:block: static NSTimer scheduledTimerWithTimeInterval_repeats_block_( double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { final _ret = _objc_msgSend_122( _class_NSTimer, _sel_scheduledTimerWithTimeInterval_repeats_block_, interval, repeats, block.pointer); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// initWithFireDate:interval:repeats:block: NSTimer initWithFireDate_interval_repeats_block_(objc.NSDate date, double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { final _ret = _objc_msgSend_123( this.pointer, _sel_initWithFireDate_interval_repeats_block_, date.pointer, interval, repeats, block.pointer); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// initWithFireDate:interval:target:selector:userInfo:repeats: NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( objc.NSDate date, double ti, objc.ObjCObjectBase t, ffi.Pointer s, objc.ObjCObjectBase? ui, bool rep) { final _ret = _objc_msgSend_124( this.pointer, _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, date.pointer, ti, t.pointer, s, ui?.pointer ?? ffi.nullptr, rep); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// fire void fire() { _objc_msgSend_7(this.pointer, _sel_fire); } /// fireDate objc.NSDate get fireDate { final _ret = _objc_msgSend_125(this.pointer, _sel_fireDate); return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// setFireDate: set fireDate(objc.NSDate value) { return _objc_msgSend_126(this.pointer, _sel_setFireDate_, value.pointer); } /// timeInterval double get timeInterval { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_timeInterval) : _objc_msgSend_18(this.pointer, _sel_timeInterval); } /// tolerance double get tolerance { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_tolerance) : _objc_msgSend_18(this.pointer, _sel_tolerance); } /// setTolerance: set tolerance(double value) { return _objc_msgSend_127(this.pointer, _sel_setTolerance_, value); } /// invalidate void invalidate() { _objc_msgSend_7(this.pointer, _sel_invalidate); } /// isValid bool get valid { return _objc_msgSend_13(this.pointer, _sel_isValid); } /// userInfo objc.ObjCObjectBase? get userInfo { final _ret = _objc_msgSend_84(this.pointer, _sel_userInfo); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// init NSTimer init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// new static NSTimer new1() { final _ret = _objc_msgSend_19(_class_NSTimer, _sel_new); return NSTimer.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSTimer, _sel_allocWithZone_, zone); return NSTimer.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSTimer alloc() { final _ret = _objc_msgSend_19(_class_NSTimer, _sel_alloc); return NSTimer.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSTimer, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSTimer, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSTimer, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSTimer, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSTimer, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSTimer = objc.getClass("NSTimer"); late final _sel_timerWithTimeInterval_invocation_repeats_ = objc.registerName("timerWithTimeInterval:invocation:repeats:"); final _objc_msgSend_120 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Double, ffi.Pointer, ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, double, ffi.Pointer, bool)>(); late final _sel_scheduledTimerWithTimeInterval_invocation_repeats_ = objc.registerName("scheduledTimerWithTimeInterval:invocation:repeats:"); late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_ = objc .registerName("timerWithTimeInterval:target:selector:userInfo:repeats:"); final _objc_msgSend_121 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Double, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, double, ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ = objc.registerName( "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"); void _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSTimer castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSTimer._(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. ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSTimer.fromFunction(void Function(NSTimer) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn( NSTimer.castFromPointer(arg0, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSTimer.listener(void Function(NSTimer) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSTimer(objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0) => fn( NSTimer.castFromPointer(arg0, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(NSTimer arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer); } late final _sel_timerWithTimeInterval_repeats_block_ = objc.registerName("timerWithTimeInterval:repeats:block:"); final _objc_msgSend_122 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Double, ffi.Bool, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, double, bool, ffi.Pointer)>(); late final _sel_scheduledTimerWithTimeInterval_repeats_block_ = objc.registerName("scheduledTimerWithTimeInterval:repeats:block:"); late final _sel_initWithFireDate_interval_repeats_block_ = objc.registerName("initWithFireDate:interval:repeats:block:"); final _objc_msgSend_123 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Double, ffi.Bool, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, double, bool, ffi.Pointer)>(); late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_ = objc.registerName( "initWithFireDate:interval:target:selector:userInfo:repeats:"); final _objc_msgSend_124 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Double, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, double, ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_fire = objc.registerName("fire"); late final _sel_fireDate = objc.registerName("fireDate"); final _objc_msgSend_125 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setFireDate_ = objc.registerName("setFireDate:"); final _objc_msgSend_126 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_timeInterval = objc.registerName("timeInterval"); late final _sel_tolerance = objc.registerName("tolerance"); late final _sel_setTolerance_ = objc.registerName("setTolerance:"); final _objc_msgSend_127 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Double)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, double)>(); late final _sel_invalidate = objc.registerName("invalidate"); late final _sel_isValid = objc.registerName("isValid"); late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); final _objc_msgSend_128 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSPort class NSPort extends objc.NSObject { NSPort._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSPort] that points to the same underlying object as [other]. NSPort.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSPort] that wraps the given raw object pointer. NSPort.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSPort]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSPort); } /// port static NSPort port() { final _ret = _objc_msgSend_129(_class_NSPort, _sel_port); return NSPort.castFromPointer(_ret, retain: true, release: true); } /// invalidate void invalidate() { _objc_msgSend_7(this.pointer, _sel_invalidate); } /// isValid bool get valid { return _objc_msgSend_13(this.pointer, _sel_isValid); } /// setDelegate: void setDelegate_(objc.ObjCObjectBase? anObject) { _objc_msgSend_130( this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); } /// delegate objc.ObjCObjectBase? delegate() { final _ret = _objc_msgSend_84(this.pointer, _sel_delegate); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// scheduleInRunLoop:forMode: void scheduleInRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { _objc_msgSend_131(this.pointer, _sel_scheduleInRunLoop_forMode_, runLoop.pointer, mode.pointer); } /// removeFromRunLoop:forMode: void removeFromRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { _objc_msgSend_131(this.pointer, _sel_removeFromRunLoop_forMode_, runLoop.pointer, mode.pointer); } /// reservedSpaceLength int get reservedSpaceLength { return _objc_msgSend_56(this.pointer, _sel_reservedSpaceLength); } /// sendBeforeDate:components:from:reserved: bool sendBeforeDate_components_from_reserved_( objc.NSDate limitDate, objc.NSMutableArray? components, NSPort? receivePort, int headerSpaceReserved) { return _objc_msgSend_132( this.pointer, _sel_sendBeforeDate_components_from_reserved_, limitDate.pointer, components?.pointer ?? ffi.nullptr, receivePort?.pointer ?? ffi.nullptr, headerSpaceReserved); } /// sendBeforeDate:msgid:components:from:reserved: bool sendBeforeDate_msgid_components_from_reserved_( objc.NSDate limitDate, int msgID, objc.NSMutableArray? components, NSPort? receivePort, int headerSpaceReserved) { return _objc_msgSend_133( this.pointer, _sel_sendBeforeDate_msgid_components_from_reserved_, limitDate.pointer, msgID, components?.pointer ?? ffi.nullptr, receivePort?.pointer ?? ffi.nullptr, headerSpaceReserved); } /// init NSPort init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSPort.castFromPointer(_ret, retain: true, release: true); } /// new static NSPort new1() { final _ret = _objc_msgSend_19(_class_NSPort, _sel_new); return NSPort.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSPort, _sel_allocWithZone_, zone); return NSPort.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSPort alloc() { final _ret = _objc_msgSend_19(_class_NSPort, _sel_alloc); return NSPort.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSPort, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSPort, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSPort, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31( _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32(_class_NSPort, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSPort, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSPort = objc.getClass("NSPort"); late final _sel_port = objc.registerName("port"); final _objc_msgSend_129 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setDelegate_ = objc.registerName("setDelegate:"); final _objc_msgSend_130 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_delegate = objc.registerName("delegate"); late final _sel_scheduleInRunLoop_forMode_ = objc.registerName("scheduleInRunLoop:forMode:"); final _objc_msgSend_131 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeFromRunLoop_forMode_ = objc.registerName("removeFromRunLoop:forMode:"); late final _sel_reservedSpaceLength = objc.registerName("reservedSpaceLength"); late final _sel_sendBeforeDate_components_from_reserved_ = objc.registerName("sendBeforeDate:components:from:reserved:"); final _objc_msgSend_132 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_sendBeforeDate_msgid_components_from_reserved_ = objc.registerName("sendBeforeDate:msgid:components:from:reserved:"); final _objc_msgSend_133 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); final _objc_msgSend_134 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removePort_forMode_ = objc.registerName("removePort:forMode:"); late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); final _objc_msgSend_135 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_acceptInputForMode_beforeDate_ = objc.registerName("acceptInputForMode:beforeDate:"); final _objc_msgSend_136 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_run = objc.registerName("run"); late final _sel_runUntilDate_ = objc.registerName("runUntilDate:"); final _objc_msgSend_137 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); final _objc_msgSend_138 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_performInModes_block_ = objc.registerName("performInModes:block:"); final _objc_msgSend_139 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_performBlock_ = objc.registerName("performBlock:"); final _objc_msgSend_140 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_performSelector_target_argument_order_modes_ = objc.registerName("performSelector:target:argument:order:modes:"); final _objc_msgSend_141 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_cancelPerformSelector_target_argument_ = objc.registerName("cancelPerformSelector:target:argument:"); final _objc_msgSend_142 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cancelPerformSelectorsWithTarget_ = objc.registerName("cancelPerformSelectorsWithTarget:"); /// NSFileHandle class NSFileHandle extends objc.NSObject { NSFileHandle._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSFileHandle] that points to the same underlying object as [other]. NSFileHandle.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSFileHandle] that wraps the given raw object pointer. NSFileHandle.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSFileHandle]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); } /// availableData objc.NSData get availableData { final _ret = _objc_msgSend_143(this.pointer, _sel_availableData); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// initWithFileDescriptor:closeOnDealloc: NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { final _ret = _objc_msgSend_144(this.pointer, _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// initWithCoder: NSFileHandle? initWithCoder_(objc.NSCoder coder) { final _ret = _objc_msgSend_145(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// readDataToEndOfFileAndReturnError: objc.NSData? readDataToEndOfFileAndReturnError_( ffi.Pointer> error) { final _ret = _objc_msgSend_146( this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// readDataUpToLength:error: objc.NSData? readDataUpToLength_error_( int length, ffi.Pointer> error) { final _ret = _objc_msgSend_147( this.pointer, _sel_readDataUpToLength_error_, length, error); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// writeData:error: bool writeData_error_( objc.NSData data, ffi.Pointer> error) { return _objc_msgSend_148( this.pointer, _sel_writeData_error_, data.pointer, error); } /// getOffset:error: bool getOffset_error_(ffi.Pointer offsetInFile, ffi.Pointer> error) { return _objc_msgSend_149( this.pointer, _sel_getOffset_error_, offsetInFile, error); } /// seekToEndReturningOffset:error: bool seekToEndReturningOffset_error_( ffi.Pointer offsetInFile, ffi.Pointer> error) { return _objc_msgSend_149(this.pointer, _sel_seekToEndReturningOffset_error_, offsetInFile, error); } /// seekToOffset:error: bool seekToOffset_error_( int offset, ffi.Pointer> error) { return _objc_msgSend_150( this.pointer, _sel_seekToOffset_error_, offset, error); } /// truncateAtOffset:error: bool truncateAtOffset_error_( int offset, ffi.Pointer> error) { return _objc_msgSend_150( this.pointer, _sel_truncateAtOffset_error_, offset, error); } /// synchronizeAndReturnError: bool synchronizeAndReturnError_( ffi.Pointer> error) { return _objc_msgSend_38( this.pointer, _sel_synchronizeAndReturnError_, error); } /// closeAndReturnError: bool closeAndReturnError_(ffi.Pointer> error) { return _objc_msgSend_38(this.pointer, _sel_closeAndReturnError_, error); } /// fileHandleWithStandardInput static NSFileHandle getFileHandleWithStandardInput() { final _ret = _objc_msgSend_151( _class_NSFileHandle, _sel_fileHandleWithStandardInput); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleWithStandardOutput static NSFileHandle getFileHandleWithStandardOutput() { final _ret = _objc_msgSend_151( _class_NSFileHandle, _sel_fileHandleWithStandardOutput); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleWithStandardError static NSFileHandle getFileHandleWithStandardError() { final _ret = _objc_msgSend_151( _class_NSFileHandle, _sel_fileHandleWithStandardError); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleWithNullDevice static NSFileHandle getFileHandleWithNullDevice() { final _ret = _objc_msgSend_151(_class_NSFileHandle, _sel_fileHandleWithNullDevice); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForReadingAtPath: static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { final _ret = _objc_msgSend_34( _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForWritingAtPath: static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { final _ret = _objc_msgSend_34( _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForUpdatingAtPath: static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { final _ret = _objc_msgSend_34( _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForReadingFromURL:error: static NSFileHandle? fileHandleForReadingFromURL_error_( objc.NSURL url, ffi.Pointer> error) { final _ret = _objc_msgSend_152(_class_NSFileHandle, _sel_fileHandleForReadingFromURL_error_, url.pointer, error); return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForWritingToURL:error: static NSFileHandle? fileHandleForWritingToURL_error_( objc.NSURL url, ffi.Pointer> error) { final _ret = _objc_msgSend_152(_class_NSFileHandle, _sel_fileHandleForWritingToURL_error_, url.pointer, error); return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForUpdatingURL:error: static NSFileHandle? fileHandleForUpdatingURL_error_( objc.NSURL url, ffi.Pointer> error) { final _ret = _objc_msgSend_152(_class_NSFileHandle, _sel_fileHandleForUpdatingURL_error_, url.pointer, error); return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// readInBackgroundAndNotifyForModes: void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { _objc_msgSend_153(this.pointer, _sel_readInBackgroundAndNotifyForModes_, modes?.pointer ?? ffi.nullptr); } /// readInBackgroundAndNotify void readInBackgroundAndNotify() { _objc_msgSend_7(this.pointer, _sel_readInBackgroundAndNotify); } /// readToEndOfFileInBackgroundAndNotifyForModes: void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { _objc_msgSend_153( this.pointer, _sel_readToEndOfFileInBackgroundAndNotifyForModes_, modes?.pointer ?? ffi.nullptr); } /// readToEndOfFileInBackgroundAndNotify void readToEndOfFileInBackgroundAndNotify() { _objc_msgSend_7(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); } /// acceptConnectionInBackgroundAndNotifyForModes: void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { _objc_msgSend_153( this.pointer, _sel_acceptConnectionInBackgroundAndNotifyForModes_, modes?.pointer ?? ffi.nullptr); } /// acceptConnectionInBackgroundAndNotify void acceptConnectionInBackgroundAndNotify() { _objc_msgSend_7(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); } /// waitForDataInBackgroundAndNotifyForModes: void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { _objc_msgSend_153( this.pointer, _sel_waitForDataInBackgroundAndNotifyForModes_, modes?.pointer ?? ffi.nullptr); } /// waitForDataInBackgroundAndNotify void waitForDataInBackgroundAndNotify() { _objc_msgSend_7(this.pointer, _sel_waitForDataInBackgroundAndNotify); } /// readabilityHandler ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { final _ret = _objc_msgSend_154(this.pointer, _sel_readabilityHandler); return _ret.address == 0 ? null : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// setReadabilityHandler: set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { return _objc_msgSend_155(this.pointer, _sel_setReadabilityHandler_, value?.pointer ?? ffi.nullptr); } /// writeabilityHandler ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { final _ret = _objc_msgSend_154(this.pointer, _sel_writeabilityHandler); return _ret.address == 0 ? null : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// setWriteabilityHandler: set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { return _objc_msgSend_155(this.pointer, _sel_setWriteabilityHandler_, value?.pointer ?? ffi.nullptr); } /// initWithFileDescriptor: NSFileHandle initWithFileDescriptor_(int fd) { final _ret = _objc_msgSend_156(this.pointer, _sel_initWithFileDescriptor_, fd); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileDescriptor int get fileDescriptor { return _objc_msgSend_157(this.pointer, _sel_fileDescriptor); } /// readDataToEndOfFile objc.NSData readDataToEndOfFile() { final _ret = _objc_msgSend_143(this.pointer, _sel_readDataToEndOfFile); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// readDataOfLength: objc.NSData readDataOfLength_(int length) { final _ret = _objc_msgSend_158(this.pointer, _sel_readDataOfLength_, length); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// writeData: void writeData_(objc.NSData data) { _objc_msgSend_159(this.pointer, _sel_writeData_, data.pointer); } /// offsetInFile int get offsetInFile { return _objc_msgSend_160(this.pointer, _sel_offsetInFile); } /// seekToEndOfFile int seekToEndOfFile() { return _objc_msgSend_160(this.pointer, _sel_seekToEndOfFile); } /// seekToFileOffset: void seekToFileOffset_(int offset) { _objc_msgSend_161(this.pointer, _sel_seekToFileOffset_, offset); } /// truncateFileAtOffset: void truncateFileAtOffset_(int offset) { _objc_msgSend_161(this.pointer, _sel_truncateFileAtOffset_, offset); } /// synchronizeFile void synchronizeFile() { _objc_msgSend_7(this.pointer, _sel_synchronizeFile); } /// closeFile void closeFile() { _objc_msgSend_7(this.pointer, _sel_closeFile); } /// init NSFileHandle init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// new static NSFileHandle new1() { final _ret = _objc_msgSend_19(_class_NSFileHandle, _sel_new); return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSFileHandle, _sel_allocWithZone_, zone); return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSFileHandle alloc() { final _ret = _objc_msgSend_19(_class_NSFileHandle, _sel_alloc); return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSFileHandle, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSFileHandle, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSFileHandle, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSFileHandle, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSFileHandle = objc.getClass("NSFileHandle"); late final _sel_availableData = objc.registerName("availableData"); final _objc_msgSend_143 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithFileDescriptor_closeOnDealloc_ = objc.registerName("initWithFileDescriptor:closeOnDealloc:"); final _objc_msgSend_144 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Int, ffi.Bool)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int, bool)>(); late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); final _objc_msgSend_145 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_readDataToEndOfFileAndReturnError_ = objc.registerName("readDataToEndOfFileAndReturnError:"); final _objc_msgSend_146 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_readDataUpToLength_error_ = objc.registerName("readDataUpToLength:error:"); final _objc_msgSend_147 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); late final _sel_writeData_error_ = objc.registerName("writeData:error:"); final _objc_msgSend_148 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); final _objc_msgSend_149 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_seekToEndReturningOffset_error_ = objc.registerName("seekToEndReturningOffset:error:"); late final _sel_seekToOffset_error_ = objc.registerName("seekToOffset:error:"); final _objc_msgSend_150 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLongLong, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); late final _sel_truncateAtOffset_error_ = objc.registerName("truncateAtOffset:error:"); late final _sel_synchronizeAndReturnError_ = objc.registerName("synchronizeAndReturnError:"); late final _sel_closeAndReturnError_ = objc.registerName("closeAndReturnError:"); late final _sel_fileHandleWithStandardInput = objc.registerName("fileHandleWithStandardInput"); final _objc_msgSend_151 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_fileHandleWithStandardOutput = objc.registerName("fileHandleWithStandardOutput"); late final _sel_fileHandleWithStandardError = objc.registerName("fileHandleWithStandardError"); late final _sel_fileHandleWithNullDevice = objc.registerName("fileHandleWithNullDevice"); late final _sel_fileHandleForReadingAtPath_ = objc.registerName("fileHandleForReadingAtPath:"); late final _sel_fileHandleForWritingAtPath_ = objc.registerName("fileHandleForWritingAtPath:"); late final _sel_fileHandleForUpdatingAtPath_ = objc.registerName("fileHandleForUpdatingAtPath:"); late final _sel_fileHandleForReadingFromURL_error_ = objc.registerName("fileHandleForReadingFromURL:error:"); final _objc_msgSend_152 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_fileHandleForWritingToURL_error_ = objc.registerName("fileHandleForWritingToURL:error:"); late final _sel_fileHandleForUpdatingURL_error_ = objc.registerName("fileHandleForUpdatingURL:error:"); late final _sel_readInBackgroundAndNotifyForModes_ = objc.registerName("readInBackgroundAndNotifyForModes:"); final _objc_msgSend_153 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_readInBackgroundAndNotify = objc.registerName("readInBackgroundAndNotify"); late final _sel_readToEndOfFileInBackgroundAndNotifyForModes_ = objc.registerName("readToEndOfFileInBackgroundAndNotifyForModes:"); late final _sel_readToEndOfFileInBackgroundAndNotify = objc.registerName("readToEndOfFileInBackgroundAndNotify"); late final _sel_acceptConnectionInBackgroundAndNotifyForModes_ = objc.registerName("acceptConnectionInBackgroundAndNotifyForModes:"); late final _sel_acceptConnectionInBackgroundAndNotify = objc.registerName("acceptConnectionInBackgroundAndNotify"); late final _sel_waitForDataInBackgroundAndNotifyForModes_ = objc.registerName("waitForDataInBackgroundAndNotifyForModes:"); late final _sel_waitForDataInBackgroundAndNotify = objc.registerName("waitForDataInBackgroundAndNotify"); void _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSFileHandle._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSFileHandle castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSFileHandle._(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. ObjCBlock_ffiVoid_NSFileHandle.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSFileHandle.fromFunction(void Function(NSFileHandle) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn( NSFileHandle.castFromPointer(arg0, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSFileHandle.listener(void Function(NSFileHandle) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSFileHandle( objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0) => fn( NSFileHandle.castFromPointer(arg0, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(NSFileHandle arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer); } late final _sel_readabilityHandler = objc.registerName("readabilityHandler"); final _objc_msgSend_154 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setReadabilityHandler_ = objc.registerName("setReadabilityHandler:"); final _objc_msgSend_155 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_writeabilityHandler = objc.registerName("writeabilityHandler"); late final _sel_setWriteabilityHandler_ = objc.registerName("setWriteabilityHandler:"); late final _sel_initWithFileDescriptor_ = objc.registerName("initWithFileDescriptor:"); final _objc_msgSend_156 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Int)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_fileDescriptor = objc.registerName("fileDescriptor"); final _objc_msgSend_157 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_readDataToEndOfFile = objc.registerName("readDataToEndOfFile"); late final _sel_readDataOfLength_ = objc.registerName("readDataOfLength:"); final _objc_msgSend_158 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_writeData_ = objc.registerName("writeData:"); final _objc_msgSend_159 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_offsetInFile = objc.registerName("offsetInFile"); final _objc_msgSend_160 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLongLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_seekToEndOfFile = objc.registerName("seekToEndOfFile"); late final _sel_seekToFileOffset_ = objc.registerName("seekToFileOffset:"); final _objc_msgSend_161 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLongLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_truncateFileAtOffset_ = objc.registerName("truncateFileAtOffset:"); late final _sel_synchronizeFile = objc.registerName("synchronizeFile"); late final _sel_closeFile = objc.registerName("closeFile"); /// NSFileManager class NSFileManager extends objc.NSObject { NSFileManager._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSFileManager] that points to the same underlying object as [other]. NSFileManager.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSFileManager] that wraps the given raw object pointer. NSFileManager.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSFileManager]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); } /// defaultManager static NSFileManager getDefaultManager() { final _ret = _objc_msgSend_162(_class_NSFileManager, _sel_defaultManager); return NSFileManager.castFromPointer(_ret, retain: true, release: true); } /// mountedVolumeURLsIncludingResourceValuesForKeys:options: objc.NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( objc.NSArray? propertyKeys, NSVolumeEnumerationOptions options) { final _ret = _objc_msgSend_163( this.pointer, _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, propertyKeys?.pointer ?? ffi.nullptr, options.value); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// unmountVolumeAtURL:options:completionHandler: void unmountVolumeAtURL_options_completionHandler_( objc.NSURL url, NSFileManagerUnmountOptions mask, ObjCBlock_ffiVoid_NSError completionHandler) { _objc_msgSend_164( this.pointer, _sel_unmountVolumeAtURL_options_completionHandler_, url.pointer, mask.value, completionHandler.pointer); } /// contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error: objc.NSArray? contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( objc.NSURL url, objc.NSArray? keys, NSDirectoryEnumerationOptions mask, ffi.Pointer> error) { final _ret = _objc_msgSend_165( this.pointer, _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, url.pointer, keys?.pointer ?? ffi.nullptr, mask.value, error); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// URLsForDirectory:inDomains: objc.NSArray URLsForDirectory_inDomains_( NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask) { final _ret = _objc_msgSend_166(this.pointer, _sel_URLsForDirectory_inDomains_, directory.value, domainMask.value); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// URLForDirectory:inDomain:appropriateForURL:create:error: objc.NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( NSSearchPathDirectory directory, NSSearchPathDomainMask domain, objc.NSURL? url, bool shouldCreate, ffi.Pointer> error) { final _ret = _objc_msgSend_167( this.pointer, _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, directory.value, domain.value, url?.pointer ?? ffi.nullptr, shouldCreate, error); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// getRelationship:ofDirectoryAtURL:toItemAtURL:error: bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( ffi.Pointer outRelationship, objc.NSURL directoryURL, objc.NSURL otherURL, ffi.Pointer> error) { return _objc_msgSend_168( this.pointer, _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, outRelationship, directoryURL.pointer, otherURL.pointer, error); } /// getRelationship:ofDirectory:inDomain:toItemAtURL:error: bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( ffi.Pointer outRelationship, NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, objc.NSURL url, ffi.Pointer> error) { return _objc_msgSend_169( this.pointer, _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, outRelationship, directory.value, domainMask.value, url.pointer, error); } /// createDirectoryAtURL:withIntermediateDirectories:attributes:error: bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( objc.NSURL url, bool createIntermediates, objc.NSDictionary? attributes, ffi.Pointer> error) { return _objc_msgSend_170( this.pointer, _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, url.pointer, createIntermediates, attributes?.pointer ?? ffi.nullptr, error); } /// createSymbolicLinkAtURL:withDestinationURL:error: bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, objc.NSURL destURL, ffi.Pointer> error) { return _objc_msgSend_171( this.pointer, _sel_createSymbolicLinkAtURL_withDestinationURL_error_, url.pointer, destURL.pointer, error); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_84(this.pointer, _sel_delegate); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: set delegate(objc.ObjCObjectBase? value) { return _objc_msgSend_103( this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } /// setAttributes:ofItemAtPath:error: bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, objc.NSString path, ffi.Pointer> error) { return _objc_msgSend_172( this.pointer, _sel_setAttributes_ofItemAtPath_error_, attributes.pointer, path.pointer, error); } /// createDirectoryAtPath:withIntermediateDirectories:attributes:error: bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( objc.NSString path, bool createIntermediates, objc.NSDictionary? attributes, ffi.Pointer> error) { return _objc_msgSend_173( this.pointer, _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, path.pointer, createIntermediates, attributes?.pointer ?? ffi.nullptr, error); } /// contentsOfDirectoryAtPath:error: objc.NSArray? contentsOfDirectoryAtPath_error_( objc.NSString path, ffi.Pointer> error) { final _ret = _objc_msgSend_174(this.pointer, _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// subpathsOfDirectoryAtPath:error: objc.NSArray? subpathsOfDirectoryAtPath_error_( objc.NSString path, ffi.Pointer> error) { final _ret = _objc_msgSend_174(this.pointer, _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// attributesOfItemAtPath:error: objc.NSDictionary? attributesOfItemAtPath_error_( objc.NSString path, ffi.Pointer> error) { final _ret = _objc_msgSend_175( this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// attributesOfFileSystemForPath:error: objc.NSDictionary? attributesOfFileSystemForPath_error_( objc.NSString path, ffi.Pointer> error) { final _ret = _objc_msgSend_175(this.pointer, _sel_attributesOfFileSystemForPath_error_, path.pointer, error); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// createSymbolicLinkAtPath:withDestinationPath:error: bool createSymbolicLinkAtPath_withDestinationPath_error_(objc.NSString path, objc.NSString destPath, ffi.Pointer> error) { return _objc_msgSend_176( this.pointer, _sel_createSymbolicLinkAtPath_withDestinationPath_error_, path.pointer, destPath.pointer, error); } /// destinationOfSymbolicLinkAtPath:error: objc.NSString? destinationOfSymbolicLinkAtPath_error_( objc.NSString path, ffi.Pointer> error) { final _ret = _objc_msgSend_177(this.pointer, _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// copyItemAtPath:toPath:error: bool copyItemAtPath_toPath_error_(objc.NSString srcPath, objc.NSString dstPath, ffi.Pointer> error) { return _objc_msgSend_176(this.pointer, _sel_copyItemAtPath_toPath_error_, srcPath.pointer, dstPath.pointer, error); } /// moveItemAtPath:toPath:error: bool moveItemAtPath_toPath_error_(objc.NSString srcPath, objc.NSString dstPath, ffi.Pointer> error) { return _objc_msgSend_176(this.pointer, _sel_moveItemAtPath_toPath_error_, srcPath.pointer, dstPath.pointer, error); } /// linkItemAtPath:toPath:error: bool linkItemAtPath_toPath_error_(objc.NSString srcPath, objc.NSString dstPath, ffi.Pointer> error) { return _objc_msgSend_176(this.pointer, _sel_linkItemAtPath_toPath_error_, srcPath.pointer, dstPath.pointer, error); } /// removeItemAtPath:error: bool removeItemAtPath_error_( objc.NSString path, ffi.Pointer> error) { return _objc_msgSend_178( this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); } /// copyItemAtURL:toURL:error: bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, ffi.Pointer> error) { return _objc_msgSend_171(this.pointer, _sel_copyItemAtURL_toURL_error_, srcURL.pointer, dstURL.pointer, error); } /// moveItemAtURL:toURL:error: bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, ffi.Pointer> error) { return _objc_msgSend_171(this.pointer, _sel_moveItemAtURL_toURL_error_, srcURL.pointer, dstURL.pointer, error); } /// linkItemAtURL:toURL:error: bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, ffi.Pointer> error) { return _objc_msgSend_171(this.pointer, _sel_linkItemAtURL_toURL_error_, srcURL.pointer, dstURL.pointer, error); } /// removeItemAtURL:error: bool removeItemAtURL_error_( objc.NSURL URL, ffi.Pointer> error) { return _objc_msgSend_179( this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); } /// trashItemAtURL:resultingItemURL:error: bool trashItemAtURL_resultingItemURL_error_( objc.NSURL url, ffi.Pointer> outResultingURL, ffi.Pointer> error) { return _objc_msgSend_180( this.pointer, _sel_trashItemAtURL_resultingItemURL_error_, url.pointer, outResultingURL, error); } /// fileAttributesAtPath:traverseLink: objc.NSDictionary? fileAttributesAtPath_traverseLink_( objc.NSString path, bool yorn) { final _ret = _objc_msgSend_181(this.pointer, _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// changeFileAttributes:atPath: bool changeFileAttributes_atPath_( objc.NSDictionary attributes, objc.NSString path) { return _objc_msgSend_182(this.pointer, _sel_changeFileAttributes_atPath_, attributes.pointer, path.pointer); } /// directoryContentsAtPath: objc.NSArray? directoryContentsAtPath_(objc.NSString path) { final _ret = _objc_msgSend_183( this.pointer, _sel_directoryContentsAtPath_, path.pointer); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// fileSystemAttributesAtPath: objc.NSDictionary? fileSystemAttributesAtPath_(objc.NSString path) { final _ret = _objc_msgSend_184( this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// pathContentOfSymbolicLinkAtPath: objc.NSString? pathContentOfSymbolicLinkAtPath_(objc.NSString path) { final _ret = _objc_msgSend_41( this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// createSymbolicLinkAtPath:pathContent: bool createSymbolicLinkAtPath_pathContent_( objc.NSString path, objc.NSString otherpath) { return _objc_msgSend_185( this.pointer, _sel_createSymbolicLinkAtPath_pathContent_, path.pointer, otherpath.pointer); } /// createDirectoryAtPath:attributes: bool createDirectoryAtPath_attributes_( objc.NSString path, objc.NSDictionary attributes) { return _objc_msgSend_186( this.pointer, _sel_createDirectoryAtPath_attributes_, path.pointer, attributes.pointer); } /// currentDirectoryPath objc.NSString get currentDirectoryPath { final _ret = _objc_msgSend_11(this.pointer, _sel_currentDirectoryPath); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// changeCurrentDirectoryPath: bool changeCurrentDirectoryPath_(objc.NSString path) { return _objc_msgSend_31( this.pointer, _sel_changeCurrentDirectoryPath_, path.pointer); } /// fileExistsAtPath: bool fileExistsAtPath_(objc.NSString path) { return _objc_msgSend_31(this.pointer, _sel_fileExistsAtPath_, path.pointer); } /// fileExistsAtPath:isDirectory: bool fileExistsAtPath_isDirectory_( objc.NSString path, ffi.Pointer isDirectory) { return _objc_msgSend_187(this.pointer, _sel_fileExistsAtPath_isDirectory_, path.pointer, isDirectory); } /// isReadableFileAtPath: bool isReadableFileAtPath_(objc.NSString path) { return _objc_msgSend_31( this.pointer, _sel_isReadableFileAtPath_, path.pointer); } /// isWritableFileAtPath: bool isWritableFileAtPath_(objc.NSString path) { return _objc_msgSend_31( this.pointer, _sel_isWritableFileAtPath_, path.pointer); } /// isExecutableFileAtPath: bool isExecutableFileAtPath_(objc.NSString path) { return _objc_msgSend_31( this.pointer, _sel_isExecutableFileAtPath_, path.pointer); } /// isDeletableFileAtPath: bool isDeletableFileAtPath_(objc.NSString path) { return _objc_msgSend_31( this.pointer, _sel_isDeletableFileAtPath_, path.pointer); } /// contentsEqualAtPath:andPath: bool contentsEqualAtPath_andPath_(objc.NSString path1, objc.NSString path2) { return _objc_msgSend_185(this.pointer, _sel_contentsEqualAtPath_andPath_, path1.pointer, path2.pointer); } /// displayNameAtPath: objc.NSString displayNameAtPath_(objc.NSString path) { final _ret = _objc_msgSend_188(this.pointer, _sel_displayNameAtPath_, path.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// componentsToDisplayForPath: objc.NSArray? componentsToDisplayForPath_(objc.NSString path) { final _ret = _objc_msgSend_183( this.pointer, _sel_componentsToDisplayForPath_, path.pointer); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// enumeratorAtPath: objc.ObjCObjectBase? enumeratorAtPath_(objc.NSString path) { final _ret = _objc_msgSend_34(this.pointer, _sel_enumeratorAtPath_, path.pointer); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// enumeratorAtURL:includingPropertiesForKeys:options:errorHandler: objc.ObjCObjectBase? enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( objc.NSURL url, objc.NSArray? keys, NSDirectoryEnumerationOptions mask, ObjCBlock_bool_NSURL_NSError? handler) { final _ret = _objc_msgSend_189( this.pointer, _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, url.pointer, keys?.pointer ?? ffi.nullptr, mask.value, handler?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// subpathsAtPath: objc.NSArray? subpathsAtPath_(objc.NSString path) { final _ret = _objc_msgSend_183(this.pointer, _sel_subpathsAtPath_, path.pointer); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// contentsAtPath: objc.NSData? contentsAtPath_(objc.NSString path) { final _ret = _objc_msgSend_190(this.pointer, _sel_contentsAtPath_, path.pointer); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// createFileAtPath:contents:attributes: bool createFileAtPath_contents_attributes_( objc.NSString path, objc.NSData? data, objc.NSDictionary? attr) { return _objc_msgSend_191( this.pointer, _sel_createFileAtPath_contents_attributes_, path.pointer, data?.pointer ?? ffi.nullptr, attr?.pointer ?? ffi.nullptr); } /// fileSystemRepresentationWithPath: ffi.Pointer fileSystemRepresentationWithPath_(objc.NSString path) { return _objc_msgSend_192( this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); } /// stringWithFileSystemRepresentation:length: objc.NSString stringWithFileSystemRepresentation_length_( ffi.Pointer str, int len) { final _ret = _objc_msgSend_193(this.pointer, _sel_stringWithFileSystemRepresentation_length_, str, len); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: bool replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( objc.NSURL originalItemURL, objc.NSURL newItemURL, objc.NSString? backupItemName, NSFileManagerItemReplacementOptions options, ffi.Pointer> resultingURL, ffi.Pointer> error) { return _objc_msgSend_194( this.pointer, _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, originalItemURL.pointer, newItemURL.pointer, backupItemName?.pointer ?? ffi.nullptr, options.value, resultingURL, error); } /// setUbiquitous:itemAtURL:destinationURL:error: bool setUbiquitous_itemAtURL_destinationURL_error_( bool flag, objc.NSURL url, objc.NSURL destinationURL, ffi.Pointer> error) { return _objc_msgSend_195( this.pointer, _sel_setUbiquitous_itemAtURL_destinationURL_error_, flag, url.pointer, destinationURL.pointer, error); } /// isUbiquitousItemAtURL: bool isUbiquitousItemAtURL_(objc.NSURL url) { return _objc_msgSend_196( this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); } /// startDownloadingUbiquitousItemAtURL:error: bool startDownloadingUbiquitousItemAtURL_error_( objc.NSURL url, ffi.Pointer> error) { return _objc_msgSend_179(this.pointer, _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); } /// evictUbiquitousItemAtURL:error: bool evictUbiquitousItemAtURL_error_( objc.NSURL url, ffi.Pointer> error) { return _objc_msgSend_179( this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); } /// URLForUbiquityContainerIdentifier: objc.NSURL? URLForUbiquityContainerIdentifier_( objc.NSString? containerIdentifier) { final _ret = _objc_msgSend_197( this.pointer, _sel_URLForUbiquityContainerIdentifier_, containerIdentifier?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// URLForPublishingUbiquitousItemAtURL:expirationDate:error: objc.NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( objc.NSURL url, ffi.Pointer> outDate, ffi.Pointer> error) { final _ret = _objc_msgSend_198( this.pointer, _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, url.pointer, outDate, error); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// ubiquityIdentityToken objc.ObjCObjectBase? get ubiquityIdentityToken { final _ret = _objc_msgSend_84(this.pointer, _sel_ubiquityIdentityToken); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// getFileProviderServicesForItemAtURL:completionHandler: void getFileProviderServicesForItemAtURL_completionHandler_(objc.NSURL url, ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { _objc_msgSend_199( this.pointer, _sel_getFileProviderServicesForItemAtURL_completionHandler_, url.pointer, completionHandler.pointer); } /// containerURLForSecurityApplicationGroupIdentifier: objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( objc.NSString groupIdentifier) { final _ret = _objc_msgSend_40( this.pointer, _sel_containerURLForSecurityApplicationGroupIdentifier_, groupIdentifier.pointer); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// homeDirectoryForCurrentUser objc.NSURL get homeDirectoryForCurrentUser { final _ret = _objc_msgSend_39(this.pointer, _sel_homeDirectoryForCurrentUser); return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// temporaryDirectory objc.NSURL get temporaryDirectory { final _ret = _objc_msgSend_39(this.pointer, _sel_temporaryDirectory); return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// homeDirectoryForUser: objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { final _ret = _objc_msgSend_40( this.pointer, _sel_homeDirectoryForUser_, userName.pointer); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// init NSFileManager init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSFileManager.castFromPointer(_ret, retain: true, release: true); } /// new static NSFileManager new1() { final _ret = _objc_msgSend_19(_class_NSFileManager, _sel_new); return NSFileManager.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSFileManager, _sel_allocWithZone_, zone); return NSFileManager.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSFileManager alloc() { final _ret = _objc_msgSend_19(_class_NSFileManager, _sel_alloc); return NSFileManager.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSFileManager, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSFileManager, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSFileManager, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSFileManager, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSFileManager, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSFileManager, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSFileManager, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSFileManager = objc.getClass("NSFileManager"); late final _sel_defaultManager = objc.registerName("defaultManager"); final _objc_msgSend_162 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); enum NSVolumeEnumerationOptions { NSVolumeEnumerationSkipHiddenVolumes(2), NSVolumeEnumerationProduceFileReferenceURLs(4); final int value; const NSVolumeEnumerationOptions(this.value); static NSVolumeEnumerationOptions fromValue(int value) => switch (value) { 2 => NSVolumeEnumerationSkipHiddenVolumes, 4 => NSVolumeEnumerationProduceFileReferenceURLs, _ => throw ArgumentError( "Unknown value for NSVolumeEnumerationOptions: $value"), }; } late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); final _objc_msgSend_163 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); enum NSFileManagerUnmountOptions { NSFileManagerUnmountAllPartitionsAndEjectDisk(1), NSFileManagerUnmountWithoutUI(2); final int value; const NSFileManagerUnmountOptions(this.value); static NSFileManagerUnmountOptions fromValue(int value) => switch (value) { 1 => NSFileManagerUnmountAllPartitionsAndEjectDisk, 2 => NSFileManagerUnmountWithoutUI, _ => throw ArgumentError( "Unknown value for NSFileManagerUnmountOptions: $value"), }; } void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); void _ObjCBlock_ffiVoid_NSError_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSError extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSError._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSError._(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. ObjCBlock_ffiVoid_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSError.fromFunction(void Function(objc.NSError?) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSError_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSError.castFromPointer(arg0, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSError.listener(void Function(objc.NSError?) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSError(objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSError_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSError.castFromPointer(arg0, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(objc.NSError? arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr); } late final _sel_unmountVolumeAtURL_options_completionHandler_ = objc.registerName("unmountVolumeAtURL:options:completionHandler:"); final _objc_msgSend_164 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); enum NSDirectoryEnumerationOptions { NSDirectoryEnumerationSkipsSubdirectoryDescendants(1), NSDirectoryEnumerationSkipsPackageDescendants(2), NSDirectoryEnumerationSkipsHiddenFiles(4), NSDirectoryEnumerationIncludesDirectoriesPostOrder(8), NSDirectoryEnumerationProducesRelativePathURLs(16); final int value; const NSDirectoryEnumerationOptions(this.value); static NSDirectoryEnumerationOptions fromValue(int value) => switch (value) { 1 => NSDirectoryEnumerationSkipsSubdirectoryDescendants, 2 => NSDirectoryEnumerationSkipsPackageDescendants, 4 => NSDirectoryEnumerationSkipsHiddenFiles, 8 => NSDirectoryEnumerationIncludesDirectoriesPostOrder, 16 => NSDirectoryEnumerationProducesRelativePathURLs, _ => throw ArgumentError( "Unknown value for NSDirectoryEnumerationOptions: $value"), }; } late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = objc.registerName( "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); final _objc_msgSend_165 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); enum NSSearchPathDirectory { NSApplicationDirectory(1), NSDemoApplicationDirectory(2), NSDeveloperApplicationDirectory(3), NSAdminApplicationDirectory(4), NSLibraryDirectory(5), NSDeveloperDirectory(6), NSUserDirectory(7), NSDocumentationDirectory(8), NSDocumentDirectory(9), NSCoreServiceDirectory(10), NSAutosavedInformationDirectory(11), NSDesktopDirectory(12), NSCachesDirectory(13), NSApplicationSupportDirectory(14), NSDownloadsDirectory(15), NSInputMethodsDirectory(16), NSMoviesDirectory(17), NSMusicDirectory(18), NSPicturesDirectory(19), NSPrinterDescriptionDirectory(20), NSSharedPublicDirectory(21), NSPreferencePanesDirectory(22), NSApplicationScriptsDirectory(23), NSItemReplacementDirectory(99), NSAllApplicationsDirectory(100), NSAllLibrariesDirectory(101), NSTrashDirectory(102); final int value; const NSSearchPathDirectory(this.value); static NSSearchPathDirectory fromValue(int value) => switch (value) { 1 => NSApplicationDirectory, 2 => NSDemoApplicationDirectory, 3 => NSDeveloperApplicationDirectory, 4 => NSAdminApplicationDirectory, 5 => NSLibraryDirectory, 6 => NSDeveloperDirectory, 7 => NSUserDirectory, 8 => NSDocumentationDirectory, 9 => NSDocumentDirectory, 10 => NSCoreServiceDirectory, 11 => NSAutosavedInformationDirectory, 12 => NSDesktopDirectory, 13 => NSCachesDirectory, 14 => NSApplicationSupportDirectory, 15 => NSDownloadsDirectory, 16 => NSInputMethodsDirectory, 17 => NSMoviesDirectory, 18 => NSMusicDirectory, 19 => NSPicturesDirectory, 20 => NSPrinterDescriptionDirectory, 21 => NSSharedPublicDirectory, 22 => NSPreferencePanesDirectory, 23 => NSApplicationScriptsDirectory, 99 => NSItemReplacementDirectory, 100 => NSAllApplicationsDirectory, 101 => NSAllLibrariesDirectory, 102 => NSTrashDirectory, _ => throw ArgumentError( "Unknown value for NSSearchPathDirectory: $value"), }; } enum NSSearchPathDomainMask { NSUserDomainMask(1), NSLocalDomainMask(2), NSNetworkDomainMask(4), NSSystemDomainMask(8), NSAllDomainsMask(65535); final int value; const NSSearchPathDomainMask(this.value); static NSSearchPathDomainMask fromValue(int value) => switch (value) { 1 => NSUserDomainMask, 2 => NSLocalDomainMask, 4 => NSNetworkDomainMask, 8 => NSSystemDomainMask, 65535 => NSAllDomainsMask, _ => throw ArgumentError( "Unknown value for NSSearchPathDomainMask: $value"), }; } late final _sel_URLsForDirectory_inDomains_ = objc.registerName("URLsForDirectory:inDomains:"); final _objc_msgSend_166 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, int)>(); late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_ = objc .registerName("URLForDirectory:inDomain:appropriateForURL:create:error:"); final _objc_msgSend_167 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.UnsignedLong, ffi.Pointer, ffi.Bool, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer, bool, ffi.Pointer>)>(); enum NSURLRelationship { NSURLRelationshipContains(0), NSURLRelationshipSame(1), NSURLRelationshipOther(2); final int value; const NSURLRelationship(this.value); static NSURLRelationship fromValue(int value) => switch (value) { 0 => NSURLRelationshipContains, 1 => NSURLRelationshipSame, 2 => NSURLRelationshipOther, _ => throw ArgumentError("Unknown value for NSURLRelationship: $value"), }; } late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); final _objc_msgSend_168 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_ = objc .registerName("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); final _objc_msgSend_169 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.UnsignedLong, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer, ffi.Pointer>)>(); late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_ = objc.registerName( "createDirectoryAtURL:withIntermediateDirectories:attributes:error:"); final _objc_msgSend_170 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, bool, ffi.Pointer, ffi.Pointer>)>(); late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = objc.registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); final _objc_msgSend_171 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_setAttributes_ofItemAtPath_error_ = objc.registerName("setAttributes:ofItemAtPath:error:"); final _objc_msgSend_172 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = objc.registerName( "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); final _objc_msgSend_173 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, bool, ffi.Pointer, ffi.Pointer>)>(); late final _sel_contentsOfDirectoryAtPath_error_ = objc.registerName("contentsOfDirectoryAtPath:error:"); final _objc_msgSend_174 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_subpathsOfDirectoryAtPath_error_ = objc.registerName("subpathsOfDirectoryAtPath:error:"); late final _sel_attributesOfItemAtPath_error_ = objc.registerName("attributesOfItemAtPath:error:"); final _objc_msgSend_175 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_attributesOfFileSystemForPath_error_ = objc.registerName("attributesOfFileSystemForPath:error:"); late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = objc.registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); final _objc_msgSend_176 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_destinationOfSymbolicLinkAtPath_error_ = objc.registerName("destinationOfSymbolicLinkAtPath:error:"); final _objc_msgSend_177 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_copyItemAtPath_toPath_error_ = objc.registerName("copyItemAtPath:toPath:error:"); late final _sel_moveItemAtPath_toPath_error_ = objc.registerName("moveItemAtPath:toPath:error:"); late final _sel_linkItemAtPath_toPath_error_ = objc.registerName("linkItemAtPath:toPath:error:"); late final _sel_removeItemAtPath_error_ = objc.registerName("removeItemAtPath:error:"); final _objc_msgSend_178 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_copyItemAtURL_toURL_error_ = objc.registerName("copyItemAtURL:toURL:error:"); late final _sel_moveItemAtURL_toURL_error_ = objc.registerName("moveItemAtURL:toURL:error:"); late final _sel_linkItemAtURL_toURL_error_ = objc.registerName("linkItemAtURL:toURL:error:"); late final _sel_removeItemAtURL_error_ = objc.registerName("removeItemAtURL:error:"); final _objc_msgSend_179 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_trashItemAtURL_resultingItemURL_error_ = objc.registerName("trashItemAtURL:resultingItemURL:error:"); final _objc_msgSend_180 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer>)>(); late final _sel_fileAttributesAtPath_traverseLink_ = objc.registerName("fileAttributesAtPath:traverseLink:"); final _objc_msgSend_181 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_changeFileAttributes_atPath_ = objc.registerName("changeFileAttributes:atPath:"); final _objc_msgSend_182 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_directoryContentsAtPath_ = objc.registerName("directoryContentsAtPath:"); final _objc_msgSend_183 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_fileSystemAttributesAtPath_ = objc.registerName("fileSystemAttributesAtPath:"); final _objc_msgSend_184 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pathContentOfSymbolicLinkAtPath_ = objc.registerName("pathContentOfSymbolicLinkAtPath:"); late final _sel_createSymbolicLinkAtPath_pathContent_ = objc.registerName("createSymbolicLinkAtPath:pathContent:"); final _objc_msgSend_185 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_createDirectoryAtPath_attributes_ = objc.registerName("createDirectoryAtPath:attributes:"); final _objc_msgSend_186 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_currentDirectoryPath = objc.registerName("currentDirectoryPath"); late final _sel_changeCurrentDirectoryPath_ = objc.registerName("changeCurrentDirectoryPath:"); late final _sel_fileExistsAtPath_ = objc.registerName("fileExistsAtPath:"); late final _sel_fileExistsAtPath_isDirectory_ = objc.registerName("fileExistsAtPath:isDirectory:"); final _objc_msgSend_187 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isReadableFileAtPath_ = objc.registerName("isReadableFileAtPath:"); late final _sel_isWritableFileAtPath_ = objc.registerName("isWritableFileAtPath:"); late final _sel_isExecutableFileAtPath_ = objc.registerName("isExecutableFileAtPath:"); late final _sel_isDeletableFileAtPath_ = objc.registerName("isDeletableFileAtPath:"); late final _sel_contentsEqualAtPath_andPath_ = objc.registerName("contentsEqualAtPath:andPath:"); late final _sel_displayNameAtPath_ = objc.registerName("displayNameAtPath:"); final _objc_msgSend_188 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_componentsToDisplayForPath_ = objc.registerName("componentsToDisplayForPath:"); late final _sel_enumeratorAtPath_ = objc.registerName("enumeratorAtPath:"); bool _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => block.ref.target .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => (objc.getBlockClosure(block) as bool Function(ffi.Pointer, ffi.Pointer))(arg0, arg1); class ObjCBlock_bool_NSURL_NSError extends objc.ObjCBlockBase { ObjCBlock_bool_NSURL_NSError._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_bool_NSURL_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_bool_NSURL_NSError._(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. ObjCBlock_bool_NSURL_NSError.fromFunctionPointer( ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_bool_NSURL_NSError.fromFunction( bool Function(objc.NSURL, objc.NSError) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) .cast(), (ffi.Pointer arg0, ffi.Pointer arg1) => fn( objc.NSURL.castFromPointer(arg0, retain: true, release: true), objc.NSError.castFromPointer(arg1, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; bool call(objc.NSURL arg0, objc.NSError arg1) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()( pointer, arg0.pointer, arg1.pointer); } late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = objc.registerName( "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); final _objc_msgSend_189 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_subpathsAtPath_ = objc.registerName("subpathsAtPath:"); late final _sel_contentsAtPath_ = objc.registerName("contentsAtPath:"); final _objc_msgSend_190 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_createFileAtPath_contents_attributes_ = objc.registerName("createFileAtPath:contents:attributes:"); final _objc_msgSend_191 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_fileSystemRepresentationWithPath_ = objc.registerName("fileSystemRepresentationWithPath:"); final _objc_msgSend_192 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_stringWithFileSystemRepresentation_length_ = objc.registerName("stringWithFileSystemRepresentation:length:"); final _objc_msgSend_193 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); enum NSFileManagerItemReplacementOptions { NSFileManagerItemReplacementUsingNewMetadataOnly(1), NSFileManagerItemReplacementWithoutDeletingBackupItem(2); final int value; const NSFileManagerItemReplacementOptions(this.value); static NSFileManagerItemReplacementOptions fromValue(int value) => switch (value) { 1 => NSFileManagerItemReplacementUsingNewMetadataOnly, 2 => NSFileManagerItemReplacementWithoutDeletingBackupItem, _ => throw ArgumentError( "Unknown value for NSFileManagerItemReplacementOptions: $value"), }; } late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = objc.registerName( "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); final _objc_msgSend_194 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer>, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer>, ffi.Pointer>)>(); late final _sel_setUbiquitous_itemAtURL_destinationURL_error_ = objc.registerName("setUbiquitous:itemAtURL:destinationURL:error:"); final _objc_msgSend_195 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Bool, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, bool, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_isUbiquitousItemAtURL_ = objc.registerName("isUbiquitousItemAtURL:"); final _objc_msgSend_196 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_startDownloadingUbiquitousItemAtURL_error_ = objc.registerName("startDownloadingUbiquitousItemAtURL:error:"); late final _sel_evictUbiquitousItemAtURL_error_ = objc.registerName("evictUbiquitousItemAtURL:error:"); late final _sel_URLForUbiquityContainerIdentifier_ = objc.registerName("URLForUbiquityContainerIdentifier:"); final _objc_msgSend_197 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); final _objc_msgSend_198 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer>)>(); late final _sel_ubiquityIdentityToken = objc.registerName("ubiquityIdentityToken"); void _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => (objc.getBlockClosure(block) as void Function(ffi.Pointer, ffi.Pointer))(arg0, arg1); class ObjCBlock_ffiVoid_NSDictionary_NSError extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSDictionary_NSError._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSDictionary_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSDictionary_NSError._(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. ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunction( void Function(objc.NSDictionary?, objc.NSError?) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) .cast(), (ffi.Pointer arg0, ffi.Pointer arg1) => fn( arg0.address == 0 ? null : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSDictionary_NSError.listener( void Function(objc.NSDictionary?, objc.NSError?) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSError(objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0, ffi.Pointer arg1) => fn( arg0.address == 0 ? null : objc.NSDictionary.castFromPointer(arg0, retain: false, release: true), arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(objc.NSDictionary? arg0, objc.NSError? arg1) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); } late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = objc.registerName("getFileProviderServicesForItemAtURL:completionHandler:"); final _objc_msgSend_199 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_containerURLForSecurityApplicationGroupIdentifier_ = objc.registerName("containerURLForSecurityApplicationGroupIdentifier:"); late final _sel_homeDirectoryForCurrentUser = objc.registerName("homeDirectoryForCurrentUser"); late final _sel_temporaryDirectory = objc.registerName("temporaryDirectory"); late final _sel_homeDirectoryForUser_ = objc.registerName("homeDirectoryForUser:"); /// NSHTTPCookieStorage class NSHTTPCookieStorage extends objc.NSObject { NSHTTPCookieStorage._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSHTTPCookieStorage] that wraps the given raw object pointer. NSHTTPCookieStorage.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); } /// sharedHTTPCookieStorage static NSHTTPCookieStorage getSharedHTTPCookieStorage() { final _ret = _objc_msgSend_200( _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); } /// sharedCookieStorageForGroupContainerIdentifier: static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( objc.NSString identifier) { final _ret = _objc_msgSend_201( _class_NSHTTPCookieStorage, _sel_sharedCookieStorageForGroupContainerIdentifier_, identifier.pointer); return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); } /// cookies objc.NSArray? get cookies { final _ret = _objc_msgSend_87(this.pointer, _sel_cookies); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setCookie: void setCookie_(NSHTTPCookie cookie) { _objc_msgSend_207(this.pointer, _sel_setCookie_, cookie.pointer); } /// deleteCookie: void deleteCookie_(NSHTTPCookie cookie) { _objc_msgSend_207(this.pointer, _sel_deleteCookie_, cookie.pointer); } /// removeCookiesSinceDate: void removeCookiesSinceDate_(objc.NSDate date) { _objc_msgSend_137(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); } /// cookiesForURL: objc.NSArray? cookiesForURL_(objc.NSURL URL) { final _ret = _objc_msgSend_208(this.pointer, _sel_cookiesForURL_, URL.pointer); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setCookies:forURL:mainDocumentURL: void setCookies_forURL_mainDocumentURL_( objc.NSArray cookies, objc.NSURL? URL, objc.NSURL? mainDocumentURL) { _objc_msgSend_209( this.pointer, _sel_setCookies_forURL_mainDocumentURL_, cookies.pointer, URL?.pointer ?? ffi.nullptr, mainDocumentURL?.pointer ?? ffi.nullptr); } /// cookieAcceptPolicy NSHTTPCookieAcceptPolicy get cookieAcceptPolicy { final _ret = _objc_msgSend_210(this.pointer, _sel_cookieAcceptPolicy); return NSHTTPCookieAcceptPolicy.fromValue(_ret); } /// setCookieAcceptPolicy: set cookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { return _objc_msgSend_211( this.pointer, _sel_setCookieAcceptPolicy_, value.value); } /// sortedCookiesUsingDescriptors: objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { final _ret = _objc_msgSend_85( this.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// storeCookies:forTask: void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { _objc_msgSend_212(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, task.pointer); } /// getCookiesForTask:completionHandler: void getCookiesForTask_completionHandler_( NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { _objc_msgSend_213(this.pointer, _sel_getCookiesForTask_completionHandler_, task.pointer, completionHandler.pointer); } /// init NSHTTPCookieStorage init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); } /// new static NSHTTPCookieStorage new1() { final _ret = _objc_msgSend_19(_class_NSHTTPCookieStorage, _sel_new); return NSHTTPCookieStorage.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); return NSHTTPCookieStorage.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSHTTPCookieStorage alloc() { final _ret = _objc_msgSend_19(_class_NSHTTPCookieStorage, _sel_alloc); return NSHTTPCookieStorage.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSHTTPCookieStorage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSHTTPCookieStorage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSHTTPCookieStorage, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSHTTPCookieStorage, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); late final _sel_sharedHTTPCookieStorage = objc.registerName("sharedHTTPCookieStorage"); final _objc_msgSend_200 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); final _objc_msgSend_201 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cookies = objc.registerName("cookies"); /// NSHTTPCookie class NSHTTPCookie extends objc.NSObject { NSHTTPCookie._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSHTTPCookie] that points to the same underlying object as [other]. NSHTTPCookie.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSHTTPCookie] that wraps the given raw object pointer. NSHTTPCookie.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSHTTPCookie]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); } /// initWithProperties: NSHTTPCookie? initWithProperties_(objc.NSDictionary properties) { final _ret = _objc_msgSend_202( this.pointer, _sel_initWithProperties_, properties.pointer); return _ret.address == 0 ? null : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } /// cookieWithProperties: static NSHTTPCookie? cookieWithProperties_(objc.NSDictionary properties) { final _ret = _objc_msgSend_203( _class_NSHTTPCookie, _sel_cookieWithProperties_, properties.pointer); return _ret.address == 0 ? null : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } /// requestHeaderFieldsWithCookies: static objc.NSDictionary requestHeaderFieldsWithCookies_( objc.NSArray cookies) { final _ret = _objc_msgSend_204(_class_NSHTTPCookie, _sel_requestHeaderFieldsWithCookies_, cookies.pointer); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// cookiesWithResponseHeaderFields:forURL: static objc.NSArray cookiesWithResponseHeaderFields_forURL_( objc.NSDictionary headerFields, objc.NSURL URL) { final _ret = _objc_msgSend_205( _class_NSHTTPCookie, _sel_cookiesWithResponseHeaderFields_forURL_, headerFields.pointer, URL.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// properties objc.NSDictionary? get properties { final _ret = _objc_msgSend_83(this.pointer, _sel_properties); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// version int get version { return _objc_msgSend_56(this.pointer, _sel_version); } /// name objc.NSString get name { final _ret = _objc_msgSend_11(this.pointer, _sel_name); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// value objc.NSString get value { final _ret = _objc_msgSend_11(this.pointer, _sel_value); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// expiresDate objc.NSDate? get expiresDate { final _ret = _objc_msgSend_206(this.pointer, _sel_expiresDate); return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// isSessionOnly bool get sessionOnly { return _objc_msgSend_13(this.pointer, _sel_isSessionOnly); } /// domain objc.NSString get domain { final _ret = _objc_msgSend_11(this.pointer, _sel_domain); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// path objc.NSString get path { final _ret = _objc_msgSend_11(this.pointer, _sel_path); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// isSecure bool get secure { return _objc_msgSend_13(this.pointer, _sel_isSecure); } /// isHTTPOnly bool get HTTPOnly { return _objc_msgSend_13(this.pointer, _sel_isHTTPOnly); } /// comment objc.NSString? get comment { final _ret = _objc_msgSend_20(this.pointer, _sel_comment); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// commentURL objc.NSURL? get commentURL { final _ret = _objc_msgSend_24(this.pointer, _sel_commentURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// portList objc.NSArray? get portList { final _ret = _objc_msgSend_87(this.pointer, _sel_portList); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// sameSitePolicy objc.NSString? get sameSitePolicy { final _ret = _objc_msgSend_20(this.pointer, _sel_sameSitePolicy); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSHTTPCookie init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } /// new static NSHTTPCookie new1() { final _ret = _objc_msgSend_19(_class_NSHTTPCookie, _sel_new); return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSHTTPCookie, _sel_allocWithZone_, zone); return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSHTTPCookie alloc() { final _ret = _objc_msgSend_19(_class_NSHTTPCookie, _sel_alloc); return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSHTTPCookie, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSHTTPCookie, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSHTTPCookie, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); final _objc_msgSend_202 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cookieWithProperties_ = objc.registerName("cookieWithProperties:"); final _objc_msgSend_203 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_requestHeaderFieldsWithCookies_ = objc.registerName("requestHeaderFieldsWithCookies:"); final _objc_msgSend_204 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cookiesWithResponseHeaderFields_forURL_ = objc.registerName("cookiesWithResponseHeaderFields:forURL:"); final _objc_msgSend_205 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_properties = objc.registerName("properties"); late final _sel_version = objc.registerName("version"); late final _sel_value = objc.registerName("value"); late final _sel_expiresDate = objc.registerName("expiresDate"); final _objc_msgSend_206 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_isSessionOnly = objc.registerName("isSessionOnly"); late final _sel_domain = objc.registerName("domain"); late final _sel_path = objc.registerName("path"); late final _sel_isSecure = objc.registerName("isSecure"); late final _sel_isHTTPOnly = objc.registerName("isHTTPOnly"); late final _sel_comment = objc.registerName("comment"); late final _sel_commentURL = objc.registerName("commentURL"); late final _sel_portList = objc.registerName("portList"); late final _sel_sameSitePolicy = objc.registerName("sameSitePolicy"); late final _sel_setCookie_ = objc.registerName("setCookie:"); final _objc_msgSend_207 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_deleteCookie_ = objc.registerName("deleteCookie:"); late final _sel_removeCookiesSinceDate_ = objc.registerName("removeCookiesSinceDate:"); late final _sel_cookiesForURL_ = objc.registerName("cookiesForURL:"); final _objc_msgSend_208 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setCookies_forURL_mainDocumentURL_ = objc.registerName("setCookies:forURL:mainDocumentURL:"); final _objc_msgSend_209 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); enum NSHTTPCookieAcceptPolicy { NSHTTPCookieAcceptPolicyAlways(0), NSHTTPCookieAcceptPolicyNever(1), NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain(2); final int value; const NSHTTPCookieAcceptPolicy(this.value); static NSHTTPCookieAcceptPolicy fromValue(int value) => switch (value) { 0 => NSHTTPCookieAcceptPolicyAlways, 1 => NSHTTPCookieAcceptPolicyNever, 2 => NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, _ => throw ArgumentError( "Unknown value for NSHTTPCookieAcceptPolicy: $value"), }; } late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); final _objc_msgSend_210 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setCookieAcceptPolicy_ = objc.registerName("setCookieAcceptPolicy:"); final _objc_msgSend_211 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_sortedCookiesUsingDescriptors_ = objc.registerName("sortedCookiesUsingDescriptors:"); /// NSURLSessionTask class NSURLSessionTask extends objc.ObjCObjectBase { NSURLSessionTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionTask] that points to the same underlying object as [other]. NSURLSessionTask.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLSessionTask] that wraps the given raw object pointer. NSURLSessionTask.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } } late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); late final _sel_storeCookies_forTask_ = objc.registerName("storeCookies:forTask:"); final _objc_msgSend_212 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSArray extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSArray._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSArray castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSArray._(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. ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSArray.fromFunction(void Function(objc.NSArray?) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSArray_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSArray.castFromPointer(arg0, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSArray.listener(void Function(objc.NSArray?) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSArray(objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSArray_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSArray.castFromPointer(arg0, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(objc.NSArray? arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr); } late final _sel_getCookiesForTask_completionHandler_ = objc.registerName("getCookiesForTask:completionHandler:"); final _objc_msgSend_213 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSIndexPath class NSIndexPath extends objc.NSObject { NSIndexPath._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSIndexPath] that points to the same underlying object as [other]. NSIndexPath.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSIndexPath] that wraps the given raw object pointer. NSIndexPath.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSIndexPath]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); } /// indexPathWithIndex: static NSIndexPath indexPathWithIndex_(int index) { final _ret = _objc_msgSend_214(_class_NSIndexPath, _sel_indexPathWithIndex_, index); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// indexPathWithIndexes:length: static NSIndexPath indexPathWithIndexes_length_( ffi.Pointer indexes, int length) { final _ret = _objc_msgSend_215( _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// initWithIndexes:length: NSIndexPath initWithIndexes_length_( ffi.Pointer indexes, int length) { final _ret = _objc_msgSend_215( this.pointer, _sel_initWithIndexes_length_, indexes, length); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// initWithIndex: NSIndexPath initWithIndex_(int index) { final _ret = _objc_msgSend_214(this.pointer, _sel_initWithIndex_, index); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// indexPathByAddingIndex: NSIndexPath indexPathByAddingIndex_(int index) { final _ret = _objc_msgSend_216(this.pointer, _sel_indexPathByAddingIndex_, index); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// indexPathByRemovingLastIndex NSIndexPath indexPathByRemovingLastIndex() { final _ret = _objc_msgSend_217(this.pointer, _sel_indexPathByRemovingLastIndex); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// indexAtPosition: int indexAtPosition_(int position) { return _objc_msgSend_218(this.pointer, _sel_indexAtPosition_, position); } /// length int get length { return _objc_msgSend_56(this.pointer, _sel_length); } /// getIndexes:range: void getIndexes_range_( ffi.Pointer indexes, _NSRange positionRange) { _objc_msgSend_219( this.pointer, _sel_getIndexes_range_, indexes, positionRange); } /// compare: objc.NSComparisonResult compare_(NSIndexPath otherObject) { final _ret = _objc_msgSend_220(this.pointer, _sel_compare_, otherObject.pointer); return objc.NSComparisonResult.fromValue(_ret); } /// getIndexes: void getIndexes_(ffi.Pointer indexes) { _objc_msgSend_221(this.pointer, _sel_getIndexes_, indexes); } /// init NSIndexPath init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// new static NSIndexPath new1() { final _ret = _objc_msgSend_19(_class_NSIndexPath, _sel_new); return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSIndexPath, _sel_allocWithZone_, zone); return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSIndexPath alloc() { final _ret = _objc_msgSend_19(_class_NSIndexPath, _sel_alloc); return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSIndexPath, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSIndexPath, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSIndexPath, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSIndexPath, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSIndexPath, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSIndexPath, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSIndexPath = objc.getClass("NSIndexPath"); late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); final _objc_msgSend_214 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_indexPathWithIndexes_length_ = objc.registerName("indexPathWithIndexes:length:"); final _objc_msgSend_215 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithIndexes_length_ = objc.registerName("initWithIndexes:length:"); late final _sel_initWithIndex_ = objc.registerName("initWithIndex:"); late final _sel_indexPathByAddingIndex_ = objc.registerName("indexPathByAddingIndex:"); final _objc_msgSend_216 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_indexPathByRemovingLastIndex = objc.registerName("indexPathByRemovingLastIndex"); final _objc_msgSend_217 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_indexAtPosition_ = objc.registerName("indexAtPosition:"); final _objc_msgSend_218 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< int Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_getIndexes_range_ = objc.registerName("getIndexes:range:"); final _objc_msgSend_219 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_compare_ = objc.registerName("compare:"); final _objc_msgSend_220 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getIndexes_ = objc.registerName("getIndexes:"); final _objc_msgSend_221 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSInflectionRule class NSInflectionRule extends objc.NSObject { NSInflectionRule._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSInflectionRule] that points to the same underlying object as [other]. NSInflectionRule.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSInflectionRule] that wraps the given raw object pointer. NSInflectionRule.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSInflectionRule]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); } /// init NSInflectionRule init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } /// automaticRule static NSInflectionRule getAutomaticRule() { final _ret = _objc_msgSend_222(_class_NSInflectionRule, _sel_automaticRule); return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } /// canInflectLanguage: static bool canInflectLanguage_(objc.NSString language) { return _objc_msgSend_31( _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); } /// canInflectPreferredLocalization static bool getCanInflectPreferredLocalization() { return _objc_msgSend_13( _class_NSInflectionRule, _sel_canInflectPreferredLocalization); } /// new static NSInflectionRule new1() { final _ret = _objc_msgSend_19(_class_NSInflectionRule, _sel_new); return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSInflectionRule, _sel_allocWithZone_, zone); return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSInflectionRule alloc() { final _ret = _objc_msgSend_19(_class_NSInflectionRule, _sel_alloc); return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSInflectionRule, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSInflectionRule, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSInflectionRule, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); late final _sel_automaticRule = objc.registerName("automaticRule"); final _objc_msgSend_222 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); late final _sel_canInflectPreferredLocalization = objc.registerName("canInflectPreferredLocalization"); /// NSMorphology class NSMorphology extends objc.NSObject { NSMorphology._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSMorphology] that points to the same underlying object as [other]. NSMorphology.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSMorphology] that wraps the given raw object pointer. NSMorphology.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSMorphology]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSMorphology); } /// grammaticalGender NSGrammaticalGender get grammaticalGender { final _ret = _objc_msgSend_223(this.pointer, _sel_grammaticalGender); return NSGrammaticalGender.fromValue(_ret); } /// setGrammaticalGender: set grammaticalGender(NSGrammaticalGender value) { return _objc_msgSend_224( this.pointer, _sel_setGrammaticalGender_, value.value); } /// partOfSpeech NSGrammaticalPartOfSpeech get partOfSpeech { final _ret = _objc_msgSend_225(this.pointer, _sel_partOfSpeech); return NSGrammaticalPartOfSpeech.fromValue(_ret); } /// setPartOfSpeech: set partOfSpeech(NSGrammaticalPartOfSpeech value) { return _objc_msgSend_226(this.pointer, _sel_setPartOfSpeech_, value.value); } /// number NSGrammaticalNumber get number { final _ret = _objc_msgSend_227(this.pointer, _sel_number); return NSGrammaticalNumber.fromValue(_ret); } /// setNumber: set number(NSGrammaticalNumber value) { return _objc_msgSend_228(this.pointer, _sel_setNumber_, value.value); } /// grammaticalCase NSGrammaticalCase get grammaticalCase { final _ret = _objc_msgSend_229(this.pointer, _sel_grammaticalCase); return NSGrammaticalCase.fromValue(_ret); } /// setGrammaticalCase: set grammaticalCase(NSGrammaticalCase value) { return _objc_msgSend_230( this.pointer, _sel_setGrammaticalCase_, value.value); } /// determination NSGrammaticalDetermination get determination { final _ret = _objc_msgSend_231(this.pointer, _sel_determination); return NSGrammaticalDetermination.fromValue(_ret); } /// setDetermination: set determination(NSGrammaticalDetermination value) { return _objc_msgSend_232(this.pointer, _sel_setDetermination_, value.value); } /// grammaticalPerson NSGrammaticalPerson get grammaticalPerson { final _ret = _objc_msgSend_233(this.pointer, _sel_grammaticalPerson); return NSGrammaticalPerson.fromValue(_ret); } /// setGrammaticalPerson: set grammaticalPerson(NSGrammaticalPerson value) { return _objc_msgSend_234( this.pointer, _sel_setGrammaticalPerson_, value.value); } /// pronounType NSGrammaticalPronounType get pronounType { final _ret = _objc_msgSend_235(this.pointer, _sel_pronounType); return NSGrammaticalPronounType.fromValue(_ret); } /// setPronounType: set pronounType(NSGrammaticalPronounType value) { return _objc_msgSend_236(this.pointer, _sel_setPronounType_, value.value); } /// definiteness NSGrammaticalDefiniteness get definiteness { final _ret = _objc_msgSend_237(this.pointer, _sel_definiteness); return NSGrammaticalDefiniteness.fromValue(_ret); } /// setDefiniteness: set definiteness(NSGrammaticalDefiniteness value) { return _objc_msgSend_238(this.pointer, _sel_setDefiniteness_, value.value); } /// customPronounForLanguage: NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { final _ret = _objc_msgSend_240( this.pointer, _sel_customPronounForLanguage_, language.pointer); return _ret.address == 0 ? null : NSMorphologyCustomPronoun.castFromPointer(_ret, retain: true, release: true); } /// setCustomPronoun:forLanguage:error: bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, objc.NSString language, ffi.Pointer> error) { return _objc_msgSend_241( this.pointer, _sel_setCustomPronoun_forLanguage_error_, features?.pointer ?? ffi.nullptr, language.pointer, error); } /// isUnspecified bool get unspecified { return _objc_msgSend_13(this.pointer, _sel_isUnspecified); } /// userMorphology static NSMorphology getUserMorphology() { final _ret = _objc_msgSend_242(_class_NSMorphology, _sel_userMorphology); return NSMorphology.castFromPointer(_ret, retain: true, release: true); } /// init NSMorphology init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSMorphology.castFromPointer(_ret, retain: true, release: true); } /// new static NSMorphology new1() { final _ret = _objc_msgSend_19(_class_NSMorphology, _sel_new); return NSMorphology.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSMorphology, _sel_allocWithZone_, zone); return NSMorphology.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSMorphology alloc() { final _ret = _objc_msgSend_19(_class_NSMorphology, _sel_alloc); return NSMorphology.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSMorphology, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSMorphology, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSMorphology, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSMorphology, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSMorphology, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSMorphology = objc.getClass("NSMorphology"); enum NSGrammaticalGender { NSGrammaticalGenderNotSet(0), NSGrammaticalGenderFeminine(1), NSGrammaticalGenderMasculine(2), NSGrammaticalGenderNeuter(3); final int value; const NSGrammaticalGender(this.value); static NSGrammaticalGender fromValue(int value) => switch (value) { 0 => NSGrammaticalGenderNotSet, 1 => NSGrammaticalGenderFeminine, 2 => NSGrammaticalGenderMasculine, 3 => NSGrammaticalGenderNeuter, _ => throw ArgumentError("Unknown value for NSGrammaticalGender: $value"), }; } late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); final _objc_msgSend_223 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setGrammaticalGender_ = objc.registerName("setGrammaticalGender:"); final _objc_msgSend_224 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSGrammaticalPartOfSpeech { NSGrammaticalPartOfSpeechNotSet(0), NSGrammaticalPartOfSpeechDeterminer(1), NSGrammaticalPartOfSpeechPronoun(2), NSGrammaticalPartOfSpeechLetter(3), NSGrammaticalPartOfSpeechAdverb(4), NSGrammaticalPartOfSpeechParticle(5), NSGrammaticalPartOfSpeechAdjective(6), NSGrammaticalPartOfSpeechAdposition(7), NSGrammaticalPartOfSpeechVerb(8), NSGrammaticalPartOfSpeechNoun(9), NSGrammaticalPartOfSpeechConjunction(10), NSGrammaticalPartOfSpeechNumeral(11), NSGrammaticalPartOfSpeechInterjection(12), NSGrammaticalPartOfSpeechPreposition(13), NSGrammaticalPartOfSpeechAbbreviation(14); final int value; const NSGrammaticalPartOfSpeech(this.value); static NSGrammaticalPartOfSpeech fromValue(int value) => switch (value) { 0 => NSGrammaticalPartOfSpeechNotSet, 1 => NSGrammaticalPartOfSpeechDeterminer, 2 => NSGrammaticalPartOfSpeechPronoun, 3 => NSGrammaticalPartOfSpeechLetter, 4 => NSGrammaticalPartOfSpeechAdverb, 5 => NSGrammaticalPartOfSpeechParticle, 6 => NSGrammaticalPartOfSpeechAdjective, 7 => NSGrammaticalPartOfSpeechAdposition, 8 => NSGrammaticalPartOfSpeechVerb, 9 => NSGrammaticalPartOfSpeechNoun, 10 => NSGrammaticalPartOfSpeechConjunction, 11 => NSGrammaticalPartOfSpeechNumeral, 12 => NSGrammaticalPartOfSpeechInterjection, 13 => NSGrammaticalPartOfSpeechPreposition, 14 => NSGrammaticalPartOfSpeechAbbreviation, _ => throw ArgumentError( "Unknown value for NSGrammaticalPartOfSpeech: $value"), }; } late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); final _objc_msgSend_225 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPartOfSpeech_ = objc.registerName("setPartOfSpeech:"); final _objc_msgSend_226 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSGrammaticalNumber { NSGrammaticalNumberNotSet(0), NSGrammaticalNumberSingular(1), NSGrammaticalNumberZero(2), NSGrammaticalNumberPlural(3), NSGrammaticalNumberPluralTwo(4), NSGrammaticalNumberPluralFew(5), NSGrammaticalNumberPluralMany(6); final int value; const NSGrammaticalNumber(this.value); static NSGrammaticalNumber fromValue(int value) => switch (value) { 0 => NSGrammaticalNumberNotSet, 1 => NSGrammaticalNumberSingular, 2 => NSGrammaticalNumberZero, 3 => NSGrammaticalNumberPlural, 4 => NSGrammaticalNumberPluralTwo, 5 => NSGrammaticalNumberPluralFew, 6 => NSGrammaticalNumberPluralMany, _ => throw ArgumentError("Unknown value for NSGrammaticalNumber: $value"), }; } late final _sel_number = objc.registerName("number"); final _objc_msgSend_227 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setNumber_ = objc.registerName("setNumber:"); final _objc_msgSend_228 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSGrammaticalCase { NSGrammaticalCaseNotSet(0), NSGrammaticalCaseNominative(1), NSGrammaticalCaseAccusative(2), NSGrammaticalCaseDative(3), NSGrammaticalCaseGenitive(4), NSGrammaticalCasePrepositional(5), NSGrammaticalCaseAblative(6), NSGrammaticalCaseAdessive(7), NSGrammaticalCaseAllative(8), NSGrammaticalCaseElative(9), NSGrammaticalCaseIllative(10), NSGrammaticalCaseEssive(11), NSGrammaticalCaseInessive(12), NSGrammaticalCaseLocative(13), NSGrammaticalCaseTranslative(14); final int value; const NSGrammaticalCase(this.value); static NSGrammaticalCase fromValue(int value) => switch (value) { 0 => NSGrammaticalCaseNotSet, 1 => NSGrammaticalCaseNominative, 2 => NSGrammaticalCaseAccusative, 3 => NSGrammaticalCaseDative, 4 => NSGrammaticalCaseGenitive, 5 => NSGrammaticalCasePrepositional, 6 => NSGrammaticalCaseAblative, 7 => NSGrammaticalCaseAdessive, 8 => NSGrammaticalCaseAllative, 9 => NSGrammaticalCaseElative, 10 => NSGrammaticalCaseIllative, 11 => NSGrammaticalCaseEssive, 12 => NSGrammaticalCaseInessive, 13 => NSGrammaticalCaseLocative, 14 => NSGrammaticalCaseTranslative, _ => throw ArgumentError("Unknown value for NSGrammaticalCase: $value"), }; } late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); final _objc_msgSend_229 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); final _objc_msgSend_230 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSGrammaticalDetermination { NSGrammaticalDeterminationNotSet(0), NSGrammaticalDeterminationIndependent(1), NSGrammaticalDeterminationDependent(2); final int value; const NSGrammaticalDetermination(this.value); static NSGrammaticalDetermination fromValue(int value) => switch (value) { 0 => NSGrammaticalDeterminationNotSet, 1 => NSGrammaticalDeterminationIndependent, 2 => NSGrammaticalDeterminationDependent, _ => throw ArgumentError( "Unknown value for NSGrammaticalDetermination: $value"), }; } late final _sel_determination = objc.registerName("determination"); final _objc_msgSend_231 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setDetermination_ = objc.registerName("setDetermination:"); final _objc_msgSend_232 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSGrammaticalPerson { NSGrammaticalPersonNotSet(0), NSGrammaticalPersonFirst(1), NSGrammaticalPersonSecond(2), NSGrammaticalPersonThird(3); final int value; const NSGrammaticalPerson(this.value); static NSGrammaticalPerson fromValue(int value) => switch (value) { 0 => NSGrammaticalPersonNotSet, 1 => NSGrammaticalPersonFirst, 2 => NSGrammaticalPersonSecond, 3 => NSGrammaticalPersonThird, _ => throw ArgumentError("Unknown value for NSGrammaticalPerson: $value"), }; } late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); final _objc_msgSend_233 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setGrammaticalPerson_ = objc.registerName("setGrammaticalPerson:"); final _objc_msgSend_234 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSGrammaticalPronounType { NSGrammaticalPronounTypeNotSet(0), NSGrammaticalPronounTypePersonal(1), NSGrammaticalPronounTypeReflexive(2), NSGrammaticalPronounTypePossessive(3); final int value; const NSGrammaticalPronounType(this.value); static NSGrammaticalPronounType fromValue(int value) => switch (value) { 0 => NSGrammaticalPronounTypeNotSet, 1 => NSGrammaticalPronounTypePersonal, 2 => NSGrammaticalPronounTypeReflexive, 3 => NSGrammaticalPronounTypePossessive, _ => throw ArgumentError( "Unknown value for NSGrammaticalPronounType: $value"), }; } late final _sel_pronounType = objc.registerName("pronounType"); final _objc_msgSend_235 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPronounType_ = objc.registerName("setPronounType:"); final _objc_msgSend_236 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); enum NSGrammaticalDefiniteness { NSGrammaticalDefinitenessNotSet(0), NSGrammaticalDefinitenessIndefinite(1), NSGrammaticalDefinitenessDefinite(2); final int value; const NSGrammaticalDefiniteness(this.value); static NSGrammaticalDefiniteness fromValue(int value) => switch (value) { 0 => NSGrammaticalDefinitenessNotSet, 1 => NSGrammaticalDefinitenessIndefinite, 2 => NSGrammaticalDefinitenessDefinite, _ => throw ArgumentError( "Unknown value for NSGrammaticalDefiniteness: $value"), }; } late final _sel_definiteness = objc.registerName("definiteness"); final _objc_msgSend_237 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); final _objc_msgSend_238 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); /// NSMorphologyCustomPronoun class NSMorphologyCustomPronoun extends objc.NSObject { NSMorphologyCustomPronoun._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. NSMorphologyCustomPronoun.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. NSMorphologyCustomPronoun.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); } /// isSupportedForLanguage: static bool isSupportedForLanguage_(objc.NSString language) { return _objc_msgSend_31(_class_NSMorphologyCustomPronoun, _sel_isSupportedForLanguage_, language.pointer); } /// requiredKeysForLanguage: static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { final _ret = _objc_msgSend_239(_class_NSMorphologyCustomPronoun, _sel_requiredKeysForLanguage_, language.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// subjectForm objc.NSString? get subjectForm { final _ret = _objc_msgSend_20(this.pointer, _sel_subjectForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setSubjectForm: set subjectForm(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); } /// objectForm objc.NSString? get objectForm { final _ret = _objc_msgSend_20(this.pointer, _sel_objectForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setObjectForm: set objectForm(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); } /// possessiveForm objc.NSString? get possessiveForm { final _ret = _objc_msgSend_20(this.pointer, _sel_possessiveForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPossessiveForm: set possessiveForm(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); } /// possessiveAdjectiveForm objc.NSString? get possessiveAdjectiveForm { final _ret = _objc_msgSend_20(this.pointer, _sel_possessiveAdjectiveForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPossessiveAdjectiveForm: set possessiveAdjectiveForm(objc.NSString? value) { return _objc_msgSend_21(this.pointer, _sel_setPossessiveAdjectiveForm_, value?.pointer ?? ffi.nullptr); } /// reflexiveForm objc.NSString? get reflexiveForm { final _ret = _objc_msgSend_20(this.pointer, _sel_reflexiveForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setReflexiveForm: set reflexiveForm(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); } /// init NSMorphologyCustomPronoun init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: true, release: true); } /// new static NSMorphologyCustomPronoun new1() { final _ret = _objc_msgSend_19(_class_NSMorphologyCustomPronoun, _sel_new); return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28( _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSMorphologyCustomPronoun alloc() { final _ret = _objc_msgSend_19(_class_NSMorphologyCustomPronoun, _sel_alloc); return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13( _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSMorphologyCustomPronoun, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSMorphologyCustomPronoun, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSMorphologyCustomPronoun = objc.getClass("NSMorphologyCustomPronoun"); late final _sel_isSupportedForLanguage_ = objc.registerName("isSupportedForLanguage:"); late final _sel_requiredKeysForLanguage_ = objc.registerName("requiredKeysForLanguage:"); final _objc_msgSend_239 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_subjectForm = objc.registerName("subjectForm"); late final _sel_setSubjectForm_ = objc.registerName("setSubjectForm:"); late final _sel_objectForm = objc.registerName("objectForm"); late final _sel_setObjectForm_ = objc.registerName("setObjectForm:"); late final _sel_possessiveForm = objc.registerName("possessiveForm"); late final _sel_setPossessiveForm_ = objc.registerName("setPossessiveForm:"); late final _sel_possessiveAdjectiveForm = objc.registerName("possessiveAdjectiveForm"); late final _sel_setPossessiveAdjectiveForm_ = objc.registerName("setPossessiveAdjectiveForm:"); late final _sel_reflexiveForm = objc.registerName("reflexiveForm"); late final _sel_setReflexiveForm_ = objc.registerName("setReflexiveForm:"); late final _sel_customPronounForLanguage_ = objc.registerName("customPronounForLanguage:"); final _objc_msgSend_240 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setCustomPronoun_forLanguage_error_ = objc.registerName("setCustomPronoun:forLanguage:error:"); final _objc_msgSend_241 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_isUnspecified = objc.registerName("isUnspecified"); late final _sel_userMorphology = objc.registerName("userMorphology"); final _objc_msgSend_242 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); /// NSOperationQueue class NSOperationQueue extends objc.NSObject { NSOperationQueue._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSOperationQueue] that points to the same underlying object as [other]. NSOperationQueue.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSOperationQueue] that wraps the given raw object pointer. NSOperationQueue.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSOperationQueue]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); } /// progress NSProgress get progress { final _ret = _objc_msgSend_243(this.pointer, _sel_progress); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// addOperation: void addOperation_(NSOperation op) { _objc_msgSend_244(this.pointer, _sel_addOperation_, op.pointer); } /// addOperations:waitUntilFinished: void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { _objc_msgSend_249( this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); } /// addOperationWithBlock: void addOperationWithBlock_(ObjCBlock_ffiVoid block) { _objc_msgSend_140(this.pointer, _sel_addOperationWithBlock_, block.pointer); } /// addBarrierBlock: void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { _objc_msgSend_140(this.pointer, _sel_addBarrierBlock_, barrier.pointer); } /// maxConcurrentOperationCount int get maxConcurrentOperationCount { return _objc_msgSend_250(this.pointer, _sel_maxConcurrentOperationCount); } /// setMaxConcurrentOperationCount: set maxConcurrentOperationCount(int value) { return _objc_msgSend_251( this.pointer, _sel_setMaxConcurrentOperationCount_, value); } /// isSuspended bool get suspended { return _objc_msgSend_13(this.pointer, _sel_isSuspended); } /// setSuspended: set suspended(bool value) { return _objc_msgSend_14(this.pointer, _sel_setSuspended_, value); } /// name objc.NSString? get name { final _ret = _objc_msgSend_20(this.pointer, _sel_name); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setName: set name(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } /// qualityOfService NSQualityOfService get qualityOfService { final _ret = _objc_msgSend_247(this.pointer, _sel_qualityOfService); return NSQualityOfService.fromValue(_ret); } /// setQualityOfService: set qualityOfService(NSQualityOfService value) { return _objc_msgSend_248( this.pointer, _sel_setQualityOfService_, value.value); } /// underlyingQueue ffi.Pointer get underlyingQueue { return _objc_msgSend_252(this.pointer, _sel_underlyingQueue); } /// setUnderlyingQueue: set underlyingQueue(ffi.Pointer value) { return _objc_msgSend_253(this.pointer, _sel_setUnderlyingQueue_, value); } /// cancelAllOperations void cancelAllOperations() { _objc_msgSend_7(this.pointer, _sel_cancelAllOperations); } /// waitUntilAllOperationsAreFinished void waitUntilAllOperationsAreFinished() { _objc_msgSend_7(this.pointer, _sel_waitUntilAllOperationsAreFinished); } /// currentQueue static NSOperationQueue? getCurrentQueue() { final _ret = _objc_msgSend_254(_class_NSOperationQueue, _sel_currentQueue); return _ret.address == 0 ? null : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } /// mainQueue static NSOperationQueue getMainQueue() { final _ret = _objc_msgSend_255(_class_NSOperationQueue, _sel_mainQueue); return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } /// operations objc.NSArray get operations { final _ret = _objc_msgSend_32(this.pointer, _sel_operations); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// operationCount int get operationCount { return _objc_msgSend_56(this.pointer, _sel_operationCount); } /// init NSOperationQueue init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } /// new static NSOperationQueue new1() { final _ret = _objc_msgSend_19(_class_NSOperationQueue, _sel_new); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSOperationQueue, _sel_allocWithZone_, zone); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSOperationQueue alloc() { final _ret = _objc_msgSend_19(_class_NSOperationQueue, _sel_alloc); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSOperationQueue, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSOperationQueue, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSOperationQueue, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); late final _sel_progress = objc.registerName("progress"); final _objc_msgSend_243 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); /// NSOperation class NSOperation extends objc.NSObject { NSOperation._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSOperation] that points to the same underlying object as [other]. NSOperation.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSOperation] that wraps the given raw object pointer. NSOperation.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSOperation]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSOperation); } /// start void start() { _objc_msgSend_7(this.pointer, _sel_start); } /// main void main() { _objc_msgSend_7(this.pointer, _sel_main); } /// isCancelled bool get cancelled { return _objc_msgSend_13(this.pointer, _sel_isCancelled); } /// cancel void cancel() { _objc_msgSend_7(this.pointer, _sel_cancel); } /// isExecuting bool get executing { return _objc_msgSend_13(this.pointer, _sel_isExecuting); } /// isFinished bool get finished { return _objc_msgSend_13(this.pointer, _sel_isFinished); } /// isConcurrent bool get concurrent { return _objc_msgSend_13(this.pointer, _sel_isConcurrent); } /// isAsynchronous bool get asynchronous { return _objc_msgSend_13(this.pointer, _sel_isAsynchronous); } /// isReady bool get ready { return _objc_msgSend_13(this.pointer, _sel_isReady); } /// addDependency: void addDependency_(NSOperation op) { _objc_msgSend_244(this.pointer, _sel_addDependency_, op.pointer); } /// removeDependency: void removeDependency_(NSOperation op) { _objc_msgSend_244(this.pointer, _sel_removeDependency_, op.pointer); } /// dependencies objc.NSArray get dependencies { final _ret = _objc_msgSend_32(this.pointer, _sel_dependencies); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// queuePriority NSOperationQueuePriority get queuePriority { final _ret = _objc_msgSend_245(this.pointer, _sel_queuePriority); return NSOperationQueuePriority.fromValue(_ret); } /// setQueuePriority: set queuePriority(NSOperationQueuePriority value) { return _objc_msgSend_246(this.pointer, _sel_setQueuePriority_, value.value); } /// completionBlock ObjCBlock_ffiVoid? get completionBlock { final _ret = _objc_msgSend_15(this.pointer, _sel_completionBlock); return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setCompletionBlock: set completionBlock(ObjCBlock_ffiVoid? value) { return _objc_msgSend_16( this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); } /// waitUntilFinished void waitUntilFinished() { _objc_msgSend_7(this.pointer, _sel_waitUntilFinished); } /// threadPriority double get threadPriority { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_threadPriority) : _objc_msgSend_18(this.pointer, _sel_threadPriority); } /// setThreadPriority: set threadPriority(double value) { return _objc_msgSend_127(this.pointer, _sel_setThreadPriority_, value); } /// qualityOfService NSQualityOfService get qualityOfService { final _ret = _objc_msgSend_247(this.pointer, _sel_qualityOfService); return NSQualityOfService.fromValue(_ret); } /// setQualityOfService: set qualityOfService(NSQualityOfService value) { return _objc_msgSend_248( this.pointer, _sel_setQualityOfService_, value.value); } /// name objc.NSString? get name { final _ret = _objc_msgSend_20(this.pointer, _sel_name); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setName: set name(objc.NSString? value) { return _objc_msgSend_21( this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } /// init NSOperation init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSOperation.castFromPointer(_ret, retain: true, release: true); } /// new static NSOperation new1() { final _ret = _objc_msgSend_19(_class_NSOperation, _sel_new); return NSOperation.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSOperation, _sel_allocWithZone_, zone); return NSOperation.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSOperation alloc() { final _ret = _objc_msgSend_19(_class_NSOperation, _sel_alloc); return NSOperation.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSOperation, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSOperation, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSOperation, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSOperation, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSOperation, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSOperation, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSOperation = objc.getClass("NSOperation"); late final _sel_start = objc.registerName("start"); late final _sel_main = objc.registerName("main"); late final _sel_isExecuting = objc.registerName("isExecuting"); late final _sel_isConcurrent = objc.registerName("isConcurrent"); late final _sel_isAsynchronous = objc.registerName("isAsynchronous"); late final _sel_isReady = objc.registerName("isReady"); late final _sel_addDependency_ = objc.registerName("addDependency:"); final _objc_msgSend_244 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeDependency_ = objc.registerName("removeDependency:"); late final _sel_dependencies = objc.registerName("dependencies"); enum NSOperationQueuePriority { NSOperationQueuePriorityVeryLow(-8), NSOperationQueuePriorityLow(-4), NSOperationQueuePriorityNormal(0), NSOperationQueuePriorityHigh(4), NSOperationQueuePriorityVeryHigh(8); final int value; const NSOperationQueuePriority(this.value); static NSOperationQueuePriority fromValue(int value) => switch (value) { -8 => NSOperationQueuePriorityVeryLow, -4 => NSOperationQueuePriorityLow, 0 => NSOperationQueuePriorityNormal, 4 => NSOperationQueuePriorityHigh, 8 => NSOperationQueuePriorityVeryHigh, _ => throw ArgumentError( "Unknown value for NSOperationQueuePriority: $value"), }; } late final _sel_queuePriority = objc.registerName("queuePriority"); final _objc_msgSend_245 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Long Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); final _objc_msgSend_246 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Long)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_completionBlock = objc.registerName("completionBlock"); late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); late final _sel_waitUntilFinished = objc.registerName("waitUntilFinished"); late final _sel_threadPriority = objc.registerName("threadPriority"); late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); enum NSQualityOfService { NSQualityOfServiceUserInteractive(33), NSQualityOfServiceUserInitiated(25), NSQualityOfServiceUtility(17), NSQualityOfServiceBackground(9), NSQualityOfServiceDefault(-1); final int value; const NSQualityOfService(this.value); static NSQualityOfService fromValue(int value) => switch (value) { 33 => NSQualityOfServiceUserInteractive, 25 => NSQualityOfServiceUserInitiated, 17 => NSQualityOfServiceUtility, 9 => NSQualityOfServiceBackground, -1 => NSQualityOfServiceDefault, _ => throw ArgumentError("Unknown value for NSQualityOfService: $value"), }; } late final _sel_qualityOfService = objc.registerName("qualityOfService"); final _objc_msgSend_247 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setQualityOfService_ = objc.registerName("setQualityOfService:"); final _objc_msgSend_248 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setName_ = objc.registerName("setName:"); late final _sel_addOperation_ = objc.registerName("addOperation:"); late final _sel_addOperations_waitUntilFinished_ = objc.registerName("addOperations:waitUntilFinished:"); final _objc_msgSend_249 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_addOperationWithBlock_ = objc.registerName("addOperationWithBlock:"); late final _sel_addBarrierBlock_ = objc.registerName("addBarrierBlock:"); late final _sel_maxConcurrentOperationCount = objc.registerName("maxConcurrentOperationCount"); final _objc_msgSend_250 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Long Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setMaxConcurrentOperationCount_ = objc.registerName("setMaxConcurrentOperationCount:"); final _objc_msgSend_251 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Long)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_isSuspended = objc.registerName("isSuspended"); late final _sel_setSuspended_ = objc.registerName("setSuspended:"); final class dispatch_queue_s extends ffi.Opaque {} late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); final _objc_msgSend_252 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); final _objc_msgSend_253 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); late final _sel_waitUntilAllOperationsAreFinished = objc.registerName("waitUntilAllOperationsAreFinished"); late final _sel_currentQueue = objc.registerName("currentQueue"); final _objc_msgSend_254 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_mainQueue = objc.registerName("mainQueue"); final _objc_msgSend_255 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_operations = objc.registerName("operations"); late final _sel_operationCount = objc.registerName("operationCount"); /// NSOrthography class NSOrthography extends objc.NSObject { NSOrthography._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSOrthography] that points to the same underlying object as [other]. NSOrthography.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSOrthography] that wraps the given raw object pointer. NSOrthography.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSOrthography]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); } /// dominantScript objc.NSString get dominantScript { final _ret = _objc_msgSend_11(this.pointer, _sel_dominantScript); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// languageMap objc.NSDictionary get languageMap { final _ret = _objc_msgSend_256(this.pointer, _sel_languageMap); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// initWithDominantScript:languageMap: NSOrthography initWithDominantScript_languageMap_( objc.NSString script, objc.NSDictionary map) { final _ret = _objc_msgSend_257(this.pointer, _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); return NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// initWithCoder: NSOrthography? initWithCoder_(objc.NSCoder coder) { final _ret = _objc_msgSend_145(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null : NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// languagesForScript: objc.NSArray? languagesForScript_(objc.NSString script) { final _ret = _objc_msgSend_183( this.pointer, _sel_languagesForScript_, script.pointer); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// dominantLanguageForScript: objc.NSString? dominantLanguageForScript_(objc.NSString script) { final _ret = _objc_msgSend_41( this.pointer, _sel_dominantLanguageForScript_, script.pointer); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// dominantLanguage objc.NSString get dominantLanguage { final _ret = _objc_msgSend_11(this.pointer, _sel_dominantLanguage); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// allScripts objc.NSArray get allScripts { final _ret = _objc_msgSend_32(this.pointer, _sel_allScripts); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// allLanguages objc.NSArray get allLanguages { final _ret = _objc_msgSend_32(this.pointer, _sel_allLanguages); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// defaultOrthographyForLanguage: static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { final _ret = _objc_msgSend_62(_class_NSOrthography, _sel_defaultOrthographyForLanguage_, language.pointer); return NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// orthographyWithDominantScript:languageMap: static NSOrthography orthographyWithDominantScript_languageMap_( objc.NSString script, objc.NSDictionary map) { final _ret = _objc_msgSend_257( _class_NSOrthography, _sel_orthographyWithDominantScript_languageMap_, script.pointer, map.pointer); return NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// init NSOrthography init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// new static NSOrthography new1() { final _ret = _objc_msgSend_19(_class_NSOrthography, _sel_new); return NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSOrthography, _sel_allocWithZone_, zone); return NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSOrthography alloc() { final _ret = _objc_msgSend_19(_class_NSOrthography, _sel_alloc); return NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSOrthography, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSOrthography, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSOrthography, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSOrthography, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSOrthography, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSOrthography = objc.getClass("NSOrthography"); late final _sel_dominantScript = objc.registerName("dominantScript"); late final _sel_languageMap = objc.registerName("languageMap"); final _objc_msgSend_256 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithDominantScript_languageMap_ = objc.registerName("initWithDominantScript:languageMap:"); final _objc_msgSend_257 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_languagesForScript_ = objc.registerName("languagesForScript:"); late final _sel_dominantLanguageForScript_ = objc.registerName("dominantLanguageForScript:"); late final _sel_dominantLanguage = objc.registerName("dominantLanguage"); late final _sel_allScripts = objc.registerName("allScripts"); late final _sel_allLanguages = objc.registerName("allLanguages"); late final _sel_defaultOrthographyForLanguage_ = objc.registerName("defaultOrthographyForLanguage:"); late final _sel_orthographyWithDominantScript_languageMap_ = objc.registerName("orthographyWithDominantScript:languageMap:"); /// NSPointerArray class NSPointerArray extends objc.NSObject { NSPointerArray._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSPointerArray] that points to the same underlying object as [other]. NSPointerArray.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSPointerArray] that wraps the given raw object pointer. NSPointerArray.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSPointerArray]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); } /// initWithOptions: NSPointerArray initWithOptions_(NSPointerFunctionsOptions options) { final _ret = _objc_msgSend_258(this.pointer, _sel_initWithOptions_, options.value); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// initWithPointerFunctions: NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { final _ret = _objc_msgSend_272( this.pointer, _sel_initWithPointerFunctions_, functions.pointer); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// pointerArrayWithOptions: static NSPointerArray pointerArrayWithOptions_( NSPointerFunctionsOptions options) { final _ret = _objc_msgSend_273( _class_NSPointerArray, _sel_pointerArrayWithOptions_, options.value); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// pointerArrayWithPointerFunctions: static NSPointerArray pointerArrayWithPointerFunctions_( NSPointerFunctions functions) { final _ret = _objc_msgSend_274(_class_NSPointerArray, _sel_pointerArrayWithPointerFunctions_, functions.pointer); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// pointerFunctions NSPointerFunctions get pointerFunctions { final _ret = _objc_msgSend_275(this.pointer, _sel_pointerFunctions); return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); } /// pointerAtIndex: ffi.Pointer pointerAtIndex_(int index) { return _objc_msgSend_276(this.pointer, _sel_pointerAtIndex_, index); } /// addPointer: void addPointer_(ffi.Pointer pointer) { _objc_msgSend_277(this.pointer, _sel_addPointer_, pointer); } /// removePointerAtIndex: void removePointerAtIndex_(int index) { _objc_msgSend_278(this.pointer, _sel_removePointerAtIndex_, index); } /// insertPointer:atIndex: void insertPointer_atIndex_(ffi.Pointer item, int index) { _objc_msgSend_279(this.pointer, _sel_insertPointer_atIndex_, item, index); } /// replacePointerAtIndex:withPointer: void replacePointerAtIndex_withPointer_( int index, ffi.Pointer item) { _objc_msgSend_280( this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); } /// compact void compact() { _objc_msgSend_7(this.pointer, _sel_compact); } /// count int get count { return _objc_msgSend_56(this.pointer, _sel_count); } /// setCount: set count(int value) { return _objc_msgSend_100(this.pointer, _sel_setCount_, value); } /// strongObjectsPointerArray static NSPointerArray strongObjectsPointerArray() { final _ret = _objc_msgSend_281( _class_NSPointerArray, _sel_strongObjectsPointerArray); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// weakObjectsPointerArray static NSPointerArray weakObjectsPointerArray() { final _ret = _objc_msgSend_281(_class_NSPointerArray, _sel_weakObjectsPointerArray); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// allObjects objc.NSArray get allObjects { final _ret = _objc_msgSend_32(this.pointer, _sel_allObjects); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// init NSPointerArray init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// new static NSPointerArray new1() { final _ret = _objc_msgSend_19(_class_NSPointerArray, _sel_new); return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSPointerArray, _sel_allocWithZone_, zone); return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSPointerArray alloc() { final _ret = _objc_msgSend_19(_class_NSPointerArray, _sel_alloc); return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSPointerArray, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSPointerArray, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSPointerArray, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSPointerArray, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSPointerArray = objc.getClass("NSPointerArray"); enum NSPointerFunctionsOptions { NSPointerFunctionsStrongMemory(0), NSPointerFunctionsZeroingWeakMemory(1), NSPointerFunctionsOpaqueMemory(2), NSPointerFunctionsMallocMemory(3), NSPointerFunctionsMachVirtualMemory(4), NSPointerFunctionsWeakMemory(5), NSPointerFunctionsOpaquePersonality(256), NSPointerFunctionsObjectPointerPersonality(512), NSPointerFunctionsCStringPersonality(768), NSPointerFunctionsStructPersonality(1024), NSPointerFunctionsIntegerPersonality(1280), NSPointerFunctionsCopyIn(65536); static const NSPointerFunctionsObjectPersonality = NSPointerFunctionsStrongMemory; final int value; const NSPointerFunctionsOptions(this.value); static NSPointerFunctionsOptions fromValue(int value) => switch (value) { 0 => NSPointerFunctionsStrongMemory, 1 => NSPointerFunctionsZeroingWeakMemory, 2 => NSPointerFunctionsOpaqueMemory, 3 => NSPointerFunctionsMallocMemory, 4 => NSPointerFunctionsMachVirtualMemory, 5 => NSPointerFunctionsWeakMemory, 256 => NSPointerFunctionsOpaquePersonality, 512 => NSPointerFunctionsObjectPointerPersonality, 768 => NSPointerFunctionsCStringPersonality, 1024 => NSPointerFunctionsStructPersonality, 1280 => NSPointerFunctionsIntegerPersonality, 65536 => NSPointerFunctionsCopyIn, _ => throw ArgumentError( "Unknown value for NSPointerFunctionsOptions: $value"), }; @override String toString() { if (this == NSPointerFunctionsStrongMemory) return "NSPointerFunctionsOptions.NSPointerFunctionsStrongMemory, NSPointerFunctionsOptions.NSPointerFunctionsObjectPersonality"; return super.toString(); } } late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); final _objc_msgSend_258 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int)>(); /// NSPointerFunctions class NSPointerFunctions extends objc.NSObject { NSPointerFunctions._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSPointerFunctions] that points to the same underlying object as [other]. NSPointerFunctions.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSPointerFunctions] that wraps the given raw object pointer. NSPointerFunctions.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSPointerFunctions]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); } /// initWithOptions: NSPointerFunctions initWithOptions_(NSPointerFunctionsOptions options) { final _ret = _objc_msgSend_258(this.pointer, _sel_initWithOptions_, options.value); return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); } /// pointerFunctionsWithOptions: static NSPointerFunctions pointerFunctionsWithOptions_( NSPointerFunctionsOptions options) { final _ret = _objc_msgSend_259(_class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options.value); return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); } /// hashFunction ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>>)>> get hashFunction { return _objc_msgSend_260(this.pointer, _sel_hashFunction); } /// setHashFunction: set hashFunction( ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>> value) { return _objc_msgSend_261(this.pointer, _sel_setHashFunction_, value); } /// isEqualFunction ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>>)>> get isEqualFunction { return _objc_msgSend_262(this.pointer, _sel_isEqualFunction); } /// setIsEqualFunction: set isEqualFunction( ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>> value) { return _objc_msgSend_263(this.pointer, _sel_setIsEqualFunction_, value); } /// sizeFunction ffi.Pointer< ffi.NativeFunction)>> get sizeFunction { return _objc_msgSend_264(this.pointer, _sel_sizeFunction); } /// setSizeFunction: set sizeFunction( ffi.Pointer< ffi .NativeFunction)>> value) { return _objc_msgSend_265(this.pointer, _sel_setSizeFunction_, value); } /// descriptionFunction ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer)>> get descriptionFunction { return _objc_msgSend_266(this.pointer, _sel_descriptionFunction); } /// setDescriptionFunction: set descriptionFunction( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer)>> value) { return _objc_msgSend_267(this.pointer, _sel_setDescriptionFunction_, value); } /// relinquishFunction ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>>)>> get relinquishFunction { return _objc_msgSend_268(this.pointer, _sel_relinquishFunction); } /// setRelinquishFunction: set relinquishFunction( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>> value) { return _objc_msgSend_269(this.pointer, _sel_setRelinquishFunction_, value); } /// acquireFunction ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>>, ffi.Bool)>> get acquireFunction { return _objc_msgSend_270(this.pointer, _sel_acquireFunction); } /// setAcquireFunction: set acquireFunction( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>, ffi.Bool)>> value) { return _objc_msgSend_271(this.pointer, _sel_setAcquireFunction_, value); } /// usesStrongWriteBarrier bool get usesStrongWriteBarrier { return _objc_msgSend_13(this.pointer, _sel_usesStrongWriteBarrier); } /// setUsesStrongWriteBarrier: set usesStrongWriteBarrier(bool value) { return _objc_msgSend_14( this.pointer, _sel_setUsesStrongWriteBarrier_, value); } /// usesWeakReadAndWriteBarriers bool get usesWeakReadAndWriteBarriers { return _objc_msgSend_13(this.pointer, _sel_usesWeakReadAndWriteBarriers); } /// setUsesWeakReadAndWriteBarriers: set usesWeakReadAndWriteBarriers(bool value) { return _objc_msgSend_14( this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); } /// init NSPointerFunctions init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); } /// new static NSPointerFunctions new1() { final _ret = _objc_msgSend_19(_class_NSPointerFunctions, _sel_new); return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSPointerFunctions, _sel_allocWithZone_, zone); return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSPointerFunctions alloc() { final _ret = _objc_msgSend_19(_class_NSPointerFunctions, _sel_alloc); return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSPointerFunctions, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSPointerFunctions, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSPointerFunctions, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); late final _sel_pointerFunctionsWithOptions_ = objc.registerName("pointerFunctionsWithOptions:"); final _objc_msgSend_259 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_hashFunction = objc.registerName("hashFunction"); final _objc_msgSend_260 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer, ffi.Pointer)>>)>> Function( ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>> Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setHashFunction_ = objc.registerName("setHashFunction:"); final _objc_msgSend_261 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>>)>(); late final _sel_isEqualFunction = objc.registerName("isEqualFunction"); final _objc_msgSend_262 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer, ffi.Pointer, ffi.Pointer)>>)>> Function( ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>> Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setIsEqualFunction_ = objc.registerName("setIsEqualFunction:"); final _objc_msgSend_263 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>>)>>)>(); late final _sel_sizeFunction = objc.registerName("sizeFunction"); final _objc_msgSend_264 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer)>> Function( ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>> Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setSizeFunction_ = objc.registerName("setSizeFunction:"); final _objc_msgSend_265 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer)>>)>(); late final _sel_descriptionFunction = objc.registerName("descriptionFunction"); final _objc_msgSend_266 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer)>> Function( ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer)>> Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setDescriptionFunction_ = objc.registerName("setDescriptionFunction:"); final _objc_msgSend_267 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer)>>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer)>>)>(); late final _sel_relinquishFunction = objc.registerName("relinquishFunction"); final _objc_msgSend_268 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer, ffi.Pointer)>>)>> Function( ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>> Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setRelinquishFunction_ = objc.registerName("setRelinquishFunction:"); final _objc_msgSend_269 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>)>>)>(); late final _sel_acquireFunction = objc.registerName("acquireFunction"); final _objc_msgSend_270 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>, ffi.Bool)>> Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setAcquireFunction_ = objc.registerName("setAcquireFunction:"); final _objc_msgSend_271 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer)>>, ffi.Bool)>>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer< ffi .NativeFunction)>>, ffi.Bool)>>)>(); late final _sel_usesStrongWriteBarrier = objc.registerName("usesStrongWriteBarrier"); late final _sel_setUsesStrongWriteBarrier_ = objc.registerName("setUsesStrongWriteBarrier:"); late final _sel_usesWeakReadAndWriteBarriers = objc.registerName("usesWeakReadAndWriteBarriers"); late final _sel_setUsesWeakReadAndWriteBarriers_ = objc.registerName("setUsesWeakReadAndWriteBarriers:"); late final _sel_initWithPointerFunctions_ = objc.registerName("initWithPointerFunctions:"); final _objc_msgSend_272 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pointerArrayWithOptions_ = objc.registerName("pointerArrayWithOptions:"); final _objc_msgSend_273 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_pointerArrayWithPointerFunctions_ = objc.registerName("pointerArrayWithPointerFunctions:"); final _objc_msgSend_274 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); final _objc_msgSend_275 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); final _objc_msgSend_276 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_addPointer_ = objc.registerName("addPointer:"); final _objc_msgSend_277 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removePointerAtIndex_ = objc.registerName("removePointerAtIndex:"); final _objc_msgSend_278 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_insertPointer_atIndex_ = objc.registerName("insertPointer:atIndex:"); final _objc_msgSend_279 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_replacePointerAtIndex_withPointer_ = objc.registerName("replacePointerAtIndex:withPointer:"); final _objc_msgSend_280 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_compact = objc.registerName("compact"); late final _sel_count = objc.registerName("count"); late final _sel_setCount_ = objc.registerName("setCount:"); late final _sel_strongObjectsPointerArray = objc.registerName("strongObjectsPointerArray"); final _objc_msgSend_281 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_weakObjectsPointerArray = objc.registerName("weakObjectsPointerArray"); late final _sel_allObjects = objc.registerName("allObjects"); /// NSProcessInfo class NSProcessInfo extends objc.NSObject { NSProcessInfo._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSProcessInfo] that points to the same underlying object as [other]. NSProcessInfo.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSProcessInfo] that wraps the given raw object pointer. NSProcessInfo.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSProcessInfo]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); } /// processInfo static NSProcessInfo getProcessInfo() { final _ret = _objc_msgSend_282(_class_NSProcessInfo, _sel_processInfo); return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } /// environment objc.NSDictionary get environment { final _ret = _objc_msgSend_256(this.pointer, _sel_environment); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// arguments objc.NSArray get arguments { final _ret = _objc_msgSend_32(this.pointer, _sel_arguments); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// hostName objc.NSString get hostName { final _ret = _objc_msgSend_11(this.pointer, _sel_hostName); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// processName objc.NSString get processName { final _ret = _objc_msgSend_11(this.pointer, _sel_processName); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setProcessName: set processName(objc.NSString value) { return _objc_msgSend_12(this.pointer, _sel_setProcessName_, value.pointer); } /// processIdentifier int get processIdentifier { return _objc_msgSend_157(this.pointer, _sel_processIdentifier); } /// globallyUniqueString objc.NSString get globallyUniqueString { final _ret = _objc_msgSend_11(this.pointer, _sel_globallyUniqueString); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystem int operatingSystem() { return _objc_msgSend_56(this.pointer, _sel_operatingSystem); } /// operatingSystemName objc.NSString operatingSystemName() { final _ret = _objc_msgSend_11(this.pointer, _sel_operatingSystemName); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystemVersionString objc.NSString get operatingSystemVersionString { final _ret = _objc_msgSend_11(this.pointer, _sel_operatingSystemVersionString); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystemVersion void getOperatingSystemVersion(ffi.Pointer stret) { objc.useMsgSendVariants ? _objc_msgSend_283Stret( stret, this.pointer, _sel_operatingSystemVersion) : stret.ref = _objc_msgSend_283(this.pointer, _sel_operatingSystemVersion); } /// processorCount int get processorCount { return _objc_msgSend_56(this.pointer, _sel_processorCount); } /// activeProcessorCount int get activeProcessorCount { return _objc_msgSend_56(this.pointer, _sel_activeProcessorCount); } /// physicalMemory int get physicalMemory { return _objc_msgSend_160(this.pointer, _sel_physicalMemory); } /// isOperatingSystemAtLeastVersion: bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { return _objc_msgSend_284( this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); } /// systemUptime double get systemUptime { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_systemUptime) : _objc_msgSend_18(this.pointer, _sel_systemUptime); } /// disableSuddenTermination void disableSuddenTermination() { _objc_msgSend_7(this.pointer, _sel_disableSuddenTermination); } /// enableSuddenTermination void enableSuddenTermination() { _objc_msgSend_7(this.pointer, _sel_enableSuddenTermination); } /// disableAutomaticTermination: void disableAutomaticTermination_(objc.NSString reason) { _objc_msgSend_285( this.pointer, _sel_disableAutomaticTermination_, reason.pointer); } /// enableAutomaticTermination: void enableAutomaticTermination_(objc.NSString reason) { _objc_msgSend_285( this.pointer, _sel_enableAutomaticTermination_, reason.pointer); } /// automaticTerminationSupportEnabled bool get automaticTerminationSupportEnabled { return _objc_msgSend_13( this.pointer, _sel_automaticTerminationSupportEnabled); } /// setAutomaticTerminationSupportEnabled: set automaticTerminationSupportEnabled(bool value) { return _objc_msgSend_14( this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); } /// beginActivityWithOptions:reason: objc.ObjCObjectBase beginActivityWithOptions_reason_( NSActivityOptions options, objc.NSString reason) { final _ret = _objc_msgSend_286(this.pointer, _sel_beginActivityWithOptions_reason_, options.value, reason.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// endActivity: void endActivity_(objc.ObjCObjectBase activity) { _objc_msgSend_27(this.pointer, _sel_endActivity_, activity.pointer); } /// performActivityWithOptions:reason:usingBlock: void performActivityWithOptions_reason_usingBlock_(NSActivityOptions options, objc.NSString reason, ObjCBlock_ffiVoid block) { _objc_msgSend_287( this.pointer, _sel_performActivityWithOptions_reason_usingBlock_, options.value, reason.pointer, block.pointer); } /// performExpiringActivityWithReason:usingBlock: void performExpiringActivityWithReason_usingBlock_( objc.NSString reason, ObjCBlock_ffiVoid_bool block) { _objc_msgSend_288( this.pointer, _sel_performExpiringActivityWithReason_usingBlock_, reason.pointer, block.pointer); } /// userName objc.NSString get userName { final _ret = _objc_msgSend_11(this.pointer, _sel_userName); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// fullUserName objc.NSString get fullUserName { final _ret = _objc_msgSend_11(this.pointer, _sel_fullUserName); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// thermalState NSProcessInfoThermalState get thermalState { final _ret = _objc_msgSend_289(this.pointer, _sel_thermalState); return NSProcessInfoThermalState.fromValue(_ret); } /// isLowPowerModeEnabled bool get lowPowerModeEnabled { return _objc_msgSend_13(this.pointer, _sel_isLowPowerModeEnabled); } /// isMacCatalystApp bool get macCatalystApp { return _objc_msgSend_13(this.pointer, _sel_isMacCatalystApp); } /// isiOSAppOnMac bool get iOSAppOnMac { return _objc_msgSend_13(this.pointer, _sel_isiOSAppOnMac); } /// init NSProcessInfo init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } /// new static NSProcessInfo new1() { final _ret = _objc_msgSend_19(_class_NSProcessInfo, _sel_new); return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSProcessInfo, _sel_allocWithZone_, zone); return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSProcessInfo alloc() { final _ret = _objc_msgSend_19(_class_NSProcessInfo, _sel_alloc); return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSProcessInfo, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSProcessInfo, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSProcessInfo, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); late final _sel_processInfo = objc.registerName("processInfo"); final _objc_msgSend_282 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_environment = objc.registerName("environment"); late final _sel_arguments = objc.registerName("arguments"); late final _sel_hostName = objc.registerName("hostName"); late final _sel_processName = objc.registerName("processName"); late final _sel_setProcessName_ = objc.registerName("setProcessName:"); late final _sel_processIdentifier = objc.registerName("processIdentifier"); late final _sel_globallyUniqueString = objc.registerName("globallyUniqueString"); late final _sel_operatingSystem = objc.registerName("operatingSystem"); late final _sel_operatingSystemName = objc.registerName("operatingSystemName"); late final _sel_operatingSystemVersionString = objc.registerName("operatingSystemVersionString"); final class NSOperatingSystemVersion extends ffi.Struct { @ffi.Long() external int majorVersion; @ffi.Long() external int minorVersion; @ffi.Long() external int patchVersion; } late final _sel_operatingSystemVersion = objc.registerName("operatingSystemVersion"); final _objc_msgSend_283 = objc.msgSendPointer .cast< ffi.NativeFunction< NSOperatingSystemVersion Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< NSOperatingSystemVersion Function( ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_283Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_processorCount = objc.registerName("processorCount"); late final _sel_activeProcessorCount = objc.registerName("activeProcessorCount"); late final _sel_physicalMemory = objc.registerName("physicalMemory"); late final _sel_isOperatingSystemAtLeastVersion_ = objc.registerName("isOperatingSystemAtLeastVersion:"); final _objc_msgSend_284 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, NSOperatingSystemVersion)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, NSOperatingSystemVersion)>(); late final _sel_systemUptime = objc.registerName("systemUptime"); late final _sel_disableSuddenTermination = objc.registerName("disableSuddenTermination"); late final _sel_enableSuddenTermination = objc.registerName("enableSuddenTermination"); late final _sel_disableAutomaticTermination_ = objc.registerName("disableAutomaticTermination:"); final _objc_msgSend_285 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_enableAutomaticTermination_ = objc.registerName("enableAutomaticTermination:"); late final _sel_automaticTerminationSupportEnabled = objc.registerName("automaticTerminationSupportEnabled"); late final _sel_setAutomaticTerminationSupportEnabled_ = objc.registerName("setAutomaticTerminationSupportEnabled:"); enum NSActivityOptions { NSActivityIdleDisplaySleepDisabled(1099511627776), NSActivityIdleSystemSleepDisabled(1048576), NSActivitySuddenTerminationDisabled(16384), NSActivityAutomaticTerminationDisabled(32768), NSActivityAnimationTrackingEnabled(35184372088832), NSActivityTrackingEnabled(70368744177664), NSActivityUserInitiated(16777215), NSActivityUserInitiatedAllowingIdleSystemSleep(15728639), NSActivityBackground(255), NSActivityLatencyCritical(1095216660480), NSActivityUserInteractive(1095233437695); final int value; const NSActivityOptions(this.value); static NSActivityOptions fromValue(int value) => switch (value) { 1099511627776 => NSActivityIdleDisplaySleepDisabled, 1048576 => NSActivityIdleSystemSleepDisabled, 16384 => NSActivitySuddenTerminationDisabled, 32768 => NSActivityAutomaticTerminationDisabled, 35184372088832 => NSActivityAnimationTrackingEnabled, 70368744177664 => NSActivityTrackingEnabled, 16777215 => NSActivityUserInitiated, 15728639 => NSActivityUserInitiatedAllowingIdleSystemSleep, 255 => NSActivityBackground, 1095216660480 => NSActivityLatencyCritical, 1095233437695 => NSActivityUserInteractive, _ => throw ArgumentError("Unknown value for NSActivityOptions: $value"), }; } late final _sel_beginActivityWithOptions_reason_ = objc.registerName("beginActivityWithOptions:reason:"); final _objc_msgSend_286 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Uint64, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_endActivity_ = objc.registerName("endActivity:"); late final _sel_performActivityWithOptions_reason_usingBlock_ = objc.registerName("performActivityWithOptions:reason:usingBlock:"); final _objc_msgSend_287 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Uint64, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( ffi.Pointer block, bool arg0) => block.ref.target .cast>() .asFunction()(arg0); void _ObjCBlock_ffiVoid_bool_closureTrampoline( ffi.Pointer block, bool arg0) => (objc.getBlockClosure(block) as void Function(bool))(arg0); class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_bool._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_bool castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_bool._(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. ObjCBlock_ffiVoid_bool.fromFunctionPointer( ffi.Pointer> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_bool.fromFunction(void Function(bool) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) .cast(), (bool arg0) => fn(arg0))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_bool.listener(void Function(bool) fn) : this._((objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Bool)>.listener( _ObjCBlock_ffiVoid_bool_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (bool arg0) => fn(arg0)))); static ffi .NativeCallable, ffi.Bool)>? _dartFuncListenerTrampoline; void call(bool arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Bool arg0)>>() .asFunction, bool)>()( pointer, arg0); } late final _sel_performExpiringActivityWithReason_usingBlock_ = objc.registerName("performExpiringActivityWithReason:usingBlock:"); final _objc_msgSend_288 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_userName = objc.registerName("userName"); late final _sel_fullUserName = objc.registerName("fullUserName"); enum NSProcessInfoThermalState { NSProcessInfoThermalStateNominal(0), NSProcessInfoThermalStateFair(1), NSProcessInfoThermalStateSerious(2), NSProcessInfoThermalStateCritical(3); final int value; const NSProcessInfoThermalState(this.value); static NSProcessInfoThermalState fromValue(int value) => switch (value) { 0 => NSProcessInfoThermalStateNominal, 1 => NSProcessInfoThermalStateFair, 2 => NSProcessInfoThermalStateSerious, 3 => NSProcessInfoThermalStateCritical, _ => throw ArgumentError( "Unknown value for NSProcessInfoThermalState: $value"), }; } late final _sel_thermalState = objc.registerName("thermalState"); final _objc_msgSend_289 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_isLowPowerModeEnabled = objc.registerName("isLowPowerModeEnabled"); late final _sel_isMacCatalystApp = objc.registerName("isMacCatalystApp"); late final _sel_isiOSAppOnMac = objc.registerName("isiOSAppOnMac"); /// NSTextCheckingResult class NSTextCheckingResult extends objc.NSObject { NSTextCheckingResult._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSTextCheckingResult] that points to the same underlying object as [other]. NSTextCheckingResult.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSTextCheckingResult] that wraps the given raw object pointer. NSTextCheckingResult.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSTextCheckingResult]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); } /// resultType NSTextCheckingType get resultType { final _ret = _objc_msgSend_290(this.pointer, _sel_resultType); return NSTextCheckingType.fromValue(_ret); } /// range void getRange(ffi.Pointer<_NSRange> stret) { objc.useMsgSendVariants ? _objc_msgSend_291Stret(stret, this.pointer, _sel_range) : stret.ref = _objc_msgSend_291(this.pointer, _sel_range); } /// orthography NSOrthography? get orthography { final _ret = _objc_msgSend_292(this.pointer, _sel_orthography); return _ret.address == 0 ? null : NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// grammarDetails objc.NSArray? get grammarDetails { final _ret = _objc_msgSend_87(this.pointer, _sel_grammarDetails); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// date objc.NSDate? get date { final _ret = _objc_msgSend_206(this.pointer, _sel_date); return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// timeZone NSTimeZone? get timeZone { final _ret = _objc_msgSend_305(this.pointer, _sel_timeZone); return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// duration double get duration { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_duration) : _objc_msgSend_18(this.pointer, _sel_duration); } /// components objc.NSDictionary? get components { final _ret = _objc_msgSend_83(this.pointer, _sel_components); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_24(this.pointer, _sel_URL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// replacementString objc.NSString? get replacementString { final _ret = _objc_msgSend_20(this.pointer, _sel_replacementString); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// alternativeStrings objc.NSArray? get alternativeStrings { final _ret = _objc_msgSend_87(this.pointer, _sel_alternativeStrings); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// regularExpression NSRegularExpression? get regularExpression { final _ret = _objc_msgSend_317(this.pointer, _sel_regularExpression); return _ret.address == 0 ? null : NSRegularExpression.castFromPointer(_ret, retain: true, release: true); } /// phoneNumber objc.NSString? get phoneNumber { final _ret = _objc_msgSend_20(this.pointer, _sel_phoneNumber); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// numberOfRanges int get numberOfRanges { return _objc_msgSend_56(this.pointer, _sel_numberOfRanges); } /// rangeAtIndex: void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { objc.useMsgSendVariants ? _objc_msgSend_318Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) : stret.ref = _objc_msgSend_318(this.pointer, _sel_rangeAtIndex_, idx); } /// rangeWithName: void rangeWithName_(ffi.Pointer<_NSRange> stret, objc.NSString name) { objc.useMsgSendVariants ? _objc_msgSend_319Stret( stret, this.pointer, _sel_rangeWithName_, name.pointer) : stret.ref = _objc_msgSend_319(this.pointer, _sel_rangeWithName_, name.pointer); } /// resultByAdjustingRangesWithOffset: NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { final _ret = _objc_msgSend_320( this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// addressComponents objc.NSDictionary? get addressComponents { final _ret = _objc_msgSend_83(this.pointer, _sel_addressComponents); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// orthographyCheckingResultWithRange:orthography: static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( _NSRange range, NSOrthography orthography) { final _ret = _objc_msgSend_321( _class_NSTextCheckingResult, _sel_orthographyCheckingResultWithRange_orthography_, range, orthography.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// spellCheckingResultWithRange: static NSTextCheckingResult spellCheckingResultWithRange_(_NSRange range) { final _ret = _objc_msgSend_322( _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// grammarCheckingResultWithRange:details: static NSTextCheckingResult grammarCheckingResultWithRange_details_( _NSRange range, objc.NSArray details) { final _ret = _objc_msgSend_323(_class_NSTextCheckingResult, _sel_grammarCheckingResultWithRange_details_, range, details.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// dateCheckingResultWithRange:date: static NSTextCheckingResult dateCheckingResultWithRange_date_( _NSRange range, objc.NSDate date) { final _ret = _objc_msgSend_324(_class_NSTextCheckingResult, _sel_dateCheckingResultWithRange_date_, range, date.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// dateCheckingResultWithRange:date:timeZone:duration: static NSTextCheckingResult dateCheckingResultWithRange_date_timeZone_duration_(_NSRange range, objc.NSDate date, NSTimeZone timeZone, double duration) { final _ret = _objc_msgSend_325( _class_NSTextCheckingResult, _sel_dateCheckingResultWithRange_date_timeZone_duration_, range, date.pointer, timeZone.pointer, duration); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// addressCheckingResultWithRange:components: static NSTextCheckingResult addressCheckingResultWithRange_components_( _NSRange range, objc.NSDictionary components) { final _ret = _objc_msgSend_326( _class_NSTextCheckingResult, _sel_addressCheckingResultWithRange_components_, range, components.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// linkCheckingResultWithRange:URL: static NSTextCheckingResult linkCheckingResultWithRange_URL_( _NSRange range, objc.NSURL url) { final _ret = _objc_msgSend_327(_class_NSTextCheckingResult, _sel_linkCheckingResultWithRange_URL_, range, url.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// quoteCheckingResultWithRange:replacementString: static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( _NSRange range, objc.NSString replacementString) { final _ret = _objc_msgSend_328( _class_NSTextCheckingResult, _sel_quoteCheckingResultWithRange_replacementString_, range, replacementString.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// dashCheckingResultWithRange:replacementString: static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( _NSRange range, objc.NSString replacementString) { final _ret = _objc_msgSend_328( _class_NSTextCheckingResult, _sel_dashCheckingResultWithRange_replacementString_, range, replacementString.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// replacementCheckingResultWithRange:replacementString: static NSTextCheckingResult replacementCheckingResultWithRange_replacementString_( _NSRange range, objc.NSString replacementString) { final _ret = _objc_msgSend_328( _class_NSTextCheckingResult, _sel_replacementCheckingResultWithRange_replacementString_, range, replacementString.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// correctionCheckingResultWithRange:replacementString: static NSTextCheckingResult correctionCheckingResultWithRange_replacementString_( _NSRange range, objc.NSString replacementString) { final _ret = _objc_msgSend_328( _class_NSTextCheckingResult, _sel_correctionCheckingResultWithRange_replacementString_, range, replacementString.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// correctionCheckingResultWithRange:replacementString:alternativeStrings: static NSTextCheckingResult correctionCheckingResultWithRange_replacementString_alternativeStrings_( _NSRange range, objc.NSString replacementString, objc.NSArray alternativeStrings) { final _ret = _objc_msgSend_329( _class_NSTextCheckingResult, _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, range, replacementString.pointer, alternativeStrings.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// regularExpressionCheckingResultWithRanges:count:regularExpression: static NSTextCheckingResult regularExpressionCheckingResultWithRanges_count_regularExpression_( ffi.Pointer<_NSRange> ranges, int count, NSRegularExpression regularExpression) { final _ret = _objc_msgSend_330( _class_NSTextCheckingResult, _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, ranges, count, regularExpression.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// phoneNumberCheckingResultWithRange:phoneNumber: static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( _NSRange range, objc.NSString phoneNumber) { final _ret = _objc_msgSend_328( _class_NSTextCheckingResult, _sel_phoneNumberCheckingResultWithRange_phoneNumber_, range, phoneNumber.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// transitInformationCheckingResultWithRange:components: static NSTextCheckingResult transitInformationCheckingResultWithRange_components_( _NSRange range, objc.NSDictionary components) { final _ret = _objc_msgSend_326( _class_NSTextCheckingResult, _sel_transitInformationCheckingResultWithRange_components_, range, components.pointer); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// init NSTextCheckingResult init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// new static NSTextCheckingResult new1() { final _ret = _objc_msgSend_19(_class_NSTextCheckingResult, _sel_new); return NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28( _class_NSTextCheckingResult, _sel_allocWithZone_, zone); return NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSTextCheckingResult alloc() { final _ret = _objc_msgSend_19(_class_NSTextCheckingResult, _sel_alloc); return NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13( _class_NSTextCheckingResult, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSTextCheckingResult, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSTextCheckingResult, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); enum NSTextCheckingType { NSTextCheckingTypeOrthography(1), NSTextCheckingTypeSpelling(2), NSTextCheckingTypeGrammar(4), NSTextCheckingTypeDate(8), NSTextCheckingTypeAddress(16), NSTextCheckingTypeLink(32), NSTextCheckingTypeQuote(64), NSTextCheckingTypeDash(128), NSTextCheckingTypeReplacement(256), NSTextCheckingTypeCorrection(512), NSTextCheckingTypeRegularExpression(1024), NSTextCheckingTypePhoneNumber(2048), NSTextCheckingTypeTransitInformation(4096); final int value; const NSTextCheckingType(this.value); static NSTextCheckingType fromValue(int value) => switch (value) { 1 => NSTextCheckingTypeOrthography, 2 => NSTextCheckingTypeSpelling, 4 => NSTextCheckingTypeGrammar, 8 => NSTextCheckingTypeDate, 16 => NSTextCheckingTypeAddress, 32 => NSTextCheckingTypeLink, 64 => NSTextCheckingTypeQuote, 128 => NSTextCheckingTypeDash, 256 => NSTextCheckingTypeReplacement, 512 => NSTextCheckingTypeCorrection, 1024 => NSTextCheckingTypeRegularExpression, 2048 => NSTextCheckingTypePhoneNumber, 4096 => NSTextCheckingTypeTransitInformation, _ => throw ArgumentError("Unknown value for NSTextCheckingType: $value"), }; } late final _sel_resultType = objc.registerName("resultType"); final _objc_msgSend_290 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Uint64 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_range = objc.registerName("range"); final _objc_msgSend_291 = objc.msgSendPointer .cast< ffi.NativeFunction< _NSRange Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< _NSRange Function( ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_291Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer)>(); late final _sel_orthography = objc.registerName("orthography"); final _objc_msgSend_292 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_grammarDetails = objc.registerName("grammarDetails"); late final _sel_date = objc.registerName("date"); /// NSTimeZone class NSTimeZone extends objc.NSObject { NSTimeZone._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSTimeZone] that points to the same underlying object as [other]. NSTimeZone.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSTimeZone] that wraps the given raw object pointer. NSTimeZone.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSTimeZone]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimeZone); } /// name objc.NSString get name { final _ret = _objc_msgSend_11(this.pointer, _sel_name); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// data objc.NSData get data { final _ret = _objc_msgSend_143(this.pointer, _sel_data); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// secondsFromGMTForDate: int secondsFromGMTForDate_(objc.NSDate aDate) { return _objc_msgSend_293( this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); } /// abbreviationForDate: objc.NSString? abbreviationForDate_(objc.NSDate aDate) { final _ret = _objc_msgSend_294( this.pointer, _sel_abbreviationForDate_, aDate.pointer); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// isDaylightSavingTimeForDate: bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { return _objc_msgSend_295( this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); } /// daylightSavingTimeOffsetForDate: double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { return objc.useMsgSendVariants ? _objc_msgSend_296Fpret( this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) : _objc_msgSend_296( this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); } /// nextDaylightSavingTimeTransitionAfterDate: objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { final _ret = _objc_msgSend_297(this.pointer, _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// systemTimeZone static NSTimeZone getSystemTimeZone() { final _ret = _objc_msgSend_298(_class_NSTimeZone, _sel_systemTimeZone); return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// resetSystemTimeZone static void resetSystemTimeZone() { _objc_msgSend_7(_class_NSTimeZone, _sel_resetSystemTimeZone); } /// defaultTimeZone static NSTimeZone getDefaultTimeZone() { final _ret = _objc_msgSend_298(_class_NSTimeZone, _sel_defaultTimeZone); return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// setDefaultTimeZone: static void setDefaultTimeZone(NSTimeZone value) { return _objc_msgSend_299( _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); } /// localTimeZone static NSTimeZone getLocalTimeZone() { final _ret = _objc_msgSend_298(_class_NSTimeZone, _sel_localTimeZone); return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// knownTimeZoneNames static objc.NSArray getKnownTimeZoneNames() { final _ret = _objc_msgSend_32(_class_NSTimeZone, _sel_knownTimeZoneNames); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// abbreviationDictionary static objc.NSDictionary getAbbreviationDictionary() { final _ret = _objc_msgSend_256(_class_NSTimeZone, _sel_abbreviationDictionary); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setAbbreviationDictionary: static void setAbbreviationDictionary(objc.NSDictionary value) { return _objc_msgSend_300( _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); } /// timeZoneDataVersion static objc.NSString getTimeZoneDataVersion() { final _ret = _objc_msgSend_11(_class_NSTimeZone, _sel_timeZoneDataVersion); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// secondsFromGMT int get secondsFromGMT { return _objc_msgSend_250(this.pointer, _sel_secondsFromGMT); } /// abbreviation objc.NSString? get abbreviation { final _ret = _objc_msgSend_20(this.pointer, _sel_abbreviation); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// isDaylightSavingTime bool get daylightSavingTime { return _objc_msgSend_13(this.pointer, _sel_isDaylightSavingTime); } /// daylightSavingTimeOffset double get daylightSavingTimeOffset { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_daylightSavingTimeOffset) : _objc_msgSend_18(this.pointer, _sel_daylightSavingTimeOffset); } /// nextDaylightSavingTimeTransition objc.NSDate? get nextDaylightSavingTimeTransition { final _ret = _objc_msgSend_206(this.pointer, _sel_nextDaylightSavingTimeTransition); return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// description objc.NSString get description { final _ret = _objc_msgSend_11(this.pointer, _sel_description); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// isEqualToTimeZone: bool isEqualToTimeZone_(NSTimeZone aTimeZone) { return _objc_msgSend_301( this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); } /// localizedName:locale: objc.NSString? localizedName_locale_( NSTimeZoneNameStyle style, objc.NSLocale? locale) { final _ret = _objc_msgSend_302(this.pointer, _sel_localizedName_locale_, style.value, locale?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// timeZoneWithName: static NSTimeZone? timeZoneWithName_(objc.NSString tzName) { final _ret = _objc_msgSend_34( _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// timeZoneWithName:data: static NSTimeZone? timeZoneWithName_data_( objc.NSString tzName, objc.NSData? aData) { final _ret = _objc_msgSend_303( _class_NSTimeZone, _sel_timeZoneWithName_data_, tzName.pointer, aData?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// initWithName: NSTimeZone? initWithName_(objc.NSString tzName) { final _ret = _objc_msgSend_34(this.pointer, _sel_initWithName_, tzName.pointer); return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// initWithName:data: NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { final _ret = _objc_msgSend_303(this.pointer, _sel_initWithName_data_, tzName.pointer, aData?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// timeZoneForSecondsFromGMT: static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { final _ret = _objc_msgSend_304( _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// timeZoneWithAbbreviation: static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { final _ret = _objc_msgSend_34(_class_NSTimeZone, _sel_timeZoneWithAbbreviation_, abbreviation.pointer); return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// init NSTimeZone init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// new static NSTimeZone new1() { final _ret = _objc_msgSend_19(_class_NSTimeZone, _sel_new); return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSTimeZone, _sel_allocWithZone_, zone); return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSTimeZone alloc() { final _ret = _objc_msgSend_19(_class_NSTimeZone, _sel_alloc); return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSTimeZone, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSTimeZone, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSTimeZone, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSTimeZone, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSTimeZone, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSTimeZone, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSTimeZone = objc.getClass("NSTimeZone"); late final _sel_data = objc.registerName("data"); late final _sel_secondsFromGMTForDate_ = objc.registerName("secondsFromGMTForDate:"); final _objc_msgSend_293 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Long Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_abbreviationForDate_ = objc.registerName("abbreviationForDate:"); final _objc_msgSend_294 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isDaylightSavingTimeForDate_ = objc.registerName("isDaylightSavingTimeForDate:"); final _objc_msgSend_295 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_daylightSavingTimeOffsetForDate_ = objc.registerName("daylightSavingTimeOffsetForDate:"); final _objc_msgSend_296 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Double Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_296Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< ffi.Double Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); final _objc_msgSend_297 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); final _objc_msgSend_298 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); final _objc_msgSend_299 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_localTimeZone = objc.registerName("localTimeZone"); late final _sel_knownTimeZoneNames = objc.registerName("knownTimeZoneNames"); late final _sel_abbreviationDictionary = objc.registerName("abbreviationDictionary"); late final _sel_setAbbreviationDictionary_ = objc.registerName("setAbbreviationDictionary:"); final _objc_msgSend_300 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); late final _sel_abbreviation = objc.registerName("abbreviation"); late final _sel_isDaylightSavingTime = objc.registerName("isDaylightSavingTime"); late final _sel_daylightSavingTimeOffset = objc.registerName("daylightSavingTimeOffset"); late final _sel_nextDaylightSavingTimeTransition = objc.registerName("nextDaylightSavingTimeTransition"); late final _sel_description = objc.registerName("description"); late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); final _objc_msgSend_301 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); enum NSTimeZoneNameStyle { NSTimeZoneNameStyleStandard(0), NSTimeZoneNameStyleShortStandard(1), NSTimeZoneNameStyleDaylightSaving(2), NSTimeZoneNameStyleShortDaylightSaving(3), NSTimeZoneNameStyleGeneric(4), NSTimeZoneNameStyleShortGeneric(5); final int value; const NSTimeZoneNameStyle(this.value); static NSTimeZoneNameStyle fromValue(int value) => switch (value) { 0 => NSTimeZoneNameStyleStandard, 1 => NSTimeZoneNameStyleShortStandard, 2 => NSTimeZoneNameStyleDaylightSaving, 3 => NSTimeZoneNameStyleShortDaylightSaving, 4 => NSTimeZoneNameStyleGeneric, 5 => NSTimeZoneNameStyleShortGeneric, _ => throw ArgumentError("Unknown value for NSTimeZoneNameStyle: $value"), }; } late final _sel_localizedName_locale_ = objc.registerName("localizedName:locale:"); final _objc_msgSend_302 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); late final _sel_timeZoneWithName_data_ = objc.registerName("timeZoneWithName:data:"); final _objc_msgSend_303 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithName_ = objc.registerName("initWithName:"); late final _sel_initWithName_data_ = objc.registerName("initWithName:data:"); late final _sel_timeZoneForSecondsFromGMT_ = objc.registerName("timeZoneForSecondsFromGMT:"); final _objc_msgSend_304 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Long)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_timeZoneWithAbbreviation_ = objc.registerName("timeZoneWithAbbreviation:"); late final _sel_timeZone = objc.registerName("timeZone"); final _objc_msgSend_305 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_duration = objc.registerName("duration"); late final _sel_components = objc.registerName("components"); late final _sel_URL = objc.registerName("URL"); late final _sel_replacementString = objc.registerName("replacementString"); late final _sel_alternativeStrings = objc.registerName("alternativeStrings"); /// NSRegularExpression class NSRegularExpression extends objc.NSObject { NSRegularExpression._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSRegularExpression] that points to the same underlying object as [other]. NSRegularExpression.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSRegularExpression] that wraps the given raw object pointer. NSRegularExpression.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSRegularExpression]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); } /// regularExpressionWithPattern:options:error: static NSRegularExpression? regularExpressionWithPattern_options_error_( objc.NSString pattern, NSRegularExpressionOptions options, ffi.Pointer> error) { final _ret = _objc_msgSend_306( _class_NSRegularExpression, _sel_regularExpressionWithPattern_options_error_, pattern.pointer, options.value, error); return _ret.address == 0 ? null : NSRegularExpression.castFromPointer(_ret, retain: true, release: true); } /// initWithPattern:options:error: NSRegularExpression? initWithPattern_options_error_( objc.NSString pattern, NSRegularExpressionOptions options, ffi.Pointer> error) { final _ret = _objc_msgSend_307( this.pointer, _sel_initWithPattern_options_error_, pattern.pointer, options.value, error); return _ret.address == 0 ? null : NSRegularExpression.castFromPointer(_ret, retain: true, release: true); } /// pattern objc.NSString get pattern { final _ret = _objc_msgSend_11(this.pointer, _sel_pattern); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// options NSRegularExpressionOptions get options { final _ret = _objc_msgSend_308(this.pointer, _sel_options); return NSRegularExpressionOptions.fromValue(_ret); } /// numberOfCaptureGroups int get numberOfCaptureGroups { return _objc_msgSend_56(this.pointer, _sel_numberOfCaptureGroups); } /// escapedPatternForString: static objc.NSString escapedPatternForString_(objc.NSString string) { final _ret = _objc_msgSend_188(_class_NSRegularExpression, _sel_escapedPatternForString_, string.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// enumerateMatchesInString:options:range:usingBlock: void enumerateMatchesInString_options_range_usingBlock_( objc.NSString string, NSMatchingOptions options, _NSRange range, ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { _objc_msgSend_309( this.pointer, _sel_enumerateMatchesInString_options_range_usingBlock_, string.pointer, options.value, range, block.pointer); } /// matchesInString:options:range: objc.NSArray matchesInString_options_range_( objc.NSString string, NSMatchingOptions options, _NSRange range) { final _ret = _objc_msgSend_310( this.pointer, _sel_matchesInString_options_range_, string.pointer, options.value, range); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// numberOfMatchesInString:options:range: int numberOfMatchesInString_options_range_( objc.NSString string, NSMatchingOptions options, _NSRange range) { return _objc_msgSend_311( this.pointer, _sel_numberOfMatchesInString_options_range_, string.pointer, options.value, range); } /// firstMatchInString:options:range: NSTextCheckingResult? firstMatchInString_options_range_( objc.NSString string, NSMatchingOptions options, _NSRange range) { final _ret = _objc_msgSend_312( this.pointer, _sel_firstMatchInString_options_range_, string.pointer, options.value, range); return _ret.address == 0 ? null : NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); } /// rangeOfFirstMatchInString:options:range: void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, objc.NSString string, NSMatchingOptions options, _NSRange range) { objc.useMsgSendVariants ? _objc_msgSend_313Stret( stret, this.pointer, _sel_rangeOfFirstMatchInString_options_range_, string.pointer, options.value, range) : stret.ref = _objc_msgSend_313( this.pointer, _sel_rangeOfFirstMatchInString_options_range_, string.pointer, options.value, range); } /// stringByReplacingMatchesInString:options:range:withTemplate: objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( objc.NSString string, NSMatchingOptions options, _NSRange range, objc.NSString templ) { final _ret = _objc_msgSend_314( this.pointer, _sel_stringByReplacingMatchesInString_options_range_withTemplate_, string.pointer, options.value, range, templ.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// replaceMatchesInString:options:range:withTemplate: int replaceMatchesInString_options_range_withTemplate_( objc.NSMutableString string, NSMatchingOptions options, _NSRange range, objc.NSString templ) { return _objc_msgSend_315( this.pointer, _sel_replaceMatchesInString_options_range_withTemplate_, string.pointer, options.value, range, templ.pointer); } /// replacementStringForResult:inString:offset:template: objc.NSString replacementStringForResult_inString_offset_template_( NSTextCheckingResult result, objc.NSString string, int offset, objc.NSString templ) { final _ret = _objc_msgSend_316( this.pointer, _sel_replacementStringForResult_inString_offset_template_, result.pointer, string.pointer, offset, templ.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// escapedTemplateForString: static objc.NSString escapedTemplateForString_(objc.NSString string) { final _ret = _objc_msgSend_188(_class_NSRegularExpression, _sel_escapedTemplateForString_, string.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSRegularExpression init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSRegularExpression.castFromPointer(_ret, retain: true, release: true); } /// new static NSRegularExpression new1() { final _ret = _objc_msgSend_19(_class_NSRegularExpression, _sel_new); return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSRegularExpression, _sel_allocWithZone_, zone); return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSRegularExpression alloc() { final _ret = _objc_msgSend_19(_class_NSRegularExpression, _sel_alloc); return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSRegularExpression, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSRegularExpression, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSRegularExpression, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSRegularExpression, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); enum NSRegularExpressionOptions { NSRegularExpressionCaseInsensitive(1), NSRegularExpressionAllowCommentsAndWhitespace(2), NSRegularExpressionIgnoreMetacharacters(4), NSRegularExpressionDotMatchesLineSeparators(8), NSRegularExpressionAnchorsMatchLines(16), NSRegularExpressionUseUnixLineSeparators(32), NSRegularExpressionUseUnicodeWordBoundaries(64); final int value; const NSRegularExpressionOptions(this.value); static NSRegularExpressionOptions fromValue(int value) => switch (value) { 1 => NSRegularExpressionCaseInsensitive, 2 => NSRegularExpressionAllowCommentsAndWhitespace, 4 => NSRegularExpressionIgnoreMetacharacters, 8 => NSRegularExpressionDotMatchesLineSeparators, 16 => NSRegularExpressionAnchorsMatchLines, 32 => NSRegularExpressionUseUnixLineSeparators, 64 => NSRegularExpressionUseUnicodeWordBoundaries, _ => throw ArgumentError( "Unknown value for NSRegularExpressionOptions: $value"), }; } late final _sel_regularExpressionWithPattern_options_error_ = objc.registerName("regularExpressionWithPattern:options:error:"); final _objc_msgSend_306 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); late final _sel_initWithPattern_options_error_ = objc.registerName("initWithPattern:options:error:"); final _objc_msgSend_307 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer>)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); late final _sel_pattern = objc.registerName("pattern"); late final _sel_options = objc.registerName("options"); final _objc_msgSend_308 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_numberOfCaptureGroups = objc.registerName("numberOfCaptureGroups"); late final _sel_escapedPatternForString_ = objc.registerName("escapedPatternForString:"); enum NSMatchingOptions { NSMatchingReportProgress(1), NSMatchingReportCompletion(2), NSMatchingAnchored(4), NSMatchingWithTransparentBounds(8), NSMatchingWithoutAnchoringBounds(16); final int value; const NSMatchingOptions(this.value); static NSMatchingOptions fromValue(int value) => switch (value) { 1 => NSMatchingReportProgress, 2 => NSMatchingReportCompletion, 4 => NSMatchingAnchored, 8 => NSMatchingWithTransparentBounds, 16 => NSMatchingWithoutAnchoringBounds, _ => throw ArgumentError("Unknown value for NSMatchingOptions: $value"), }; } void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() .asFunction< void Function(ffi.Pointer, int, ffi.Pointer)>()(arg0, arg1, arg2); void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, int, ffi.Pointer))(arg0, arg1, arg2); class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( 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. ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunction( void Function(NSTextCheckingResult?, NSMatchingFlags, ffi.Pointer) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) .cast(), (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), NSMatchingFlags.fromValue(arg1), arg2))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( void Function(NSTextCheckingResult?, NSMatchingFlags, ffi.Pointer) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool(objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => fn( arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: false, release: true), NSMatchingFlags.fromValue(arg1), arg2)))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(NSTextCheckingResult? arg0, NSMatchingFlags arg1, ffi.Pointer arg2) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr, arg1.value, arg2); } enum NSMatchingFlags { NSMatchingProgress(1), NSMatchingCompleted(2), NSMatchingHitEnd(4), NSMatchingRequiredEnd(8), NSMatchingInternalError(16); final int value; const NSMatchingFlags(this.value); static NSMatchingFlags fromValue(int value) => switch (value) { 1 => NSMatchingProgress, 2 => NSMatchingCompleted, 4 => NSMatchingHitEnd, 8 => NSMatchingRequiredEnd, 16 => NSMatchingInternalError, _ => throw ArgumentError("Unknown value for NSMatchingFlags: $value"), }; } late final _sel_enumerateMatchesInString_options_range_usingBlock_ = objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); final _objc_msgSend_309 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange, ffi.Pointer)>(); late final _sel_matchesInString_options_range_ = objc.registerName("matchesInString:options:range:"); final _objc_msgSend_310 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_numberOfMatchesInString_options_range_ = objc.registerName("numberOfMatchesInString:options:range:"); final _objc_msgSend_311 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_firstMatchInString_options_range_ = objc.registerName("firstMatchInString:options:range:"); final _objc_msgSend_312 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_rangeOfFirstMatchInString_options_range_ = objc.registerName("rangeOfFirstMatchInString:options:range:"); final _objc_msgSend_313 = objc.msgSendPointer .cast< ffi.NativeFunction< _NSRange Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange)>>() .asFunction< _NSRange Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); final _objc_msgSend_313Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange)>>() .asFunction< void Function( ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = objc.registerName( "stringByReplacingMatchesInString:options:range:withTemplate:"); final _objc_msgSend_314 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange, ffi.Pointer)>(); late final _sel_replaceMatchesInString_options_range_withTemplate_ = objc.registerName("replaceMatchesInString:options:range:withTemplate:"); final _objc_msgSend_315 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, _NSRange, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange, ffi.Pointer)>(); late final _sel_replacementStringForResult_inString_offset_template_ = objc.registerName("replacementStringForResult:inString:offset:template:"); final _objc_msgSend_316 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Long, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_escapedTemplateForString_ = objc.registerName("escapedTemplateForString:"); late final _sel_regularExpression = objc.registerName("regularExpression"); final _objc_msgSend_317 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_phoneNumber = objc.registerName("phoneNumber"); late final _sel_numberOfRanges = objc.registerName("numberOfRanges"); late final _sel_rangeAtIndex_ = objc.registerName("rangeAtIndex:"); final _objc_msgSend_318 = objc.msgSendPointer .cast< ffi.NativeFunction< _NSRange Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); final _objc_msgSend_318Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); final _objc_msgSend_319 = objc.msgSendPointer .cast< ffi.NativeFunction< _NSRange Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< _NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_319Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_resultByAdjustingRangesWithOffset_ = objc.registerName("resultByAdjustingRangesWithOffset:"); final _objc_msgSend_320 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Long)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_addressComponents = objc.registerName("addressComponents"); late final _sel_orthographyCheckingResultWithRange_orthography_ = objc.registerName("orthographyCheckingResultWithRange:orthography:"); final _objc_msgSend_321 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_spellCheckingResultWithRange_ = objc.registerName("spellCheckingResultWithRange:"); final _objc_msgSend_322 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, _NSRange)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_grammarCheckingResultWithRange_details_ = objc.registerName("grammarCheckingResultWithRange:details:"); final _objc_msgSend_323 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_dateCheckingResultWithRange_date_ = objc.registerName("dateCheckingResultWithRange:date:"); final _objc_msgSend_324 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); final _objc_msgSend_325 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer, ffi.Pointer, ffi.Double)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer, ffi.Pointer, double)>(); late final _sel_addressCheckingResultWithRange_components_ = objc.registerName("addressCheckingResultWithRange:components:"); final _objc_msgSend_326 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_linkCheckingResultWithRange_URL_ = objc.registerName("linkCheckingResultWithRange:URL:"); final _objc_msgSend_327 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_quoteCheckingResultWithRange_replacementString_ = objc.registerName("quoteCheckingResultWithRange:replacementString:"); final _objc_msgSend_328 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer)>(); late final _sel_dashCheckingResultWithRange_replacementString_ = objc.registerName("dashCheckingResultWithRange:replacementString:"); late final _sel_replacementCheckingResultWithRange_replacementString_ = objc.registerName("replacementCheckingResultWithRange:replacementString:"); late final _sel_correctionCheckingResultWithRange_replacementString_ = objc.registerName("correctionCheckingResultWithRange:replacementString:"); late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_ = objc.registerName( "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); final _objc_msgSend_329 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, _NSRange, ffi.Pointer, ffi.Pointer)>(); late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = objc.registerName( "regularExpressionCheckingResultWithRanges:count:regularExpression:"); final _objc_msgSend_330 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer<_NSRange>, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer<_NSRange>, int, ffi.Pointer)>(); late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_ = objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); late final _sel_transitInformationCheckingResultWithRange_components_ = objc.registerName("transitInformationCheckingResultWithRange:components:"); /// NSStream class NSStream extends objc.NSObject { NSStream._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSStream] that points to the same underlying object as [other]. NSStream.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSStream] that wraps the given raw object pointer. NSStream.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSStream]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSStream); } /// open void open() { _objc_msgSend_7(this.pointer, _sel_open); } /// close void close() { _objc_msgSend_7(this.pointer, _sel_close); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_84(this.pointer, _sel_delegate); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: set delegate(objc.ObjCObjectBase? value) { return _objc_msgSend_103( this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } /// propertyForKey: objc.ObjCObjectBase? propertyForKey_(objc.NSString key) { final _ret = _objc_msgSend_34(this.pointer, _sel_propertyForKey_, key.pointer); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setProperty:forKey: bool setProperty_forKey_(objc.ObjCObjectBase? property, objc.NSString key) { return _objc_msgSend_331(this.pointer, _sel_setProperty_forKey_, property?.pointer ?? ffi.nullptr, key.pointer); } /// scheduleInRunLoop:forMode: void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { _objc_msgSend_131(this.pointer, _sel_scheduleInRunLoop_forMode_, aRunLoop.pointer, mode.pointer); } /// removeFromRunLoop:forMode: void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { _objc_msgSend_131(this.pointer, _sel_removeFromRunLoop_forMode_, aRunLoop.pointer, mode.pointer); } /// streamStatus NSStreamStatus get streamStatus { final _ret = _objc_msgSend_332(this.pointer, _sel_streamStatus); return NSStreamStatus.fromValue(_ret); } /// streamError objc.NSError? get streamError { final _ret = _objc_msgSend_333(this.pointer, _sel_streamError); return _ret.address == 0 ? null : objc.NSError.castFromPointer(_ret, retain: true, release: true); } /// getStreamsToHostWithName:port:inputStream:outputStream: static void getStreamsToHostWithName_port_inputStream_outputStream_( objc.NSString hostname, int port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { _objc_msgSend_342( _class_NSStream, _sel_getStreamsToHostWithName_port_inputStream_outputStream_, hostname.pointer, port, inputStream, outputStream); } /// getBoundStreamsWithBufferSize:inputStream:outputStream: static void getBoundStreamsWithBufferSize_inputStream_outputStream_( int bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { _objc_msgSend_343( _class_NSStream, _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, bufferSize, inputStream, outputStream); } /// init NSStream init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSStream.castFromPointer(_ret, retain: true, release: true); } /// new static NSStream new1() { final _ret = _objc_msgSend_19(_class_NSStream, _sel_new); return NSStream.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSStream, _sel_allocWithZone_, zone); return NSStream.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSStream alloc() { final _ret = _objc_msgSend_19(_class_NSStream, _sel_alloc); return NSStream.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSStream, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSStream, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSStream, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSStream, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSStream, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSStream, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32(_class_NSStream, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSStream, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSStream = objc.getClass("NSStream"); late final _sel_open = objc.registerName("open"); late final _sel_close = objc.registerName("close"); late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); final _objc_msgSend_331 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); enum NSStreamStatus { NSStreamStatusNotOpen(0), NSStreamStatusOpening(1), NSStreamStatusOpen(2), NSStreamStatusReading(3), NSStreamStatusWriting(4), NSStreamStatusAtEnd(5), NSStreamStatusClosed(6), NSStreamStatusError(7); final int value; const NSStreamStatus(this.value); static NSStreamStatus fromValue(int value) => switch (value) { 0 => NSStreamStatusNotOpen, 1 => NSStreamStatusOpening, 2 => NSStreamStatusOpen, 3 => NSStreamStatusReading, 4 => NSStreamStatusWriting, 5 => NSStreamStatusAtEnd, 6 => NSStreamStatusClosed, 7 => NSStreamStatusError, _ => throw ArgumentError("Unknown value for NSStreamStatus: $value"), }; } late final _sel_streamStatus = objc.registerName("streamStatus"); final _objc_msgSend_332 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_streamError = objc.registerName("streamError"); final _objc_msgSend_333 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); /// NSInputStream class NSInputStream extends NSStream { NSInputStream._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSInputStream] that points to the same underlying object as [other]. NSInputStream.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSInputStream] that wraps the given raw object pointer. NSInputStream.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSInputStream]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSInputStream); } /// read:maxLength: int read_maxLength_(ffi.Pointer buffer, int len) { return _objc_msgSend_334(this.pointer, _sel_read_maxLength_, buffer, len); } /// getBuffer:length: bool getBuffer_length_(ffi.Pointer> buffer, ffi.Pointer len) { return _objc_msgSend_335(this.pointer, _sel_getBuffer_length_, buffer, len); } /// hasBytesAvailable bool get hasBytesAvailable { return _objc_msgSend_13(this.pointer, _sel_hasBytesAvailable); } /// initWithData: NSInputStream initWithData_(objc.NSData data) { final _ret = _objc_msgSend_336(this.pointer, _sel_initWithData_, data.pointer); return NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// initWithURL: NSInputStream? initWithURL_(objc.NSURL url) { final _ret = _objc_msgSend_35(this.pointer, _sel_initWithURL_, url.pointer); return _ret.address == 0 ? null : NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// initWithFileAtPath: NSInputStream? initWithFileAtPath_(objc.NSString path) { final _ret = _objc_msgSend_34(this.pointer, _sel_initWithFileAtPath_, path.pointer); return _ret.address == 0 ? null : NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// inputStreamWithData: static NSInputStream? inputStreamWithData_(objc.NSData data) { final _ret = _objc_msgSend_337( _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); return _ret.address == 0 ? null : NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// inputStreamWithFileAtPath: static NSInputStream? inputStreamWithFileAtPath_(objc.NSString path) { final _ret = _objc_msgSend_34( _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); return _ret.address == 0 ? null : NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// inputStreamWithURL: static NSInputStream? inputStreamWithURL_(objc.NSURL url) { final _ret = _objc_msgSend_35( _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); return _ret.address == 0 ? null : NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// getStreamsToHostWithName:port:inputStream:outputStream: static void getStreamsToHostWithName_port_inputStream_outputStream_( objc.NSString hostname, int port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { _objc_msgSend_342( _class_NSInputStream, _sel_getStreamsToHostWithName_port_inputStream_outputStream_, hostname.pointer, port, inputStream, outputStream); } /// getBoundStreamsWithBufferSize:inputStream:outputStream: static void getBoundStreamsWithBufferSize_inputStream_outputStream_( int bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { _objc_msgSend_343( _class_NSInputStream, _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, bufferSize, inputStream, outputStream); } } late final _class_NSInputStream = objc.getClass("NSInputStream"); late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); final _objc_msgSend_334 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Long Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); final _objc_msgSend_335 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer)>(); late final _sel_hasBytesAvailable = objc.registerName("hasBytesAvailable"); late final _sel_initWithData_ = objc.registerName("initWithData:"); final _objc_msgSend_336 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); late final _sel_inputStreamWithData_ = objc.registerName("inputStreamWithData:"); final _objc_msgSend_337 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_inputStreamWithFileAtPath_ = objc.registerName("inputStreamWithFileAtPath:"); late final _sel_inputStreamWithURL_ = objc.registerName("inputStreamWithURL:"); /// NSOutputStream class NSOutputStream extends NSStream { NSOutputStream._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSOutputStream] that points to the same underlying object as [other]. NSOutputStream.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSOutputStream] that wraps the given raw object pointer. NSOutputStream.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSOutputStream]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSOutputStream); } /// write:maxLength: int write_maxLength_(ffi.Pointer buffer, int len) { return _objc_msgSend_334(this.pointer, _sel_write_maxLength_, buffer, len); } /// hasSpaceAvailable bool get hasSpaceAvailable { return _objc_msgSend_13(this.pointer, _sel_hasSpaceAvailable); } /// initToMemory NSOutputStream initToMemory() { final _ret = _objc_msgSend_19(this.pointer, _sel_initToMemory); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// initToBuffer:capacity: NSOutputStream initToBuffer_capacity_( ffi.Pointer buffer, int capacity) { final _ret = _objc_msgSend_338( this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// initWithURL:append: NSOutputStream? initWithURL_append_(objc.NSURL url, bool shouldAppend) { final _ret = _objc_msgSend_339( this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); return _ret.address == 0 ? null : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// initToFileAtPath:append: NSOutputStream? initToFileAtPath_append_( objc.NSString path, bool shouldAppend) { final _ret = _objc_msgSend_340(this.pointer, _sel_initToFileAtPath_append_, path.pointer, shouldAppend); return _ret.address == 0 ? null : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// outputStreamToMemory static NSOutputStream outputStreamToMemory() { final _ret = _objc_msgSend_19(_class_NSOutputStream, _sel_outputStreamToMemory); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// outputStreamToBuffer:capacity: static NSOutputStream outputStreamToBuffer_capacity_( ffi.Pointer buffer, int capacity) { final _ret = _objc_msgSend_338(_class_NSOutputStream, _sel_outputStreamToBuffer_capacity_, buffer, capacity); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// outputStreamToFileAtPath:append: static NSOutputStream outputStreamToFileAtPath_append_( objc.NSString path, bool shouldAppend) { final _ret = _objc_msgSend_341(_class_NSOutputStream, _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// outputStreamWithURL:append: static NSOutputStream? outputStreamWithURL_append_( objc.NSURL url, bool shouldAppend) { final _ret = _objc_msgSend_339(_class_NSOutputStream, _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); return _ret.address == 0 ? null : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// getStreamsToHostWithName:port:inputStream:outputStream: static void getStreamsToHostWithName_port_inputStream_outputStream_( objc.NSString hostname, int port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { _objc_msgSend_342( _class_NSOutputStream, _sel_getStreamsToHostWithName_port_inputStream_outputStream_, hostname.pointer, port, inputStream, outputStream); } /// getBoundStreamsWithBufferSize:inputStream:outputStream: static void getBoundStreamsWithBufferSize_inputStream_outputStream_( int bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { _objc_msgSend_343( _class_NSOutputStream, _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, bufferSize, inputStream, outputStream); } } late final _class_NSOutputStream = objc.getClass("NSOutputStream"); late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); late final _sel_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); late final _sel_initToMemory = objc.registerName("initToMemory"); late final _sel_initToBuffer_capacity_ = objc.registerName("initToBuffer:capacity:"); final _objc_msgSend_338 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); final _objc_msgSend_339 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_initToFileAtPath_append_ = objc.registerName("initToFileAtPath:append:"); final _objc_msgSend_340 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_outputStreamToMemory = objc.registerName("outputStreamToMemory"); late final _sel_outputStreamToBuffer_capacity_ = objc.registerName("outputStreamToBuffer:capacity:"); late final _sel_outputStreamToFileAtPath_append_ = objc.registerName("outputStreamToFileAtPath:append:"); final _objc_msgSend_341 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_outputStreamWithURL_append_ = objc.registerName("outputStreamWithURL:append:"); late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_ = objc .registerName("getStreamsToHostWithName:port:inputStream:outputStream:"); final _objc_msgSend_342 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Long, ffi.Pointer>, ffi.Pointer>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer>, ffi.Pointer>)>(); late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_ = objc .registerName("getBoundStreamsWithBufferSize:inputStream:outputStream:"); final _objc_msgSend_343 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Pointer>, ffi.Pointer>)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer>, ffi.Pointer>)>(); /// NSURLCache class NSURLCache extends objc.NSObject { NSURLCache._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLCache] that points to the same underlying object as [other]. NSURLCache.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLCache] that wraps the given raw object pointer. NSURLCache.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLCache]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); } /// sharedURLCache static NSURLCache getSharedURLCache() { final _ret = _objc_msgSend_344(_class_NSURLCache, _sel_sharedURLCache); return NSURLCache.castFromPointer(_ret, retain: true, release: true); } /// setSharedURLCache: static void setSharedURLCache(NSURLCache value) { return _objc_msgSend_345( _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); } /// initWithMemoryCapacity:diskCapacity:diskPath: NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( int memoryCapacity, int diskCapacity, objc.NSString? path) { final _ret = _objc_msgSend_346( this.pointer, _sel_initWithMemoryCapacity_diskCapacity_diskPath_, memoryCapacity, diskCapacity, path?.pointer ?? ffi.nullptr); return NSURLCache.castFromPointer(_ret, retain: true, release: true); } /// initWithMemoryCapacity:diskCapacity:directoryURL: NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { final _ret = _objc_msgSend_347( this.pointer, _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, memoryCapacity, diskCapacity, directoryURL?.pointer ?? ffi.nullptr); return NSURLCache.castFromPointer(_ret, retain: true, release: true); } /// cachedResponseForRequest: NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { final _ret = _objc_msgSend_361( this.pointer, _sel_cachedResponseForRequest_, request.pointer); return _ret.address == 0 ? null : NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); } /// storeCachedResponse:forRequest: void storeCachedResponse_forRequest_( NSCachedURLResponse cachedResponse, NSURLRequest request) { _objc_msgSend_362(this.pointer, _sel_storeCachedResponse_forRequest_, cachedResponse.pointer, request.pointer); } /// removeCachedResponseForRequest: void removeCachedResponseForRequest_(NSURLRequest request) { _objc_msgSend_363( this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); } /// removeAllCachedResponses void removeAllCachedResponses() { _objc_msgSend_7(this.pointer, _sel_removeAllCachedResponses); } /// removeCachedResponsesSinceDate: void removeCachedResponsesSinceDate_(objc.NSDate date) { _objc_msgSend_137( this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); } /// memoryCapacity int get memoryCapacity { return _objc_msgSend_56(this.pointer, _sel_memoryCapacity); } /// setMemoryCapacity: set memoryCapacity(int value) { return _objc_msgSend_100(this.pointer, _sel_setMemoryCapacity_, value); } /// diskCapacity int get diskCapacity { return _objc_msgSend_56(this.pointer, _sel_diskCapacity); } /// setDiskCapacity: set diskCapacity(int value) { return _objc_msgSend_100(this.pointer, _sel_setDiskCapacity_, value); } /// currentMemoryUsage int get currentMemoryUsage { return _objc_msgSend_56(this.pointer, _sel_currentMemoryUsage); } /// currentDiskUsage int get currentDiskUsage { return _objc_msgSend_56(this.pointer, _sel_currentDiskUsage); } /// storeCachedResponse:forDataTask: void storeCachedResponse_forDataTask_( NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { _objc_msgSend_364(this.pointer, _sel_storeCachedResponse_forDataTask_, cachedResponse.pointer, dataTask.pointer); } /// getCachedResponseForDataTask:completionHandler: void getCachedResponseForDataTask_completionHandler_( NSURLSessionDataTask dataTask, ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { _objc_msgSend_365( this.pointer, _sel_getCachedResponseForDataTask_completionHandler_, dataTask.pointer, completionHandler.pointer); } /// removeCachedResponseForDataTask: void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { _objc_msgSend_366( this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); } /// init NSURLCache init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLCache.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLCache new1() { final _ret = _objc_msgSend_19(_class_NSURLCache, _sel_new); return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSURLCache, _sel_allocWithZone_, zone); return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLCache alloc() { final _ret = _objc_msgSend_19(_class_NSURLCache, _sel_alloc); return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLCache, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSURLCache, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLCache, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLCache, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLCache, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSURLCache, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLCache = objc.getClass("NSURLCache"); late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); final _objc_msgSend_344 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); final _objc_msgSend_345 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); final _objc_msgSend_346 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer)>(); late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); final _objc_msgSend_347 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer)>(); /// NSCachedURLResponse class NSCachedURLResponse extends objc.NSObject { NSCachedURLResponse._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. NSCachedURLResponse.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSCachedURLResponse]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } /// initWithResponse:data: NSCachedURLResponse initWithResponse_data_( NSURLResponse response, objc.NSData data) { final _ret = _objc_msgSend_350(this.pointer, _sel_initWithResponse_data_, response.pointer, data.pointer); return NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); } /// initWithResponse:data:userInfo:storagePolicy: NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( NSURLResponse response, objc.NSData data, objc.NSDictionary? userInfo, NSURLCacheStoragePolicy storagePolicy) { final _ret = _objc_msgSend_351( this.pointer, _sel_initWithResponse_data_userInfo_storagePolicy_, response.pointer, data.pointer, userInfo?.pointer ?? ffi.nullptr, storagePolicy.value); return NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); } /// response NSURLResponse get response { final _ret = _objc_msgSend_352(this.pointer, _sel_response); return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } /// data objc.NSData get data { final _ret = _objc_msgSend_143(this.pointer, _sel_data); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// userInfo objc.NSDictionary? get userInfo { final _ret = _objc_msgSend_83(this.pointer, _sel_userInfo); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// storagePolicy NSURLCacheStoragePolicy get storagePolicy { final _ret = _objc_msgSend_353(this.pointer, _sel_storagePolicy); return NSURLCacheStoragePolicy.fromValue(_ret); } /// init NSCachedURLResponse init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); } /// new static NSCachedURLResponse new1() { final _ret = _objc_msgSend_19(_class_NSCachedURLResponse, _sel_new); return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSCachedURLResponse alloc() { final _ret = _objc_msgSend_19(_class_NSCachedURLResponse, _sel_alloc); return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSCachedURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSCachedURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSCachedURLResponse, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSCachedURLResponse, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSCachedURLResponse, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); /// NSURLResponse class NSURLResponse extends objc.NSObject { NSURLResponse._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. NSURLResponse.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLResponse] that wraps the given raw object pointer. NSURLResponse.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLResponse]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } /// initWithURL:MIMEType:expectedContentLength:textEncodingName: NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( objc.NSURL URL, objc.NSString? MIMEType, int length, objc.NSString? name) { final _ret = _objc_msgSend_348( this.pointer, _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, URL.pointer, MIMEType?.pointer ?? ffi.nullptr, length, name?.pointer ?? ffi.nullptr); return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_24(this.pointer, _sel_URL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// MIMEType objc.NSString? get MIMEType { final _ret = _objc_msgSend_20(this.pointer, _sel_MIMEType); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// expectedContentLength int get expectedContentLength { return _objc_msgSend_349(this.pointer, _sel_expectedContentLength); } /// textEncodingName objc.NSString? get textEncodingName { final _ret = _objc_msgSend_20(this.pointer, _sel_textEncodingName); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// suggestedFilename objc.NSString? get suggestedFilename { final _ret = _objc_msgSend_20(this.pointer, _sel_suggestedFilename); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSURLResponse init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLResponse new1() { final _ret = _objc_msgSend_19(_class_NSURLResponse, _sel_new); return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSURLResponse, _sel_allocWithZone_, zone); return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLResponse alloc() { final _ret = _objc_msgSend_19(_class_NSURLResponse, _sel_alloc); return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSURLResponse, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLResponse, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLResponse, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSURLResponse, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLResponse = objc.getClass("NSURLResponse"); late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = objc.registerName( "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); final _objc_msgSend_348 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Long, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_MIMEType = objc.registerName("MIMEType"); late final _sel_expectedContentLength = objc.registerName("expectedContentLength"); final _objc_msgSend_349 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.LongLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_textEncodingName = objc.registerName("textEncodingName"); late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); late final _sel_initWithResponse_data_ = objc.registerName("initWithResponse:data:"); final _objc_msgSend_350 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); enum NSURLCacheStoragePolicy { NSURLCacheStorageAllowed(0), NSURLCacheStorageAllowedInMemoryOnly(1), NSURLCacheStorageNotAllowed(2); final int value; const NSURLCacheStoragePolicy(this.value); static NSURLCacheStoragePolicy fromValue(int value) => switch (value) { 0 => NSURLCacheStorageAllowed, 1 => NSURLCacheStorageAllowedInMemoryOnly, 2 => NSURLCacheStorageNotAllowed, _ => throw ArgumentError( "Unknown value for NSURLCacheStoragePolicy: $value"), }; } late final _sel_initWithResponse_data_userInfo_storagePolicy_ = objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); final _objc_msgSend_351 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_response = objc.registerName("response"); final _objc_msgSend_352 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_storagePolicy = objc.registerName("storagePolicy"); final _objc_msgSend_353 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); /// NSURLRequest class NSURLRequest extends objc.NSObject { NSURLRequest._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLRequest] that points to the same underlying object as [other]. NSURLRequest.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLRequest] that wraps the given raw object pointer. NSURLRequest.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLRequest]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLRequest); } /// requestWithURL: static NSURLRequest requestWithURL_(objc.NSURL URL) { final _ret = _objc_msgSend_354( _class_NSURLRequest, _sel_requestWithURL_, URL.pointer); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { return _objc_msgSend_13(_class_NSURLRequest, _sel_supportsSecureCoding); } /// requestWithURL:cachePolicy:timeoutInterval: static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { final _ret = _objc_msgSend_355( _class_NSURLRequest, _sel_requestWithURL_cachePolicy_timeoutInterval_, URL.pointer, cachePolicy.value, timeoutInterval); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// initWithURL: NSURLRequest initWithURL_(objc.NSURL URL) { final _ret = _objc_msgSend_354(this.pointer, _sel_initWithURL_, URL.pointer); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// initWithURL:cachePolicy:timeoutInterval: NSURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { final _ret = _objc_msgSend_355( this.pointer, _sel_initWithURL_cachePolicy_timeoutInterval_, URL.pointer, cachePolicy.value, timeoutInterval); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_24(this.pointer, _sel_URL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// cachePolicy NSURLRequestCachePolicy get cachePolicy { final _ret = _objc_msgSend_356(this.pointer, _sel_cachePolicy); return NSURLRequestCachePolicy.fromValue(_ret); } /// timeoutInterval double get timeoutInterval { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_timeoutInterval) : _objc_msgSend_18(this.pointer, _sel_timeoutInterval); } /// mainDocumentURL objc.NSURL? get mainDocumentURL { final _ret = _objc_msgSend_24(this.pointer, _sel_mainDocumentURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// networkServiceType NSURLRequestNetworkServiceType get networkServiceType { final _ret = _objc_msgSend_357(this.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// allowsCellularAccess bool get allowsCellularAccess { return _objc_msgSend_13(this.pointer, _sel_allowsCellularAccess); } /// allowsExpensiveNetworkAccess bool get allowsExpensiveNetworkAccess { return _objc_msgSend_13(this.pointer, _sel_allowsExpensiveNetworkAccess); } /// allowsConstrainedNetworkAccess bool get allowsConstrainedNetworkAccess { return _objc_msgSend_13(this.pointer, _sel_allowsConstrainedNetworkAccess); } /// assumesHTTP3Capable bool get assumesHTTP3Capable { return _objc_msgSend_13(this.pointer, _sel_assumesHTTP3Capable); } /// attribution NSURLRequestAttribution get attribution { final _ret = _objc_msgSend_358(this.pointer, _sel_attribution); return NSURLRequestAttribution.fromValue(_ret); } /// requiresDNSSECValidation bool get requiresDNSSECValidation { return _objc_msgSend_13(this.pointer, _sel_requiresDNSSECValidation); } /// HTTPMethod objc.NSString? get HTTPMethod { final _ret = _objc_msgSend_20(this.pointer, _sel_HTTPMethod); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// allHTTPHeaderFields objc.NSDictionary? get allHTTPHeaderFields { final _ret = _objc_msgSend_83(this.pointer, _sel_allHTTPHeaderFields); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// valueForHTTPHeaderField: objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { final _ret = _objc_msgSend_41( this.pointer, _sel_valueForHTTPHeaderField_, field.pointer); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// HTTPBody objc.NSData? get HTTPBody { final _ret = _objc_msgSend_359(this.pointer, _sel_HTTPBody); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// HTTPBodyStream NSInputStream? get HTTPBodyStream { final _ret = _objc_msgSend_360(this.pointer, _sel_HTTPBodyStream); return _ret.address == 0 ? null : NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// HTTPShouldHandleCookies bool get HTTPShouldHandleCookies { return _objc_msgSend_13(this.pointer, _sel_HTTPShouldHandleCookies); } /// HTTPShouldUsePipelining bool get HTTPShouldUsePipelining { return _objc_msgSend_13(this.pointer, _sel_HTTPShouldUsePipelining); } /// init NSURLRequest init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLRequest new1() { final _ret = _objc_msgSend_19(_class_NSURLRequest, _sel_new); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSURLRequest, _sel_allocWithZone_, zone); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLRequest alloc() { final _ret = _objc_msgSend_19(_class_NSURLRequest, _sel_alloc); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSURLRequest, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLRequest, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLRequest, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSURLRequest, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLRequest = objc.getClass("NSURLRequest"); late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); final _objc_msgSend_354 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_supportsSecureCoding = objc.registerName("supportsSecureCoding"); enum NSURLRequestCachePolicy { NSURLRequestUseProtocolCachePolicy(0), NSURLRequestReloadIgnoringLocalCacheData(1), NSURLRequestReloadIgnoringLocalAndRemoteCacheData(4), NSURLRequestReturnCacheDataElseLoad(2), NSURLRequestReturnCacheDataDontLoad(3), NSURLRequestReloadRevalidatingCacheData(5); static const NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData; final int value; const NSURLRequestCachePolicy(this.value); static NSURLRequestCachePolicy fromValue(int value) => switch (value) { 0 => NSURLRequestUseProtocolCachePolicy, 1 => NSURLRequestReloadIgnoringLocalCacheData, 4 => NSURLRequestReloadIgnoringLocalAndRemoteCacheData, 2 => NSURLRequestReturnCacheDataElseLoad, 3 => NSURLRequestReturnCacheDataDontLoad, 5 => NSURLRequestReloadRevalidatingCacheData, _ => throw ArgumentError( "Unknown value for NSURLRequestCachePolicy: $value"), }; @override String toString() { if (this == NSURLRequestReloadIgnoringLocalCacheData) return "NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestCachePolicy.NSURLRequestReloadIgnoringCacheData"; return super.toString(); } } late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); final _objc_msgSend_355 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong, ffi.Double)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, double)>(); late final _sel_initWithURL_cachePolicy_timeoutInterval_ = objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); late final _sel_cachePolicy = objc.registerName("cachePolicy"); final _objc_msgSend_356 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); enum NSURLRequestNetworkServiceType { NSURLNetworkServiceTypeDefault(0), NSURLNetworkServiceTypeVoIP(1), NSURLNetworkServiceTypeVideo(2), NSURLNetworkServiceTypeBackground(3), NSURLNetworkServiceTypeVoice(4), NSURLNetworkServiceTypeResponsiveData(6), NSURLNetworkServiceTypeAVStreaming(8), NSURLNetworkServiceTypeResponsiveAV(9), NSURLNetworkServiceTypeCallSignaling(11); final int value; const NSURLRequestNetworkServiceType(this.value); static NSURLRequestNetworkServiceType fromValue(int value) => switch (value) { 0 => NSURLNetworkServiceTypeDefault, 1 => NSURLNetworkServiceTypeVoIP, 2 => NSURLNetworkServiceTypeVideo, 3 => NSURLNetworkServiceTypeBackground, 4 => NSURLNetworkServiceTypeVoice, 6 => NSURLNetworkServiceTypeResponsiveData, 8 => NSURLNetworkServiceTypeAVStreaming, 9 => NSURLNetworkServiceTypeResponsiveAV, 11 => NSURLNetworkServiceTypeCallSignaling, _ => throw ArgumentError( "Unknown value for NSURLRequestNetworkServiceType: $value"), }; } late final _sel_networkServiceType = objc.registerName("networkServiceType"); final _objc_msgSend_357 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_allowsCellularAccess = objc.registerName("allowsCellularAccess"); late final _sel_allowsExpensiveNetworkAccess = objc.registerName("allowsExpensiveNetworkAccess"); late final _sel_allowsConstrainedNetworkAccess = objc.registerName("allowsConstrainedNetworkAccess"); late final _sel_assumesHTTP3Capable = objc.registerName("assumesHTTP3Capable"); enum NSURLRequestAttribution { NSURLRequestAttributionDeveloper(0), NSURLRequestAttributionUser(1); final int value; const NSURLRequestAttribution(this.value); static NSURLRequestAttribution fromValue(int value) => switch (value) { 0 => NSURLRequestAttributionDeveloper, 1 => NSURLRequestAttributionUser, _ => throw ArgumentError( "Unknown value for NSURLRequestAttribution: $value"), }; } late final _sel_attribution = objc.registerName("attribution"); final _objc_msgSend_358 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_requiresDNSSECValidation = objc.registerName("requiresDNSSECValidation"); late final _sel_HTTPMethod = objc.registerName("HTTPMethod"); late final _sel_allHTTPHeaderFields = objc.registerName("allHTTPHeaderFields"); late final _sel_valueForHTTPHeaderField_ = objc.registerName("valueForHTTPHeaderField:"); late final _sel_HTTPBody = objc.registerName("HTTPBody"); final _objc_msgSend_359 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); final _objc_msgSend_360 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_HTTPShouldHandleCookies = objc.registerName("HTTPShouldHandleCookies"); late final _sel_HTTPShouldUsePipelining = objc.registerName("HTTPShouldUsePipelining"); late final _sel_cachedResponseForRequest_ = objc.registerName("cachedResponseForRequest:"); final _objc_msgSend_361 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_storeCachedResponse_forRequest_ = objc.registerName("storeCachedResponse:forRequest:"); final _objc_msgSend_362 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeCachedResponseForRequest_ = objc.registerName("removeCachedResponseForRequest:"); final _objc_msgSend_363 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeAllCachedResponses = objc.registerName("removeAllCachedResponses"); late final _sel_removeCachedResponsesSinceDate_ = objc.registerName("removeCachedResponsesSinceDate:"); late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); late final _sel_diskCapacity = objc.registerName("diskCapacity"); late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); /// NSURLSessionDataTask class NSURLSessionDataTask extends objc.ObjCObjectBase { NSURLSessionDataTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. NSURLSessionDataTask.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); } } late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); late final _sel_storeCachedResponse_forDataTask_ = objc.registerName("storeCachedResponse:forDataTask:"); final _objc_msgSend_364 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSCachedURLResponse._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSCachedURLResponse._(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. ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( void Function(NSCachedURLResponse?) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSCachedURLResponse.listener( void Function(NSCachedURLResponse?) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSCachedURLResponse( objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSCachedURLResponse.castFromPointer(arg0, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(NSCachedURLResponse? arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr); } late final _sel_getCachedResponseForDataTask_completionHandler_ = objc.registerName("getCachedResponseForDataTask:completionHandler:"); final _objc_msgSend_365 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeCachedResponseForDataTask_ = objc.registerName("removeCachedResponseForDataTask:"); final _objc_msgSend_366 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSURLConnection class NSURLConnection extends objc.NSObject { NSURLConnection._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLConnection] that points to the same underlying object as [other]. NSURLConnection.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLConnection] that wraps the given raw object pointer. NSURLConnection.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLConnection]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); } /// initWithRequest:delegate:startImmediately: NSURLConnection? initWithRequest_delegate_startImmediately_( NSURLRequest request, objc.ObjCObjectBase? delegate, bool startImmediately) { final _ret = _objc_msgSend_367( this.pointer, _sel_initWithRequest_delegate_startImmediately_, request.pointer, delegate?.pointer ?? ffi.nullptr, startImmediately); return _ret.address == 0 ? null : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } /// initWithRequest:delegate: NSURLConnection? initWithRequest_delegate_( NSURLRequest request, objc.ObjCObjectBase? delegate) { final _ret = _objc_msgSend_368(this.pointer, _sel_initWithRequest_delegate_, request.pointer, delegate?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } /// connectionWithRequest:delegate: static NSURLConnection? connectionWithRequest_delegate_( NSURLRequest request, objc.ObjCObjectBase? delegate) { final _ret = _objc_msgSend_369( _class_NSURLConnection, _sel_connectionWithRequest_delegate_, request.pointer, delegate?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } /// originalRequest NSURLRequest get originalRequest { final _ret = _objc_msgSend_370(this.pointer, _sel_originalRequest); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// currentRequest NSURLRequest get currentRequest { final _ret = _objc_msgSend_370(this.pointer, _sel_currentRequest); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// start void start() { _objc_msgSend_7(this.pointer, _sel_start); } /// cancel void cancel() { _objc_msgSend_7(this.pointer, _sel_cancel); } /// scheduleInRunLoop:forMode: void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { _objc_msgSend_131(this.pointer, _sel_scheduleInRunLoop_forMode_, aRunLoop.pointer, mode.pointer); } /// unscheduleFromRunLoop:forMode: void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { _objc_msgSend_131(this.pointer, _sel_unscheduleFromRunLoop_forMode_, aRunLoop.pointer, mode.pointer); } /// setDelegateQueue: void setDelegateQueue_(NSOperationQueue? queue) { _objc_msgSend_371( this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); } /// canHandleRequest: static bool canHandleRequest_(NSURLRequest request) { return _objc_msgSend_372( _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); } /// sendSynchronousRequest:returningResponse:error: static objc.NSData? sendSynchronousRequest_returningResponse_error_( NSURLRequest request, ffi.Pointer> response, ffi.Pointer> error) { final _ret = _objc_msgSend_373( _class_NSURLConnection, _sel_sendSynchronousRequest_returningResponse_error_, request.pointer, response, error); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// sendAsynchronousRequest:queue:completionHandler: static void sendAsynchronousRequest_queue_completionHandler_( NSURLRequest request, NSOperationQueue queue, ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { _objc_msgSend_374( _class_NSURLConnection, _sel_sendAsynchronousRequest_queue_completionHandler_, request.pointer, queue.pointer, handler.pointer); } /// init NSURLConnection init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLConnection.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLConnection new1() { final _ret = _objc_msgSend_19(_class_NSURLConnection, _sel_new); return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSURLConnection, _sel_allocWithZone_, zone); return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLConnection alloc() { final _ret = _objc_msgSend_19(_class_NSURLConnection, _sel_alloc); return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLConnection, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLConnection, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSURLConnection, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLConnection, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLConnection, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSURLConnection, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLConnection = objc.getClass("NSURLConnection"); late final _sel_initWithRequest_delegate_startImmediately_ = objc.registerName("initWithRequest:delegate:startImmediately:"); final _objc_msgSend_367 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_initWithRequest_delegate_ = objc.registerName("initWithRequest:delegate:"); final _objc_msgSend_368 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_connectionWithRequest_delegate_ = objc.registerName("connectionWithRequest:delegate:"); final _objc_msgSend_369 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_originalRequest = objc.registerName("originalRequest"); final _objc_msgSend_370 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_currentRequest = objc.registerName("currentRequest"); late final _sel_unscheduleFromRunLoop_forMode_ = objc.registerName("unscheduleFromRunLoop:forMode:"); late final _sel_setDelegateQueue_ = objc.registerName("setDelegateQueue:"); final _objc_msgSend_371 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_canHandleRequest_ = objc.registerName("canHandleRequest:"); final _objc_msgSend_372 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_sendSynchronousRequest_returningResponse_error_ = objc.registerName("sendSynchronousRequest:returningResponse:error:"); final _objc_msgSend_373 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer>)>(); void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(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. ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) .cast(), (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( arg0.address == 0 ? null : NSURLResponse.castFromPointer(arg0, retain: true, release: true), arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: true, release: true), arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError( objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( arg0.address == 0 ? null : NSURLResponse.castFromPointer(arg0, retain: false, release: true), arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: false, release: true), arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr, arg2?.pointer ?? ffi.nullptr); } late final _sel_sendAsynchronousRequest_queue_completionHandler_ = objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); final _objc_msgSend_374 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSURLCredential class NSURLCredential extends objc.NSObject { NSURLCredential._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. NSURLCredential.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLCredential] that wraps the given raw object pointer. NSURLCredential.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLCredential]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); } /// persistence NSURLCredentialPersistence get persistence { final _ret = _objc_msgSend_375(this.pointer, _sel_persistence); return NSURLCredentialPersistence.fromValue(_ret); } /// initWithUser:password:persistence: NSURLCredential initWithUser_password_persistence_(objc.NSString user, objc.NSString password, NSURLCredentialPersistence persistence) { final _ret = _objc_msgSend_376( this.pointer, _sel_initWithUser_password_persistence_, user.pointer, password.pointer, persistence.value); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// credentialWithUser:password:persistence: static NSURLCredential credentialWithUser_password_persistence_( objc.NSString user, objc.NSString password, NSURLCredentialPersistence persistence) { final _ret = _objc_msgSend_377( _class_NSURLCredential, _sel_credentialWithUser_password_persistence_, user.pointer, password.pointer, persistence.value); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// user objc.NSString? get user { final _ret = _objc_msgSend_20(this.pointer, _sel_user); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// password objc.NSString? get password { final _ret = _objc_msgSend_20(this.pointer, _sel_password); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// hasPassword bool get hasPassword { return _objc_msgSend_13(this.pointer, _sel_hasPassword); } /// initWithIdentity:certificates:persistence: NSURLCredential initWithIdentity_certificates_persistence_( ffi.Pointer<__SecIdentity> identity, objc.NSArray? certArray, NSURLCredentialPersistence persistence) { final _ret = _objc_msgSend_378( this.pointer, _sel_initWithIdentity_certificates_persistence_, identity, certArray?.pointer ?? ffi.nullptr, persistence.value); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// credentialWithIdentity:certificates:persistence: static NSURLCredential credentialWithIdentity_certificates_persistence_( ffi.Pointer<__SecIdentity> identity, objc.NSArray? certArray, NSURLCredentialPersistence persistence) { final _ret = _objc_msgSend_379( _class_NSURLCredential, _sel_credentialWithIdentity_certificates_persistence_, identity, certArray?.pointer ?? ffi.nullptr, persistence.value); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// identity ffi.Pointer<__SecIdentity> get identity { return _objc_msgSend_380(this.pointer, _sel_identity); } /// certificates objc.NSArray get certificates { final _ret = _objc_msgSend_32(this.pointer, _sel_certificates); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// initWithTrust: NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { final _ret = _objc_msgSend_381(this.pointer, _sel_initWithTrust_, trust); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// credentialForTrust: static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { final _ret = _objc_msgSend_382( _class_NSURLCredential, _sel_credentialForTrust_, trust); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// init NSURLCredential init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLCredential new1() { final _ret = _objc_msgSend_19(_class_NSURLCredential, _sel_new); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSURLCredential, _sel_allocWithZone_, zone); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLCredential alloc() { final _ret = _objc_msgSend_19(_class_NSURLCredential, _sel_alloc); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLCredential, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLCredential, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSURLCredential, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLCredential, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLCredential, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSURLCredential, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLCredential = objc.getClass("NSURLCredential"); enum NSURLCredentialPersistence { NSURLCredentialPersistenceNone(0), NSURLCredentialPersistenceForSession(1), NSURLCredentialPersistencePermanent(2), NSURLCredentialPersistenceSynchronizable(3); final int value; const NSURLCredentialPersistence(this.value); static NSURLCredentialPersistence fromValue(int value) => switch (value) { 0 => NSURLCredentialPersistenceNone, 1 => NSURLCredentialPersistenceForSession, 2 => NSURLCredentialPersistencePermanent, 3 => NSURLCredentialPersistenceSynchronizable, _ => throw ArgumentError( "Unknown value for NSURLCredentialPersistence: $value"), }; } late final _sel_persistence = objc.registerName("persistence"); final _objc_msgSend_375 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithUser_password_persistence_ = objc.registerName("initWithUser:password:persistence:"); final _objc_msgSend_376 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_credentialWithUser_password_persistence_ = objc.registerName("credentialWithUser:password:persistence:"); final _objc_msgSend_377 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_user = objc.registerName("user"); late final _sel_password = objc.registerName("password"); late final _sel_hasPassword = objc.registerName("hasPassword"); final class __SecIdentity extends ffi.Opaque {} late final _sel_initWithIdentity_certificates_persistence_ = objc.registerName("initWithIdentity:certificates:persistence:"); final _objc_msgSend_378 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecIdentity>, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecIdentity>, ffi.Pointer, int)>(); late final _sel_credentialWithIdentity_certificates_persistence_ = objc.registerName("credentialWithIdentity:certificates:persistence:"); final _objc_msgSend_379 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecIdentity>, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecIdentity>, ffi.Pointer, int)>(); late final _sel_identity = objc.registerName("identity"); final _objc_msgSend_380 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer<__SecIdentity> Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer<__SecIdentity> Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_certificates = objc.registerName("certificates"); final class __SecTrust extends ffi.Opaque {} late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); final _objc_msgSend_381 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecTrust>)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecTrust>)>(); late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); final _objc_msgSend_382 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecTrust>)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecTrust>)>(); /// NSURLProtectionSpace class NSURLProtectionSpace extends objc.NSObject { NSURLProtectionSpace._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLProtectionSpace] that points to the same underlying object as [other]. NSURLProtectionSpace.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLProtectionSpace] that wraps the given raw object pointer. NSURLProtectionSpace.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); } /// initWithHost:port:protocol:realm:authenticationMethod: NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( objc.NSString host, int port, objc.NSString? protocol, objc.NSString? realm, objc.NSString? authenticationMethod) { final _ret = _objc_msgSend_383( this.pointer, _sel_initWithHost_port_protocol_realm_authenticationMethod_, host.pointer, port, protocol?.pointer ?? ffi.nullptr, realm?.pointer ?? ffi.nullptr, authenticationMethod?.pointer ?? ffi.nullptr); return NSURLProtectionSpace.castFromPointer(_ret, retain: true, release: true); } /// initWithProxyHost:port:type:realm:authenticationMethod: NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( objc.NSString host, int port, objc.NSString? type, objc.NSString? realm, objc.NSString? authenticationMethod) { final _ret = _objc_msgSend_383( this.pointer, _sel_initWithProxyHost_port_type_realm_authenticationMethod_, host.pointer, port, type?.pointer ?? ffi.nullptr, realm?.pointer ?? ffi.nullptr, authenticationMethod?.pointer ?? ffi.nullptr); return NSURLProtectionSpace.castFromPointer(_ret, retain: true, release: true); } /// realm objc.NSString? get realm { final _ret = _objc_msgSend_20(this.pointer, _sel_realm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// receivesCredentialSecurely bool get receivesCredentialSecurely { return _objc_msgSend_13(this.pointer, _sel_receivesCredentialSecurely); } /// isProxy bool get isProxy { return _objc_msgSend_13(this.pointer, _sel_isProxy); } /// host objc.NSString get host { final _ret = _objc_msgSend_11(this.pointer, _sel_host); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// port int get port { return _objc_msgSend_250(this.pointer, _sel_port); } /// proxyType objc.NSString? get proxyType { final _ret = _objc_msgSend_20(this.pointer, _sel_proxyType); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// protocol objc.NSString? get protocol { final _ret = _objc_msgSend_20(this.pointer, _sel_protocol); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// authenticationMethod objc.NSString get authenticationMethod { final _ret = _objc_msgSend_11(this.pointer, _sel_authenticationMethod); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// distinguishedNames objc.NSArray? get distinguishedNames { final _ret = _objc_msgSend_87(this.pointer, _sel_distinguishedNames); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// serverTrust ffi.Pointer<__SecTrust> get serverTrust { return _objc_msgSend_384(this.pointer, _sel_serverTrust); } /// init NSURLProtectionSpace init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLProtectionSpace.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLProtectionSpace new1() { final _ret = _objc_msgSend_19(_class_NSURLProtectionSpace, _sel_new); return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28( _class_NSURLProtectionSpace, _sel_allocWithZone_, zone); return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLProtectionSpace alloc() { final _ret = _objc_msgSend_19(_class_NSURLProtectionSpace, _sel_alloc); return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLProtectionSpace, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLProtectionSpace, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13( _class_NSURLProtectionSpace, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLProtectionSpace, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLProtectionSpace, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLProtectionSpace = objc.getClass("NSURLProtectionSpace"); late final _sel_initWithHost_port_protocol_realm_authenticationMethod_ = objc.registerName("initWithHost:port:protocol:realm:authenticationMethod:"); final _objc_msgSend_383 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Long, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc .registerName("initWithProxyHost:port:type:realm:authenticationMethod:"); late final _sel_realm = objc.registerName("realm"); late final _sel_receivesCredentialSecurely = objc.registerName("receivesCredentialSecurely"); late final _sel_isProxy = objc.registerName("isProxy"); late final _sel_host = objc.registerName("host"); late final _sel_proxyType = objc.registerName("proxyType"); late final _sel_protocol = objc.registerName("protocol"); late final _sel_authenticationMethod = objc.registerName("authenticationMethod"); late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); late final _sel_serverTrust = objc.registerName("serverTrust"); final _objc_msgSend_384 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer<__SecTrust> Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer<__SecTrust> Function( ffi.Pointer, ffi.Pointer)>(); /// NSURLCredentialStorage class NSURLCredentialStorage extends objc.NSObject { NSURLCredentialStorage._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. NSURLCredentialStorage.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); } /// sharedCredentialStorage static NSURLCredentialStorage getSharedCredentialStorage() { final _ret = _objc_msgSend_385( _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); return NSURLCredentialStorage.castFromPointer(_ret, retain: true, release: true); } /// credentialsForProtectionSpace: objc.NSDictionary? credentialsForProtectionSpace_( NSURLProtectionSpace space) { final _ret = _objc_msgSend_386( this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// allCredentials objc.NSDictionary get allCredentials { final _ret = _objc_msgSend_256(this.pointer, _sel_allCredentials); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setCredential:forProtectionSpace: void setCredential_forProtectionSpace_( NSURLCredential credential, NSURLProtectionSpace space) { _objc_msgSend_387(this.pointer, _sel_setCredential_forProtectionSpace_, credential.pointer, space.pointer); } /// removeCredential:forProtectionSpace: void removeCredential_forProtectionSpace_( NSURLCredential credential, NSURLProtectionSpace space) { _objc_msgSend_387(this.pointer, _sel_removeCredential_forProtectionSpace_, credential.pointer, space.pointer); } /// removeCredential:forProtectionSpace:options: void removeCredential_forProtectionSpace_options_(NSURLCredential credential, NSURLProtectionSpace space, objc.NSDictionary? options) { _objc_msgSend_388( this.pointer, _sel_removeCredential_forProtectionSpace_options_, credential.pointer, space.pointer, options?.pointer ?? ffi.nullptr); } /// defaultCredentialForProtectionSpace: NSURLCredential? defaultCredentialForProtectionSpace_( NSURLProtectionSpace space) { final _ret = _objc_msgSend_389( this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); return _ret.address == 0 ? null : NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// setDefaultCredential:forProtectionSpace: void setDefaultCredential_forProtectionSpace_( NSURLCredential credential, NSURLProtectionSpace space) { _objc_msgSend_387( this.pointer, _sel_setDefaultCredential_forProtectionSpace_, credential.pointer, space.pointer); } /// getCredentialsForProtectionSpace:task:completionHandler: void getCredentialsForProtectionSpace_task_completionHandler_( NSURLProtectionSpace protectionSpace, NSURLSessionTask task, ObjCBlock_ffiVoid_NSDictionary completionHandler) { _objc_msgSend_390( this.pointer, _sel_getCredentialsForProtectionSpace_task_completionHandler_, protectionSpace.pointer, task.pointer, completionHandler.pointer); } /// setCredential:forProtectionSpace:task: void setCredential_forProtectionSpace_task_(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { _objc_msgSend_391(this.pointer, _sel_setCredential_forProtectionSpace_task_, credential.pointer, protectionSpace.pointer, task.pointer); } /// removeCredential:forProtectionSpace:options:task: void removeCredential_forProtectionSpace_options_task_( NSURLCredential credential, NSURLProtectionSpace protectionSpace, objc.NSDictionary? options, NSURLSessionTask task) { _objc_msgSend_392( this.pointer, _sel_removeCredential_forProtectionSpace_options_task_, credential.pointer, protectionSpace.pointer, options?.pointer ?? ffi.nullptr, task.pointer); } /// getDefaultCredentialForProtectionSpace:task:completionHandler: void getDefaultCredentialForProtectionSpace_task_completionHandler_( NSURLProtectionSpace space, NSURLSessionTask task, ObjCBlock_ffiVoid_NSURLCredential completionHandler) { _objc_msgSend_393( this.pointer, _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, space.pointer, task.pointer, completionHandler.pointer); } /// setDefaultCredential:forProtectionSpace:task: void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { _objc_msgSend_391( this.pointer, _sel_setDefaultCredential_forProtectionSpace_task_, credential.pointer, protectionSpace.pointer, task.pointer); } /// init NSURLCredentialStorage init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLCredentialStorage.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLCredentialStorage new1() { final _ret = _objc_msgSend_19(_class_NSURLCredentialStorage, _sel_new); return NSURLCredentialStorage.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28( _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); return NSURLCredentialStorage.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLCredentialStorage alloc() { final _ret = _objc_msgSend_19(_class_NSURLCredentialStorage, _sel_alloc); return NSURLCredentialStorage.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLCredentialStorage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLCredentialStorage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13( _class_NSURLCredentialStorage, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLCredentialStorage, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLCredentialStorage, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLCredentialStorage = objc.getClass("NSURLCredentialStorage"); late final _sel_sharedCredentialStorage = objc.registerName("sharedCredentialStorage"); final _objc_msgSend_385 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_credentialsForProtectionSpace_ = objc.registerName("credentialsForProtectionSpace:"); final _objc_msgSend_386 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_allCredentials = objc.registerName("allCredentials"); late final _sel_setCredential_forProtectionSpace_ = objc.registerName("setCredential:forProtectionSpace:"); final _objc_msgSend_387 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeCredential_forProtectionSpace_ = objc.registerName("removeCredential:forProtectionSpace:"); late final _sel_removeCredential_forProtectionSpace_options_ = objc.registerName("removeCredential:forProtectionSpace:options:"); final _objc_msgSend_388 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_defaultCredentialForProtectionSpace_ = objc.registerName("defaultCredentialForProtectionSpace:"); final _objc_msgSend_389 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setDefaultCredential_forProtectionSpace_ = objc.registerName("setDefaultCredential:forProtectionSpace:"); void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSDictionary extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSDictionary castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSDictionary._(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. ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSDictionary.fromFunction( void Function(objc.NSDictionary?) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSDictionary.listener(void Function(objc.NSDictionary?) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary( objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSDictionary.castFromPointer(arg0, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(objc.NSDictionary? arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr); } late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); final _objc_msgSend_390 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setCredential_forProtectionSpace_task_ = objc.registerName("setCredential:forProtectionSpace:task:"); final _objc_msgSend_391 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeCredential_forProtectionSpace_options_task_ = objc.registerName("removeCredential:forProtectionSpace:options:task:"); final _objc_msgSend_392 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); class ObjCBlock_ffiVoid_NSURLCredential extends objc.ObjCBlockBase { ObjCBlock_ffiVoid_NSURLCredential._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_NSURLCredential castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { return ObjCBlock_ffiVoid_NSURLCredential._(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. ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newPointerBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// 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. ObjCBlock_ffiVoid_NSURLCredential.fromFunction( void Function(NSURLCredential?) fn) : this._(objc.newClosureBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSURLCredential.castFromPointer(arg0, retain: true, release: true)))); static ffi.Pointer? _dartFuncTrampoline; /// 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. /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. ObjCBlock_ffiVoid_NSURLCredential.listener(void Function(NSURLCredential?) fn) : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSURLCredential( objc.newClosureBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSURLCredential.castFromPointer(arg0, retain: false, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; void call(NSURLCredential? arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer)>()( pointer, arg0?.pointer ?? ffi.nullptr); } late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = objc.registerName( "getDefaultCredentialForProtectionSpace:task:completionHandler:"); final _objc_msgSend_393 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setDefaultCredential_forProtectionSpace_task_ = objc.registerName("setDefaultCredential:forProtectionSpace:task:"); /// NSURLProtocol class NSURLProtocol extends objc.NSObject { NSURLProtocol._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLProtocol] that points to the same underlying object as [other]. NSURLProtocol.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSURLProtocol] that wraps the given raw object pointer. NSURLProtocol.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLProtocol]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); } /// initWithRequest:cachedResponse:client: NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { final _ret = _objc_msgSend_394( this.pointer, _sel_initWithRequest_cachedResponse_client_, request.pointer, cachedResponse?.pointer ?? ffi.nullptr, client?.pointer ?? ffi.nullptr); return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } /// client objc.ObjCObjectBase? get client { final _ret = _objc_msgSend_84(this.pointer, _sel_client); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// request NSURLRequest get request { final _ret = _objc_msgSend_370(this.pointer, _sel_request); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// cachedResponse NSCachedURLResponse? get cachedResponse { final _ret = _objc_msgSend_395(this.pointer, _sel_cachedResponse); return _ret.address == 0 ? null : NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); } /// canInitWithRequest: static bool canInitWithRequest_(NSURLRequest request) { return _objc_msgSend_372( _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); } /// canonicalRequestForRequest: static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { final _ret = _objc_msgSend_396(_class_NSURLProtocol, _sel_canonicalRequestForRequest_, request.pointer); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// requestIsCacheEquivalent:toRequest: static bool requestIsCacheEquivalent_toRequest_( NSURLRequest a, NSURLRequest b) { return _objc_msgSend_397(_class_NSURLProtocol, _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); } /// startLoading void startLoading() { _objc_msgSend_7(this.pointer, _sel_startLoading); } /// stopLoading void stopLoading() { _objc_msgSend_7(this.pointer, _sel_stopLoading); } /// propertyForKey:inRequest: static objc.ObjCObjectBase? propertyForKey_inRequest_( objc.NSString key, NSURLRequest request) { final _ret = _objc_msgSend_398(_class_NSURLProtocol, _sel_propertyForKey_inRequest_, key.pointer, request.pointer); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setProperty:forKey:inRequest: static void setProperty_forKey_inRequest_(objc.ObjCObjectBase value, objc.NSString key, NSMutableURLRequest request) { _objc_msgSend_406(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, value.pointer, key.pointer, request.pointer); } /// removePropertyForKey:inRequest: static void removePropertyForKey_inRequest_( objc.NSString key, NSMutableURLRequest request) { _objc_msgSend_407(_class_NSURLProtocol, _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); } /// registerClass: static bool registerClass_(objc.ObjCObjectBase protocolClass) { return _objc_msgSend_0( _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); } /// unregisterClass: static void unregisterClass_(objc.ObjCObjectBase protocolClass) { _objc_msgSend_27( _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); } /// canInitWithTask: static bool canInitWithTask_(NSURLSessionTask task) { return _objc_msgSend_408( _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); } /// initWithTask:cachedResponse:client: NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { final _ret = _objc_msgSend_409( this.pointer, _sel_initWithTask_cachedResponse_client_, task.pointer, cachedResponse?.pointer ?? ffi.nullptr, client?.pointer ?? ffi.nullptr); return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } /// task NSURLSessionTask? get task { final _ret = _objc_msgSend_410(this.pointer, _sel_task); return _ret.address == 0 ? null : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } /// init NSURLProtocol init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } /// new static NSURLProtocol new1() { final _ret = _objc_msgSend_19(_class_NSURLProtocol, _sel_new); return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSURLProtocol, _sel_allocWithZone_, zone); return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLProtocol alloc() { final _ret = _objc_msgSend_19(_class_NSURLProtocol, _sel_alloc); return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSURLProtocol, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSURLProtocol, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSURLProtocol, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSURLProtocol = objc.getClass("NSURLProtocol"); late final _sel_initWithRequest_cachedResponse_client_ = objc.registerName("initWithRequest:cachedResponse:client:"); final _objc_msgSend_394 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_client = objc.registerName("client"); late final _sel_request = objc.registerName("request"); late final _sel_cachedResponse = objc.registerName("cachedResponse"); final _objc_msgSend_395 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_canInitWithRequest_ = objc.registerName("canInitWithRequest:"); late final _sel_canonicalRequestForRequest_ = objc.registerName("canonicalRequestForRequest:"); final _objc_msgSend_396 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_requestIsCacheEquivalent_toRequest_ = objc.registerName("requestIsCacheEquivalent:toRequest:"); final _objc_msgSend_397 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_startLoading = objc.registerName("startLoading"); late final _sel_stopLoading = objc.registerName("stopLoading"); late final _sel_propertyForKey_inRequest_ = objc.registerName("propertyForKey:inRequest:"); final _objc_msgSend_398 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); /// NSMutableURLRequest class NSMutableURLRequest extends NSURLRequest { NSMutableURLRequest._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. NSMutableURLRequest.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSMutableURLRequest]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_24(this.pointer, _sel_URL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setURL: set URL(objc.NSURL? value) { return _objc_msgSend_25( this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); } /// cachePolicy NSURLRequestCachePolicy get cachePolicy { final _ret = _objc_msgSend_356(this.pointer, _sel_cachePolicy); return NSURLRequestCachePolicy.fromValue(_ret); } /// setCachePolicy: set cachePolicy(NSURLRequestCachePolicy value) { return _objc_msgSend_399(this.pointer, _sel_setCachePolicy_, value.value); } /// timeoutInterval double get timeoutInterval { return objc.useMsgSendVariants ? _objc_msgSend_18Fpret(this.pointer, _sel_timeoutInterval) : _objc_msgSend_18(this.pointer, _sel_timeoutInterval); } /// setTimeoutInterval: set timeoutInterval(double value) { return _objc_msgSend_127(this.pointer, _sel_setTimeoutInterval_, value); } /// mainDocumentURL objc.NSURL? get mainDocumentURL { final _ret = _objc_msgSend_24(this.pointer, _sel_mainDocumentURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setMainDocumentURL: set mainDocumentURL(objc.NSURL? value) { return _objc_msgSend_25( this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); } /// networkServiceType NSURLRequestNetworkServiceType get networkServiceType { final _ret = _objc_msgSend_357(this.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// setNetworkServiceType: set networkServiceType(NSURLRequestNetworkServiceType value) { return _objc_msgSend_400( this.pointer, _sel_setNetworkServiceType_, value.value); } /// allowsCellularAccess bool get allowsCellularAccess { return _objc_msgSend_13(this.pointer, _sel_allowsCellularAccess); } /// setAllowsCellularAccess: set allowsCellularAccess(bool value) { return _objc_msgSend_14(this.pointer, _sel_setAllowsCellularAccess_, value); } /// allowsExpensiveNetworkAccess bool get allowsExpensiveNetworkAccess { return _objc_msgSend_13(this.pointer, _sel_allowsExpensiveNetworkAccess); } /// setAllowsExpensiveNetworkAccess: set allowsExpensiveNetworkAccess(bool value) { return _objc_msgSend_14( this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } /// allowsConstrainedNetworkAccess bool get allowsConstrainedNetworkAccess { return _objc_msgSend_13(this.pointer, _sel_allowsConstrainedNetworkAccess); } /// setAllowsConstrainedNetworkAccess: set allowsConstrainedNetworkAccess(bool value) { return _objc_msgSend_14( this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } /// assumesHTTP3Capable bool get assumesHTTP3Capable { return _objc_msgSend_13(this.pointer, _sel_assumesHTTP3Capable); } /// setAssumesHTTP3Capable: set assumesHTTP3Capable(bool value) { return _objc_msgSend_14(this.pointer, _sel_setAssumesHTTP3Capable_, value); } /// attribution NSURLRequestAttribution get attribution { final _ret = _objc_msgSend_358(this.pointer, _sel_attribution); return NSURLRequestAttribution.fromValue(_ret); } /// setAttribution: set attribution(NSURLRequestAttribution value) { return _objc_msgSend_401(this.pointer, _sel_setAttribution_, value.value); } /// requiresDNSSECValidation bool get requiresDNSSECValidation { return _objc_msgSend_13(this.pointer, _sel_requiresDNSSECValidation); } /// setRequiresDNSSECValidation: set requiresDNSSECValidation(bool value) { return _objc_msgSend_14( this.pointer, _sel_setRequiresDNSSECValidation_, value); } /// HTTPMethod objc.NSString get HTTPMethod { final _ret = _objc_msgSend_11(this.pointer, _sel_HTTPMethod); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setHTTPMethod: set HTTPMethod(objc.NSString value) { return _objc_msgSend_12(this.pointer, _sel_setHTTPMethod_, value.pointer); } /// allHTTPHeaderFields objc.NSDictionary? get allHTTPHeaderFields { final _ret = _objc_msgSend_83(this.pointer, _sel_allHTTPHeaderFields); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setAllHTTPHeaderFields: set allHTTPHeaderFields(objc.NSDictionary? value) { return _objc_msgSend_402(this.pointer, _sel_setAllHTTPHeaderFields_, value?.pointer ?? ffi.nullptr); } /// setValue:forHTTPHeaderField: void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { _objc_msgSend_403(this.pointer, _sel_setValue_forHTTPHeaderField_, value?.pointer ?? ffi.nullptr, field.pointer); } /// addValue:forHTTPHeaderField: void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { _objc_msgSend_116(this.pointer, _sel_addValue_forHTTPHeaderField_, value.pointer, field.pointer); } /// HTTPBody objc.NSData? get HTTPBody { final _ret = _objc_msgSend_359(this.pointer, _sel_HTTPBody); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// setHTTPBody: set HTTPBody(objc.NSData? value) { return _objc_msgSend_404( this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); } /// HTTPBodyStream NSInputStream? get HTTPBodyStream { final _ret = _objc_msgSend_360(this.pointer, _sel_HTTPBodyStream); return _ret.address == 0 ? null : NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// setHTTPBodyStream: set HTTPBodyStream(NSInputStream? value) { return _objc_msgSend_405( this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); } /// HTTPShouldHandleCookies bool get HTTPShouldHandleCookies { return _objc_msgSend_13(this.pointer, _sel_HTTPShouldHandleCookies); } /// setHTTPShouldHandleCookies: set HTTPShouldHandleCookies(bool value) { return _objc_msgSend_14( this.pointer, _sel_setHTTPShouldHandleCookies_, value); } /// HTTPShouldUsePipelining bool get HTTPShouldUsePipelining { return _objc_msgSend_13(this.pointer, _sel_HTTPShouldUsePipelining); } /// setHTTPShouldUsePipelining: set HTTPShouldUsePipelining(bool value) { return _objc_msgSend_14( this.pointer, _sel_setHTTPShouldUsePipelining_, value); } /// requestWithURL: static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { final _ret = _objc_msgSend_354( _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { return _objc_msgSend_13( _class_NSMutableURLRequest, _sel_supportsSecureCoding); } /// requestWithURL:cachePolicy:timeoutInterval: static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { final _ret = _objc_msgSend_355( _class_NSMutableURLRequest, _sel_requestWithURL_cachePolicy_timeoutInterval_, URL.pointer, cachePolicy.value, timeoutInterval); return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); } /// initWithURL: NSMutableURLRequest initWithURL_(objc.NSURL URL) { final _ret = _objc_msgSend_354(this.pointer, _sel_initWithURL_, URL.pointer); return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); } /// initWithURL:cachePolicy:timeoutInterval: NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { final _ret = _objc_msgSend_355( this.pointer, _sel_initWithURL_cachePolicy_timeoutInterval_, URL.pointer, cachePolicy.value, timeoutInterval); return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); } /// init NSMutableURLRequest init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); } /// new static NSMutableURLRequest new1() { final _ret = _objc_msgSend_19(_class_NSMutableURLRequest, _sel_new); return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSMutableURLRequest alloc() { final _ret = _objc_msgSend_19(_class_NSMutableURLRequest, _sel_alloc); return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSMutableURLRequest, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSMutableURLRequest, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSMutableURLRequest, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); late final _sel_setURL_ = objc.registerName("setURL:"); late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); final _objc_msgSend_399 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setTimeoutInterval_ = objc.registerName("setTimeoutInterval:"); late final _sel_setMainDocumentURL_ = objc.registerName("setMainDocumentURL:"); late final _sel_setNetworkServiceType_ = objc.registerName("setNetworkServiceType:"); final _objc_msgSend_400 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setAllowsCellularAccess_ = objc.registerName("setAllowsCellularAccess:"); late final _sel_setAllowsExpensiveNetworkAccess_ = objc.registerName("setAllowsExpensiveNetworkAccess:"); late final _sel_setAllowsConstrainedNetworkAccess_ = objc.registerName("setAllowsConstrainedNetworkAccess:"); late final _sel_setAssumesHTTP3Capable_ = objc.registerName("setAssumesHTTP3Capable:"); late final _sel_setAttribution_ = objc.registerName("setAttribution:"); final _objc_msgSend_401 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setRequiresDNSSECValidation_ = objc.registerName("setRequiresDNSSECValidation:"); late final _sel_setHTTPMethod_ = objc.registerName("setHTTPMethod:"); late final _sel_setAllHTTPHeaderFields_ = objc.registerName("setAllHTTPHeaderFields:"); final _objc_msgSend_402 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setValue_forHTTPHeaderField_ = objc.registerName("setValue:forHTTPHeaderField:"); final _objc_msgSend_403 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_addValue_forHTTPHeaderField_ = objc.registerName("addValue:forHTTPHeaderField:"); late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); final _objc_msgSend_404 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); final _objc_msgSend_405 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setHTTPShouldHandleCookies_ = objc.registerName("setHTTPShouldHandleCookies:"); late final _sel_setHTTPShouldUsePipelining_ = objc.registerName("setHTTPShouldUsePipelining:"); late final _sel_setProperty_forKey_inRequest_ = objc.registerName("setProperty:forKey:inRequest:"); final _objc_msgSend_406 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removePropertyForKey_inRequest_ = objc.registerName("removePropertyForKey:inRequest:"); final _objc_msgSend_407 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_registerClass_ = objc.registerName("registerClass:"); late final _sel_unregisterClass_ = objc.registerName("unregisterClass:"); late final _sel_canInitWithTask_ = objc.registerName("canInitWithTask:"); final _objc_msgSend_408 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithTask_cachedResponse_client_ = objc.registerName("initWithTask:cachedResponse:client:"); final _objc_msgSend_409 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_task = objc.registerName("task"); final _objc_msgSend_410 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); /// NSXMLParser class NSXMLParser extends objc.NSObject { NSXMLParser._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSXMLParser] that points to the same underlying object as [other]. NSXMLParser.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [NSXMLParser] that wraps the given raw object pointer. NSXMLParser.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSXMLParser]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_NSXMLParser); } /// initWithContentsOfURL: NSXMLParser? initWithContentsOfURL_(objc.NSURL url) { final _ret = _objc_msgSend_35( this.pointer, _sel_initWithContentsOfURL_, url.pointer); return _ret.address == 0 ? null : NSXMLParser.castFromPointer(_ret, retain: true, release: true); } /// initWithData: NSXMLParser initWithData_(objc.NSData data) { final _ret = _objc_msgSend_336(this.pointer, _sel_initWithData_, data.pointer); return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } /// initWithStream: NSXMLParser initWithStream_(NSInputStream stream) { final _ret = _objc_msgSend_411(this.pointer, _sel_initWithStream_, stream.pointer); return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_84(this.pointer, _sel_delegate); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: set delegate(objc.ObjCObjectBase? value) { return _objc_msgSend_103( this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } /// shouldProcessNamespaces bool get shouldProcessNamespaces { return _objc_msgSend_13(this.pointer, _sel_shouldProcessNamespaces); } /// setShouldProcessNamespaces: set shouldProcessNamespaces(bool value) { return _objc_msgSend_14( this.pointer, _sel_setShouldProcessNamespaces_, value); } /// shouldReportNamespacePrefixes bool get shouldReportNamespacePrefixes { return _objc_msgSend_13(this.pointer, _sel_shouldReportNamespacePrefixes); } /// setShouldReportNamespacePrefixes: set shouldReportNamespacePrefixes(bool value) { return _objc_msgSend_14( this.pointer, _sel_setShouldReportNamespacePrefixes_, value); } /// externalEntityResolvingPolicy NSXMLParserExternalEntityResolvingPolicy get externalEntityResolvingPolicy { final _ret = _objc_msgSend_412(this.pointer, _sel_externalEntityResolvingPolicy); return NSXMLParserExternalEntityResolvingPolicy.fromValue(_ret); } /// setExternalEntityResolvingPolicy: set externalEntityResolvingPolicy( NSXMLParserExternalEntityResolvingPolicy value) { return _objc_msgSend_413( this.pointer, _sel_setExternalEntityResolvingPolicy_, value.value); } /// allowedExternalEntityURLs objc.NSSet? get allowedExternalEntityURLs { final _ret = _objc_msgSend_414(this.pointer, _sel_allowedExternalEntityURLs); return _ret.address == 0 ? null : objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// setAllowedExternalEntityURLs: set allowedExternalEntityURLs(objc.NSSet? value) { return _objc_msgSend_415(this.pointer, _sel_setAllowedExternalEntityURLs_, value?.pointer ?? ffi.nullptr); } /// parse bool parse() { return _objc_msgSend_13(this.pointer, _sel_parse); } /// abortParsing void abortParsing() { _objc_msgSend_7(this.pointer, _sel_abortParsing); } /// parserError objc.NSError? get parserError { final _ret = _objc_msgSend_333(this.pointer, _sel_parserError); return _ret.address == 0 ? null : objc.NSError.castFromPointer(_ret, retain: true, release: true); } /// shouldResolveExternalEntities bool get shouldResolveExternalEntities { return _objc_msgSend_13(this.pointer, _sel_shouldResolveExternalEntities); } /// setShouldResolveExternalEntities: set shouldResolveExternalEntities(bool value) { return _objc_msgSend_14( this.pointer, _sel_setShouldResolveExternalEntities_, value); } /// publicID objc.NSString? get publicID { final _ret = _objc_msgSend_20(this.pointer, _sel_publicID); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// systemID objc.NSString? get systemID { final _ret = _objc_msgSend_20(this.pointer, _sel_systemID); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// lineNumber int get lineNumber { return _objc_msgSend_250(this.pointer, _sel_lineNumber); } /// columnNumber int get columnNumber { return _objc_msgSend_250(this.pointer, _sel_columnNumber); } /// init NSXMLParser init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } /// new static NSXMLParser new1() { final _ret = _objc_msgSend_19(_class_NSXMLParser, _sel_new); return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28(_class_NSXMLParser, _sel_allocWithZone_, zone); return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSXMLParser alloc() { final _ret = _objc_msgSend_19(_class_NSXMLParser, _sel_alloc); return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13(_class_NSXMLParser, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_NSXMLParser, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_NSXMLParser, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19(_class_NSXMLParser, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSXMLParser = objc.getClass("NSXMLParser"); late final _sel_initWithContentsOfURL_ = objc.registerName("initWithContentsOfURL:"); late final _sel_initWithStream_ = objc.registerName("initWithStream:"); final _objc_msgSend_411 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_shouldProcessNamespaces = objc.registerName("shouldProcessNamespaces"); late final _sel_setShouldProcessNamespaces_ = objc.registerName("setShouldProcessNamespaces:"); late final _sel_shouldReportNamespacePrefixes = objc.registerName("shouldReportNamespacePrefixes"); late final _sel_setShouldReportNamespacePrefixes_ = objc.registerName("setShouldReportNamespacePrefixes:"); enum NSXMLParserExternalEntityResolvingPolicy { NSXMLParserResolveExternalEntitiesNever(0), NSXMLParserResolveExternalEntitiesNoNetwork(1), NSXMLParserResolveExternalEntitiesSameOriginOnly(2), NSXMLParserResolveExternalEntitiesAlways(3); final int value; const NSXMLParserExternalEntityResolvingPolicy(this.value); static NSXMLParserExternalEntityResolvingPolicy fromValue(int value) => switch (value) { 0 => NSXMLParserResolveExternalEntitiesNever, 1 => NSXMLParserResolveExternalEntitiesNoNetwork, 2 => NSXMLParserResolveExternalEntitiesSameOriginOnly, 3 => NSXMLParserResolveExternalEntitiesAlways, _ => throw ArgumentError( "Unknown value for NSXMLParserExternalEntityResolvingPolicy: $value"), }; } late final _sel_externalEntityResolvingPolicy = objc.registerName("externalEntityResolvingPolicy"); final _objc_msgSend_412 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setExternalEntityResolvingPolicy_ = objc.registerName("setExternalEntityResolvingPolicy:"); final _objc_msgSend_413 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_allowedExternalEntityURLs = objc.registerName("allowedExternalEntityURLs"); final _objc_msgSend_414 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setAllowedExternalEntityURLs_ = objc.registerName("setAllowedExternalEntityURLs:"); final _objc_msgSend_415 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_parse = objc.registerName("parse"); late final _sel_abortParsing = objc.registerName("abortParsing"); late final _sel_parserError = objc.registerName("parserError"); late final _sel_shouldResolveExternalEntities = objc.registerName("shouldResolveExternalEntities"); late final _sel_setShouldResolveExternalEntities_ = objc.registerName("setShouldResolveExternalEntities:"); late final _sel_publicID = objc.registerName("publicID"); late final _sel_systemID = objc.registerName("systemID"); late final _sel_lineNumber = objc.registerName("lineNumber"); late final _sel_columnNumber = objc.registerName("columnNumber"); /// ThermionTextureSwift class ThermionTextureSwift extends objc.NSObject { ThermionTextureSwift._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [ThermionTextureSwift] that points to the same underlying object as [other]. ThermionTextureSwift.castFrom(objc.ObjCObjectBase other) : this._(other.pointer, retain: true, release: true); /// Constructs a [ThermionTextureSwift] that wraps the given raw object pointer. ThermionTextureSwift.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [ThermionTextureSwift]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( obj.pointer, _sel_isKindOfClass_, _class_ThermionTextureSwift); } /// cvMetalTextureCache int get cvMetalTextureCache { return _objc_msgSend_157(this.pointer, _sel_cvMetalTextureCache); } /// setCvMetalTextureCache: set cvMetalTextureCache(int value) { return _objc_msgSend_416(this.pointer, _sel_setCvMetalTextureCache_, value); } /// metalDevice objc.ObjCObjectBase? get metalDevice { final _ret = _objc_msgSend_84(this.pointer, _sel_metalDevice); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setMetalDevice: set metalDevice(objc.ObjCObjectBase? value) { return _objc_msgSend_103( this.pointer, _sel_setMetalDevice_, value?.pointer ?? ffi.nullptr); } /// cvMetalTexture int get cvMetalTexture { return _objc_msgSend_157(this.pointer, _sel_cvMetalTexture); } /// setCvMetalTexture: set cvMetalTexture(int value) { return _objc_msgSend_416(this.pointer, _sel_setCvMetalTexture_, value); } /// metalTexture objc.ObjCObjectBase? get metalTexture { final _ret = _objc_msgSend_84(this.pointer, _sel_metalTexture); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setMetalTexture: set metalTexture(objc.ObjCObjectBase? value) { return _objc_msgSend_103( this.pointer, _sel_setMetalTexture_, value?.pointer ?? ffi.nullptr); } /// metalTextureAddress int get metalTextureAddress { return _objc_msgSend_250(this.pointer, _sel_metalTextureAddress); } /// setMetalTextureAddress: set metalTextureAddress(int value) { return _objc_msgSend_251(this.pointer, _sel_setMetalTextureAddress_, value); } /// init ThermionTextureSwift init() { final _ret = _objc_msgSend_19(this.pointer, _sel_init); return ThermionTextureSwift.castFromPointer(_ret, retain: true, release: true); } /// initWithWidth:height: ThermionTextureSwift initWithWidth_height_(int width, int height) { final _ret = _objc_msgSend_417( this.pointer, _sel_initWithWidth_height_, width, height); return ThermionTextureSwift.castFromPointer(_ret, retain: true, release: true); } /// destroyTexture void destroyTexture() { _objc_msgSend_7(this.pointer, _sel_destroyTexture); } /// fillColor void fillColor() { _objc_msgSend_7(this.pointer, _sel_fillColor); } /// getTextureBytes objc.NSData? getTextureBytes() { final _ret = _objc_msgSend_359(this.pointer, _sel_getTextureBytes); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// new static ThermionTextureSwift new1() { final _ret = _objc_msgSend_19(_class_ThermionTextureSwift, _sel_new); return ThermionTextureSwift.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static ThermionTextureSwift allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = _objc_msgSend_28( _class_ThermionTextureSwift, _sel_allocWithZone_, zone); return ThermionTextureSwift.castFromPointer(_ret, retain: false, release: true); } /// alloc static ThermionTextureSwift alloc() { final _ret = _objc_msgSend_19(_class_ThermionTextureSwift, _sel_alloc); return ThermionTextureSwift.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: static void cancelPreviousPerformRequestsWithTarget_selector_object_( objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { _objc_msgSend_29( _class_ThermionTextureSwift, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { _objc_msgSend_27(_class_ThermionTextureSwift, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { return _objc_msgSend_13( _class_ThermionTextureSwift, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_13( _class_ThermionTextureSwift, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { final _ret = _objc_msgSend_30(_class_ThermionTextureSwift, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { return _objc_msgSend_31(_class_ThermionTextureSwift, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = _objc_msgSend_32( _class_ThermionTextureSwift, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = _objc_msgSend_19( _class_ThermionTextureSwift, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_ThermionTextureSwift = objc.getClass("swift_module.ThermionTextureSwift"); late final _sel_cvMetalTextureCache = objc.registerName("cvMetalTextureCache"); late final _sel_setCvMetalTextureCache_ = objc.registerName("setCvMetalTextureCache:"); final _objc_msgSend_416 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_metalDevice = objc.registerName("metalDevice"); late final _sel_setMetalDevice_ = objc.registerName("setMetalDevice:"); late final _sel_cvMetalTexture = objc.registerName("cvMetalTexture"); late final _sel_setCvMetalTexture_ = objc.registerName("setCvMetalTexture:"); late final _sel_metalTexture = objc.registerName("metalTexture"); late final _sel_setMetalTexture_ = objc.registerName("setMetalTexture:"); late final _sel_metalTextureAddress = objc.registerName("metalTextureAddress"); late final _sel_setMetalTextureAddress_ = objc.registerName("setMetalTextureAddress:"); late final _sel_initWithWidth_height_ = objc.registerName("initWithWidth:height:"); final _objc_msgSend_417 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Int64, ffi.Int64)>>() .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int, int)>(); late final _sel_destroyTexture = objc.registerName("destroyTexture"); late final _sel_fillColor = objc.registerName("fillColor"); late final _sel_getTextureBytes = objc.registerName("getTextureBytes");