From 59b0b67f98d2a48a54e39ae5ce45570ec79d10a2 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 16 Oct 2024 12:57:54 +1100 Subject: [PATCH] Regen --- .../objective_c/avf_audio_bindings.dart | 57924 ++++++++-------- .../objective_c/avf_audio_bindings.dart.m | 255 +- .../example/swift/swift_api_bindings.dart | 30915 ++++++--- .../example/swift/swift_api_bindings.dart.m | 241 +- 4 files changed, 51561 insertions(+), 37774 deletions(-) diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index 5b8741abf..2d1445a21 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -10,182 +10,831 @@ // ignore_for_file: type=lint import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; +import 'package:ffi/ffi.dart' as pkg_ffi; -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ksby9f( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1k41wmu( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSDate_bool_bool( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_sjfpmz( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSTimer( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1j7ar3u( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSFileHandle( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_rvgf02( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSError( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ukcdfq( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSError( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1tjlcwl( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSArray( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_hepzs( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_117qins( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSCachedURLResponse( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_9w6y6n( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_tenbla( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_hfhq9m( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSURLCredential( - ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1ej8563( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray( - ffi.Pointer block, -); - -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSArray1( - ffi.Pointer block, -); +late final _class_NSProgress = objc.getClass("NSProgress"); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +final _objc_msgSend_l8lotg = 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_currentProgress = objc.registerName("currentProgress"); +final _objc_msgSend_1unuoxw = 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_n9eq1n = 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_105mybv = 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_iq11qg = 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_becomeCurrentWithPendingUnitCount_ = + objc.registerName("becomeCurrentWithPendingUnitCount:"); +final _objc_msgSend_rrr3q = 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()(); +ffi.Pointer _ObjCBlock_ffiVoid_fnPtrCallable = ffi.Pointer + .fromFunction)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer block, +) => + (objc.getBlockClosure(block) as void Function())(); +ffi.Pointer _ObjCBlock_ffiVoid_closureCallable = ffi.Pointer + .fromFunction)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_listenerTrampoline( + ffi.Pointer block, +) { + (objc.getBlockClosure(block) as void Function())(); + objc.objectRelease(block.cast()); +} -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSData( - ffi.Pointer block, -); +ffi.NativeCallable)> + _ObjCBlock_ffiVoid_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_listenerTrampoline) + ..keepIsolateAlive = false; -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSData_bool_NSError( - ffi.Pointer block, -); +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError( - ffi.Pointer block, -); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError( - ffi.Pointer block, -); + /// 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. + static objc.ObjCBlock fromFunction(void Function() fn) => + objc.ObjCBlock( + objc.newClosureBlock(_ObjCBlock_ffiVoid_closureCallable, () => fn()), + retain: false, + release: true); -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError( - ffi.Pointer block, -); + /// 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. + static objc.ObjCBlock listener(void Function() fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_listenerCallable.nativeFunction.cast(), () => fn()); + final wrapper = _wrapListenerBlock_ksby9f(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer wrapListenerBlock_ObjCBlock_ffiVoid_NSTask( - ffi.Pointer block, -); +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_CallExtension + on objc.ObjCBlock { + void call() => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block)>>() + .asFunction)>()( + ref.pointer, + ); +} -@ffi.Native Function(ffi.Pointer)>( - isLeaf: true) -external ffi.Pointer - wrapListenerBlock_ObjCBlock_ffiVoid_bool_NSError( - ffi.Pointer block, -); +late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = + objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); +final _objc_msgSend_19q84do = 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_ksby9f = 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_2citz1 = 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_1voti03 = 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:"); +late final _sel_completedUnitCount = objc.registerName("completedUnitCount"); +late final _sel_setCompletedUnitCount_ = + objc.registerName("setCompletedUnitCount:"); +late final _sel_localizedDescription = + objc.registerName("localizedDescription"); +late final _sel_setLocalizedDescription_ = + objc.registerName("setLocalizedDescription:"); +final _objc_msgSend_ukcdfq = 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_olxnu1 = 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_117qins = 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_2osec1 = 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:"); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_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); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_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); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline( + 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); + objc.objectRelease(block.cast()); +} -/// NSProgress -class NSProgress extends objc.NSObject { - NSProgress._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline) + ..keepIsolateAlive = false; - /// Constructs a [NSProgress] that points to the same underlying object as [other]. - NSProgress.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); - /// Constructs a [NSProgress] that wraps the given raw object pointer. - NSProgress.castFromPointer(ffi.Pointer other, + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer, ffi.Pointer)> + fromFunction(void Function(objc.ObjCObjectBase, objc.ObjCObjectBase, ffi.Pointer) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + arg2)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> listener( + void Function( + objc.ObjCObjectBase, objc.ObjCObjectBase, ffi.Pointer) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(objc.ObjCObjectBase(arg0, retain: false, release: true), + objc.ObjCObjectBase(arg1, retain: false, release: true), arg2)); + final wrapper = _wrapListenerBlock_1k41wmu(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + void call(objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1, + ffi.Pointer arg2) => + ref.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)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2); +} + +final _objc_msgSend_4daxhl = 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_1tjlcwl = 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_10noklm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_10noklmFpret = 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"); +late final _sel_kind = objc.registerName("kind"); +late final _sel_setKind_ = objc.registerName("setKind:"); +late final _sel_estimatedTimeRemaining = + objc.registerName("estimatedTimeRemaining"); +late final _sel_setEstimatedTimeRemaining_ = + objc.registerName("setEstimatedTimeRemaining:"); +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"); +late final _sel_setFileURL_ = objc.registerName("setFileURL:"); +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_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock? Function(NSProgress)>`. +abstract final class ObjCBlock_ffiVoid_NSProgress { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock? Function(NSProgress)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.ObjCBlock? Function( + 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. + static objc + .ObjCBlock? Function(NSProgress)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSProgress_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress)> fromFunction( + objc.ObjCBlock? Function(NSProgress) fn) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSProgress_closureCallable, + (ffi.Pointer arg0) => + fn(NSProgress.castFromPointer(arg0, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock? Function(NSProgress)>`. +extension ObjCBlock_ffiVoid_NSProgress_CallExtension on objc + .ObjCBlock? Function(NSProgress)> { + objc.ObjCBlock? call(NSProgress arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0.ref.pointer) + .address == + 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer( + ref.pointer.ref.invoke + .cast Function(ffi.Pointer block, ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0.ref.pointer), + retain: true, + release: true); +} + +late final _sel_addSubscriberForFileURL_withPublishingHandler_ = + objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); +final _objc_msgSend_1kkhn3j = 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:"); +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_1b3ihd0 = 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_cqxsqq = 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_juohf7 = 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:"); +late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = + objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); +late final _sel_classFallbacksForKeyedArchiver = + objc.registerName("classFallbacksForKeyedArchiver"); +late final _sel_classForKeyedUnarchiver = + objc.registerName("classForKeyedUnarchiver"); + +/// 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.ref.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); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSProgress); } /// currentProgress static NSProgress? currentProgress() { - final _ret = _objc_msgSend_1(_class_NSProgress, _sel_currentProgress); + final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_currentProgress); return _ret.address == 0 ? null : NSProgress.castFromPointer(_ret, retain: true, release: true); @@ -193,14 +842,14 @@ class NSProgress extends objc.NSObject { /// progressWithTotalUnitCount: static NSProgress progressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_2( + final _ret = _objc_msgSend_n9eq1n( _class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// discreteProgressWithTotalUnitCount: static NSProgress discreteProgressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_2( + final _ret = _objc_msgSend_n9eq1n( _class_NSProgress, _sel_discreteProgressWithTotalUnitCount_, unitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } @@ -208,11 +857,11 @@ class NSProgress extends objc.NSObject { /// progressWithTotalUnitCount:parent:pendingUnitCount: static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( int unitCount, NSProgress parent, int portionOfParentTotalUnitCount) { - final _ret = _objc_msgSend_3( + final _ret = _objc_msgSend_105mybv( _class_NSProgress, _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, unitCount, - parent.pointer, + parent.ref.pointer, portionOfParentTotalUnitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } @@ -220,206 +869,210 @@ class NSProgress extends objc.NSObject { /// initWithParent:userInfo: NSProgress initWithParent_userInfo_( NSProgress? parentProgressOrNil, objc.ObjCObjectBase? userInfoOrNil) { - final _ret = _objc_msgSend_4( - this.pointer, + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), _sel_initWithParent_userInfo_, - parentProgressOrNil?.pointer ?? ffi.nullptr, - userInfoOrNil?.pointer ?? ffi.nullptr); - return NSProgress.castFromPointer(_ret, retain: true, release: true); + parentProgressOrNil?.ref.pointer ?? ffi.nullptr, + userInfoOrNil?.ref.pointer ?? ffi.nullptr); + return NSProgress.castFromPointer(_ret, retain: false, release: true); } /// becomeCurrentWithPendingUnitCount: void becomeCurrentWithPendingUnitCount_(int unitCount) { - _objc_msgSend_5( - this.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); + _objc_msgSend_rrr3q( + this.ref.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); } /// performAsCurrentWithPendingUnitCount:usingBlock: void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock_ffiVoid work) { - _objc_msgSend_6( - this.pointer, + int unitCount, objc.ObjCBlock work) { + _objc_msgSend_19q84do( + this.ref.pointer, _sel_performAsCurrentWithPendingUnitCount_usingBlock_, unitCount, - work.pointer); + work.ref.pointer); } /// resignCurrent void resignCurrent() { - _objc_msgSend_7(this.pointer, _sel_resignCurrent); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resignCurrent); } /// addChild:withPendingUnitCount: void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { - _objc_msgSend_8(this.pointer, _sel_addChild_withPendingUnitCount_, - child.pointer, inUnitCount); + _objc_msgSend_2citz1(this.ref.pointer, _sel_addChild_withPendingUnitCount_, + child.ref.pointer, inUnitCount); } /// totalUnitCount int get totalUnitCount { - return _objc_msgSend_9(this.pointer, _sel_totalUnitCount); + return _objc_msgSend_1voti03(this.ref.pointer, _sel_totalUnitCount); } /// setTotalUnitCount: set totalUnitCount(int value) { - return _objc_msgSend_10(this.pointer, _sel_setTotalUnitCount_, value); + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setTotalUnitCount_, value); } /// completedUnitCount int get completedUnitCount { - return _objc_msgSend_9(this.pointer, _sel_completedUnitCount); + return _objc_msgSend_1voti03(this.ref.pointer, _sel_completedUnitCount); } /// setCompletedUnitCount: set completedUnitCount(int value) { - return _objc_msgSend_10(this.pointer, _sel_setCompletedUnitCount_, value); + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCompletedUnitCount_, value); } /// localizedDescription objc.NSString get localizedDescription { - final _ret = _objc_msgSend_11(this.pointer, _sel_localizedDescription); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocalizedDescription_, value.ref.pointer); } /// localizedAdditionalDescription objc.NSString get localizedAdditionalDescription { - final _ret = - _objc_msgSend_11(this.pointer, _sel_localizedAdditionalDescription); + final _ret = _objc_msgSend_1unuoxw( + this.ref.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); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setLocalizedAdditionalDescription_, value.ref.pointer); } /// isCancellable bool get cancellable { - return _objc_msgSend_13(this.pointer, _sel_isCancellable); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancellable); } /// setCancellable: set cancellable(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setCancellable_, value); + return _objc_msgSend_117qins(this.ref.pointer, _sel_setCancellable_, value); } /// isPausable bool get pausable { - return _objc_msgSend_13(this.pointer, _sel_isPausable); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPausable); } /// setPausable: set pausable(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setPausable_, value); + return _objc_msgSend_117qins(this.ref.pointer, _sel_setPausable_, value); } /// isCancelled bool get cancelled { - return _objc_msgSend_13(this.pointer, _sel_isCancelled); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); } /// isPaused bool get paused { - return _objc_msgSend_13(this.pointer, _sel_isPaused); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPaused); } /// cancellationHandler - ObjCBlock_ffiVoid? get cancellationHandler { - final _ret = _objc_msgSend_15(this.pointer, _sel_cancellationHandler); + objc.ObjCBlock? get cancellationHandler { + final _ret = + _objc_msgSend_2osec1(this.ref.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); + set cancellationHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCancellationHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// pausingHandler - ObjCBlock_ffiVoid? get pausingHandler { - final _ret = _objc_msgSend_15(this.pointer, _sel_pausingHandler); + objc.ObjCBlock? get pausingHandler { + final _ret = _objc_msgSend_2osec1(this.ref.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); + set pausingHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setPausingHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// resumingHandler - ObjCBlock_ffiVoid? get resumingHandler { - final _ret = _objc_msgSend_15(this.pointer, _sel_resumingHandler); + objc.ObjCBlock? get resumingHandler { + final _ret = _objc_msgSend_2osec1(this.ref.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); + set resumingHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setResumingHandler_, + value?.ref.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); + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setUserInfoObject_forKey_, + objectOrNil?.ref.pointer ?? ffi.nullptr, key.ref.pointer); } /// isIndeterminate bool get indeterminate { - return _objc_msgSend_13(this.pointer, _sel_isIndeterminate); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isIndeterminate); } /// fractionCompleted double get fractionCompleted { return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_fractionCompleted) - : _objc_msgSend_18(this.pointer, _sel_fractionCompleted); + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_fractionCompleted) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_fractionCompleted); } /// isFinished bool get finished { - return _objc_msgSend_13(this.pointer, _sel_isFinished); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); } /// cancel void cancel() { - _objc_msgSend_7(this.pointer, _sel_cancel); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } /// pause void pause() { - _objc_msgSend_7(this.pointer, _sel_pause); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_pause); } /// resume void resume() { - _objc_msgSend_7(this.pointer, _sel_resume); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); } /// userInfo objc.ObjCObjectBase get userInfo { - final _ret = _objc_msgSend_19(this.pointer, _sel_userInfo); + final _ret = _objc_msgSend_1unuoxw(this.ref.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); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_kind); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -427,13 +1080,14 @@ class NSProgress extends objc.NSObject { /// setKind: set kind(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setKind_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setKind_, value?.ref.pointer ?? ffi.nullptr); } /// estimatedTimeRemaining objc.NSNumber? get estimatedTimeRemaining { - final _ret = _objc_msgSend_22(this.pointer, _sel_estimatedTimeRemaining); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_estimatedTimeRemaining); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -441,13 +1095,13 @@ class NSProgress extends objc.NSObject { /// setEstimatedTimeRemaining: set estimatedTimeRemaining(objc.NSNumber? value) { - return _objc_msgSend_23(this.pointer, _sel_setEstimatedTimeRemaining_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setEstimatedTimeRemaining_, value?.ref.pointer ?? ffi.nullptr); } /// throughput objc.NSNumber? get throughput { - final _ret = _objc_msgSend_22(this.pointer, _sel_throughput); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_throughput); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -455,13 +1109,14 @@ class NSProgress extends objc.NSObject { /// setThroughput: set throughput(objc.NSNumber? value) { - return _objc_msgSend_23( - this.pointer, _sel_setThroughput_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setThroughput_, + value?.ref.pointer ?? ffi.nullptr); } /// fileOperationKind objc.NSString? get fileOperationKind { - final _ret = _objc_msgSend_20(this.pointer, _sel_fileOperationKind); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileOperationKind); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -469,13 +1124,13 @@ class NSProgress extends objc.NSObject { /// setFileOperationKind: set fileOperationKind(objc.NSString? value) { - return _objc_msgSend_21(this.pointer, _sel_setFileOperationKind_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileOperationKind_, + value?.ref.pointer ?? ffi.nullptr); } /// fileURL objc.NSURL? get fileURL { - final _ret = _objc_msgSend_24(this.pointer, _sel_fileURL); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); @@ -483,13 +1138,13 @@ class NSProgress extends objc.NSObject { /// setFileURL: set fileURL(objc.NSURL? value) { - return _objc_msgSend_25( - this.pointer, _sel_setFileURL_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFileURL_, value?.ref.pointer ?? ffi.nullptr); } /// fileTotalCount objc.NSNumber? get fileTotalCount { - final _ret = _objc_msgSend_22(this.pointer, _sel_fileTotalCount); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileTotalCount); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -497,13 +1152,14 @@ class NSProgress extends objc.NSObject { /// setFileTotalCount: set fileTotalCount(objc.NSNumber? value) { - return _objc_msgSend_23( - this.pointer, _sel_setFileTotalCount_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileTotalCount_, + value?.ref.pointer ?? ffi.nullptr); } /// fileCompletedCount objc.NSNumber? get fileCompletedCount { - final _ret = _objc_msgSend_22(this.pointer, _sel_fileCompletedCount); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileCompletedCount); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -511,63 +1167,67 @@ class NSProgress extends objc.NSObject { /// setFileCompletedCount: set fileCompletedCount(objc.NSNumber? value) { - return _objc_msgSend_23(this.pointer, _sel_setFileCompletedCount_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileCompletedCount_, + value?.ref.pointer ?? ffi.nullptr); } /// publish void publish() { - _objc_msgSend_7(this.pointer, _sel_publish); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); } /// unpublish void unpublish() { - _objc_msgSend_7(this.pointer, _sel_unpublish); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_unpublish); } /// addSubscriberForFileURL:withPublishingHandler: static objc.ObjCObjectBase addSubscriberForFileURL_withPublishingHandler_( - objc.NSURL url, ObjCBlock_ffiVoid_NSProgress publishingHandler) { - final _ret = _objc_msgSend_26( + objc.NSURL url, + objc.ObjCBlock? Function(NSProgress)> + publishingHandler) { + final _ret = _objc_msgSend_1kkhn3j( _class_NSProgress, _sel_addSubscriberForFileURL_withPublishingHandler_, - url.pointer, - publishingHandler.pointer); + url.ref.pointer, + publishingHandler.ref.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); + _objc_msgSend_ukcdfq( + _class_NSProgress, _sel_removeSubscriber_, subscriber.ref.pointer); } /// isOld bool get old { - return _objc_msgSend_13(this.pointer, _sel_isOld); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isOld); } /// init NSProgress init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSProgress.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSProgress.castFromPointer(_ret, retain: false, release: true); } /// new static NSProgress new1() { - final _ret = _objc_msgSend_19(_class_NSProgress, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_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); + final _ret = + _objc_msgSend_1b3ihd0(_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); + final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_alloc); return NSProgress.castFromPointer(_ret, retain: false, release: true); } @@ -576,58 +1236,58 @@ class NSProgress extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSProgress, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSProgress, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSProgress, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSProgress, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSProgress, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSProgress, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSProgress, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSProgress, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSProgress, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSProgress, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSProgress, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -635,129 +1295,330 @@ class NSProgress extends objc.NSObject { /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = - _objc_msgSend_19(_class_NSProgress, _sel_classForKeyedUnarchiver); + _objc_msgSend_1unuoxw(_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 +late final _class_NSBundle = objc.getClass("NSBundle"); +late final _sel_mainBundle = objc.registerName("mainBundle"); +late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); +late final _sel_initWithPath_ = objc.registerName("initWithPath:"); +late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); +late final _sel_initWithURL_ = objc.registerName("initWithURL:"); +late final _sel_bundleForClass_ = objc.registerName("bundleForClass:"); +late final _sel_bundleWithIdentifier_ = + objc.registerName("bundleWithIdentifier:"); +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_1rk90ll = 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)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() .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 + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); +late final _sel_bundleURL = objc.registerName("bundleURL"); +late final _sel_resourceURL = objc.registerName("resourceURL"); +late final _sel_executableURL = objc.registerName("executableURL"); +late final _sel_URLForAuxiliaryExecutable_ = + objc.registerName("URLForAuxiliaryExecutable:"); +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:"); +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_1qje3rk = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer, - ffi.Int64)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .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 + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_aud7dn = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, 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())(); +late final _sel_URLForResource_withExtension_ = + objc.registerName("URLForResource:withExtension:"); +late final _sel_URLForResource_withExtension_subdirectory_ = + objc.registerName("URLForResource:withExtension:subdirectory:"); +late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc + .registerName("URLForResource:withExtension:subdirectory:localization:"); +late final _sel_URLsForResourcesWithExtension_subdirectory_ = + objc.registerName("URLsForResourcesWithExtension:subdirectory:"); +late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc + .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); +late final _sel_pathForResource_ofType_inDirectory_ = + objc.registerName("pathForResource:ofType:inDirectory:"); +late final _sel_pathsForResourcesOfType_inDirectory_ = + objc.registerName("pathsForResourcesOfType:inDirectory:"); +late final _sel_pathForResource_ofType_ = + objc.registerName("pathForResource:ofType:"); +late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = + objc.registerName("pathForResource:ofType:inDirectory:forLocalization:"); +late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = + objc.registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); +late final _sel_localizedStringForKey_value_table_ = + objc.registerName("localizedStringForKey:value:table:"); +late final _class_NSAttributedString = objc.getClass("NSAttributedString"); +late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSZone>)>( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer<_NSZone>))(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSZone>)>( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_NSZone { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer<_NSZone>) fn) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable, + (ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) => + fn(arg0, arg1).ref.retainAndReturnPointer()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_NSZone_CallExtension + on objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSZone>)>()(ref.pointer, arg0, arg1), + retain: false, + release: true); +} -class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); +late final _sel_mutableCopyWithZone_ = + objc.registerName("mutableCopyWithZone:"); +late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_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); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, objc.NSCoder)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// 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); - } + static objc.ObjCBlock, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + objc.NSCoder)>(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; + static objc.ObjCBlock, objc.NSCoder)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock, objc.NSCoder)> + fromFunction(void Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + objc.NSCoder.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -768,1083 +1629,1553 @@ class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { /// /// 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 + static objc.ObjCBlock, objc.NSCoder)> + listener(void Function(ffi.Pointer, objc.NSCoder) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + objc.NSCoder.castFromPointer(arg1, retain: false, release: true))); + final wrapper = _wrapListenerBlock_sjfpmz(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSCoder)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, objc.NSCoder)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock, objc.NSCoder)> { + void call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block)>>() - .asFunction)>()( - pointer, - ); + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); } -late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = - objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); -final _objc_msgSend_6 = objc.msgSendPointer +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as instancetype Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. +abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, + objc.NSCoder)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)>( + objc.newPointerBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> fromFunction( + Dartinstancetype? Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndReturnPointer() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. +extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> { + Dartinstancetype? call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0, arg1.ref.pointer) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer), + retain: false, + release: true); +} + +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); +bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_bool_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + bool Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_ffiVoid_CallExtension + on objc.ObjCBlock)> { + bool call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} + +late final _sel_string = objc.registerName("string"); +late final _sel_attributesAtIndex_effectiveRange_ = + objc.registerName("attributesAtIndex:effectiveRange:"); +final _objc_msgSend_1lz7qql = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int64, - ffi.Pointer)>>() + ffi.UnsignedLong, + 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 + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); +late final _sel_length = objc.registerName("length"); +final _objc_msgSend_eldhrq = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_addChild_withPendingUnitCount_ = - objc.registerName("addChild:withPendingUnitCount:"); -final _objc_msgSend_8 = objc.msgSendPointer +late final _sel_attribute_atIndex_effectiveRange_ = + objc.registerName("attribute:atIndex:effectiveRange:"); +final _objc_msgSend_6erk1e = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int64)>>() + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer 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 + int, + ffi.Pointer)>(); +late final _sel_attributedSubstringFromRange_ = + objc.registerName("attributedSubstringFromRange:"); +final _objc_msgSend_176f8tz = 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)>>() + ffi.Pointer, objc.NSRange)>>() .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 + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>(); +late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = + objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_7mxs62 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer, + objc.NSRange)>>() .asFunction< - void Function( + ffi.Pointer 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 + int, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = + objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_1hy2clh = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer 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)>>() + ffi.UnsignedLong, + ffi.Pointer, + objc.NSRange)>>() .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) => + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_isEqualToAttributedString_ = + objc.registerName("isEqualToAttributedString:"); +late final _sel_initWithString_ = objc.registerName("initWithString:"); +late final _sel_initWithString_attributes_ = + objc.registerName("initWithString:attributes:"); +late final _sel_initWithAttributedString_ = + objc.registerName("initWithAttributedString:"); + +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, + objc.NSRange arg1, + ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() + ffi.Void Function(ffi.Pointer arg0, + objc.NSRange arg1, ffi.Pointer arg2)>>() .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); + void Function(ffi.Pointer, objc.NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} -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); +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { /// 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); - } + static objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)>( + 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; + static objc + .ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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); -} + static objc.ObjCBlock< + ffi.Void Function(objc.NSDictionary, objc.NSRange, ffi.Pointer)> + fromFunction(void Function(objc.NSDictionary, objc.NSRange, ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureCallable, + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)), + 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"); + /// 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. + static objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> listener( + void Function(objc.NSDictionary, objc.NSRange, ffi.Pointer) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn( + objc.NSDictionary.castFromPointer(arg0, + retain: false, release: true), + arg1, + arg2)); + final wrapper = _wrapListenerBlock_1j7ar3u(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSDictionary, objc.NSRange, + ffi.Pointer)>(wrapper, retain: false, release: true); + } +} -final class _NSZone extends ffi.Opaque {} +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> { + void call(objc.NSDictionary arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1, arg2); +} -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 +late final _sel_enumerateAttributesInRange_options_usingBlock_ = + objc.registerName("enumerateAttributesInRange:options:usingBlock:"); +final _objc_msgSend_1g4s41q = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + objc.NSRange, + ffi.UnsignedLong, + 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( + objc.NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + objc.NSRange arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, objc.NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange, ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = - objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); -final _objc_msgSend_32 = objc.msgSendPointer + objc.NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock?, objc.NSRange, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, ffi.Pointer)> + fromFunction(void Function(objc.ObjCObjectBase?, objc.NSRange, ffi.Pointer) fn) => + objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureCallable, + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: true, release: true), arg1, arg2)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> listener( + void Function(objc.ObjCObjectBase?, objc.NSRange, ffi.Pointer) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: false, release: true), + arg1, + arg2)); + final wrapper = _wrapListenerBlock_1j7ar3u(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> { + void call(objc.ObjCObjectBase? arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateAttribute_inRange_options_usingBlock_ = + objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); +final _objc_msgSend_o0ok8d = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + objc.NSRange, + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_classFallbacksForKeyedArchiver = - objc.registerName("classFallbacksForKeyedArchiver"); -final _objc_msgSend_33 = objc.msgSendPointer + objc.NSRange, + int, + ffi.Pointer)>(); +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_1pa46zt = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_classForKeyedUnarchiver = - objc.registerName("classForKeyedUnarchiver"); -final _objc_msgSend_0 = objc.msgSendPointer +late final _sel_setInterpretedSyntax_ = + objc.registerName("setInterpretedSyntax:"); +final _objc_msgSend_1fjzvvc = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .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); + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// Returns whether [obj] is an instance of [NSBundle]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); - } +enum NSAttributedStringMarkdownParsingFailurePolicy { + NSAttributedStringMarkdownParsingFailureReturnError(0), + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible(1); - /// mainBundle - static NSBundle getMainBundle() { - final _ret = _objc_msgSend_34(_class_NSBundle, _sel_mainBundle); - return NSBundle.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSAttributedStringMarkdownParsingFailurePolicy(this.value); - /// bundleWithPath: - static NSBundle? bundleWithPath_(objc.NSString path) { - final _ret = - _objc_msgSend_35(_class_NSBundle, _sel_bundleWithPath_, path.pointer); - return _ret.address == 0 - ? null - : NSBundle.castFromPointer(_ret, retain: true, release: true); - } + static NSAttributedStringMarkdownParsingFailurePolicy fromValue(int value) => + switch (value) { + 0 => NSAttributedStringMarkdownParsingFailureReturnError, + 1 => + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, + _ => throw ArgumentError( + "Unknown value for NSAttributedStringMarkdownParsingFailurePolicy: $value"), + }; +} - /// initWithPath: - NSBundle? initWithPath_(objc.NSString path) { - final _ret = - _objc_msgSend_35(this.pointer, _sel_initWithPath_, path.pointer); - return _ret.address == 0 - ? null - : NSBundle.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_failurePolicy = objc.registerName("failurePolicy"); +final _objc_msgSend_gdi6fo = 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_9ynxkb = 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_self = objc.registerName("self"); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_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_objcObjCObject_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock Function(ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release); - /// bundleWithURL: - static NSBundle? bundleWithURL_(objc.NSURL url) { - final _ret = - _objc_msgSend_36(_class_NSBundle, _sel_bundleWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSBundle.castFromPointer(_ret, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// initWithURL: - NSBundle? initWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_36(this.pointer, _sel_initWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSBundle.castFromPointer(_ret, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock Function(ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} - /// bundleForClass: - static NSBundle bundleForClass_(objc.ObjCObjectBase aClass) { - final _ret = - _objc_msgSend_37(_class_NSBundle, _sel_bundleForClass_, aClass.pointer); - return NSBundle.castFromPointer(_ret, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc + .ObjCBlock Function(ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} - /// bundleWithIdentifier: - static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { - final _ret = _objc_msgSend_38( - _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); - return _ret.address == 0 - ? null - : NSBundle.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_retain = objc.registerName("retain"); +late final _sel_autorelease = objc.registerName("autorelease"); - /// allBundles - static objc.NSArray getAllBundles() { - final _ret = _objc_msgSend_33(_class_NSBundle, _sel_allBundles); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } +/// NSAttributedStringMarkdownParsingOptions +class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { + NSAttributedStringMarkdownParsingOptions._( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// allFrameworks - static objc.NSArray getAllFrameworks() { - final _ret = _objc_msgSend_33(_class_NSBundle, _sel_allFrameworks); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + /// Constructs a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. + NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// load - bool load() { - return _objc_msgSend_13(this.pointer, _sel_load); + /// 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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSAttributedStringMarkdownParsingOptions); } - /// isLoaded - bool get loaded { - return _objc_msgSend_13(this.pointer, _sel_isLoaded); + /// init + NSAttributedStringMarkdownParsingOptions init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - /// unload - bool unload() { - return _objc_msgSend_13(this.pointer, _sel_unload); + /// allowsExtendedAttributes + bool get allowsExtendedAttributes { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExtendedAttributes); } - /// preflightAndReturnError: - bool preflightAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_39(this.pointer, _sel_preflightAndReturnError_, error); + /// setAllowsExtendedAttributes: + set allowsExtendedAttributes(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExtendedAttributes_, value); } - /// loadAndReturnError: - bool loadAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_39(this.pointer, _sel_loadAndReturnError_, error); + /// interpretedSyntax + NSAttributedStringMarkdownInterpretedSyntax get interpretedSyntax { + final _ret = + _objc_msgSend_1pa46zt(this.ref.pointer, _sel_interpretedSyntax); + return NSAttributedStringMarkdownInterpretedSyntax.fromValue(_ret); } - /// bundleURL - objc.NSURL get bundleURL { - final _ret = _objc_msgSend_40(this.pointer, _sel_bundleURL); - return objc.NSURL.castFromPointer(_ret, retain: true, release: true); + /// setInterpretedSyntax: + set interpretedSyntax(NSAttributedStringMarkdownInterpretedSyntax value) { + return _objc_msgSend_1fjzvvc( + this.ref.pointer, _sel_setInterpretedSyntax_, value.value); } - /// 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); + /// failurePolicy + NSAttributedStringMarkdownParsingFailurePolicy get failurePolicy { + final _ret = _objc_msgSend_gdi6fo(this.ref.pointer, _sel_failurePolicy); + return NSAttributedStringMarkdownParsingFailurePolicy.fromValue(_ret); } - /// 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); + /// setFailurePolicy: + set failurePolicy(NSAttributedStringMarkdownParsingFailurePolicy value) { + return _objc_msgSend_9ynxkb( + this.ref.pointer, _sel_setFailurePolicy_, value.value); } - /// URLForAuxiliaryExecutable: - objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { - final _ret = _objc_msgSend_41( - this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); + /// languageCode + objc.NSString? get languageCode { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_languageCode); return _ret.address == 0 ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.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); + /// setLanguageCode: + set languageCode(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLanguageCode_, + value?.ref.pointer ?? ffi.nullptr); } - /// 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); + /// appliesSourcePositionAttributes + bool get appliesSourcePositionAttributes { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_appliesSourcePositionAttributes); } - /// 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); + /// setAppliesSourcePositionAttributes: + set appliesSourcePositionAttributes(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAppliesSourcePositionAttributes_, value); } - /// 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); + /// new + static NSAttributedStringMarkdownParsingOptions new1() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedStringMarkdownParsingOptions, _sel_new); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, 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); + /// allocWithZone: + static NSAttributedStringMarkdownParsingOptions allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_allocWithZone_, + zone); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, 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); + /// alloc + static NSAttributedStringMarkdownParsingOptions alloc() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, 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); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } - /// 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); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } - /// pathForAuxiliaryExecutable: - objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { - final _ret = _objc_msgSend_42( - this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1(_class_NSAttributedStringMarkdownParsingOptions, + _sel_accessInstanceVariablesDirectly); } - /// 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); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSAttributedStringMarkdownParsingOptions, + _sel_useStoredAccessor); } - /// 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); + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_keyPathsForValuesAffectingValueForKey_, + key.ref.pointer); + return objc.NSSet.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); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSAttributedStringMarkdownParsingOptions, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } - /// 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); + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } - /// 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_43( - _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); + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.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_44( - _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); + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// URLForResource:withExtension: - objc.NSURL? URLForResource_withExtension_( - objc.NSString? name, objc.NSString? ext) { - final _ret = _objc_msgSend_45( - 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); + /// self + NSAttributedStringMarkdownParsingOptions self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSAttributedStringMarkdownParsingOptions.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_46( - 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); + /// retain + NSAttributedStringMarkdownParsingOptions retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSAttributedStringMarkdownParsingOptions.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_47( - 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); + /// autorelease + NSAttributedStringMarkdownParsingOptions autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); } +} - /// URLsForResourcesWithExtension:subdirectory: - objc.NSArray? URLsForResourcesWithExtension_subdirectory_( - objc.NSString? ext, objc.NSString? subpath) { - final _ret = _objc_msgSend_48( - 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); - } +late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = + objc.registerName( + "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); +final _objc_msgSend_w9wiqt = 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:"); +late final _sel_initWithMarkdownString_options_baseURL_error_ = + objc.registerName("initWithMarkdownString:options:baseURL:error:"); - /// URLsForResourcesWithExtension:subdirectory:localization: - objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( - objc.NSString? ext, - objc.NSString? subpath, - objc.NSString? localizationName) { - final _ret = _objc_msgSend_49( - 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); +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_4x8h9q = 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_localizedAttributedStringWithFormat_ = + objc.registerName("localizedAttributedStringWithFormat:"); +late final _sel_localizedAttributedStringWithFormat_options_ = + objc.registerName("localizedAttributedStringWithFormat:options:"); +final _objc_msgSend_1vfncet = 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_xvcwe5 = 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_context_ = + objc.registerName("localizedAttributedStringWithFormat:context:"); +late final _sel_localizedAttributedStringWithFormat_options_context_ = + objc.registerName("localizedAttributedStringWithFormat:options:context:"); +late final _sel_attributedStringByInflectingString = + objc.registerName("attributedStringByInflectingString"); + +/// 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.ref.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_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSAttributedString); } - /// pathForResource:ofType:inDirectory: - objc.NSString? pathForResource_ofType_inDirectory_( - objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { - final _ret = _objc_msgSend_50( - 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); + /// string + objc.NSString get string { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// pathsForResourcesOfType:inDirectory: - objc.NSArray pathsForResourcesOfType_inDirectory_( - objc.NSString? ext, objc.NSString? subpath) { - final _ret = _objc_msgSend_51( - this.pointer, - _sel_pathsForResourcesOfType_inDirectory_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// attributesAtIndex:effectiveRange: + objc.NSDictionary attributesAtIndex_effectiveRange_( + int location, ffi.Pointer range) { + final _ret = _objc_msgSend_1lz7qql(this.ref.pointer, + _sel_attributesAtIndex_effectiveRange_, location, range); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// pathForResource:ofType: - objc.NSString? pathForResource_ofType_( - objc.NSString? name, objc.NSString? ext) { - final _ret = _objc_msgSend_52(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); + /// length + int get length { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_length); } - /// 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_53( - this.pointer, - _sel_pathForResource_ofType_inDirectory_forLocalization_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - localizationName?.pointer ?? ffi.nullptr); + /// attribute:atIndex:effectiveRange: + objc.ObjCObjectBase? attribute_atIndex_effectiveRange_( + objc.NSString attrName, int location, ffi.Pointer range) { + final _ret = _objc_msgSend_6erk1e( + this.ref.pointer, + _sel_attribute_atIndex_effectiveRange_, + attrName.ref.pointer, + location, + range); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_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_54( - 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); + /// attributedSubstringFromRange: + NSAttributedString attributedSubstringFromRange_(objc.NSRange range) { + final _ret = _objc_msgSend_176f8tz( + this.ref.pointer, _sel_attributedSubstringFromRange_, range); + return NSAttributedString.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_55( - 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); + /// attributesAtIndex:longestEffectiveRange:inRange: + objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( + int location, ffi.Pointer range, objc.NSRange rangeLimit) { + final _ret = _objc_msgSend_7mxs62( + this.ref.pointer, + _sel_attributesAtIndex_longestEffectiveRange_inRange_, + location, + range, + rangeLimit); + return objc.NSDictionary.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_81( - this.pointer, - _sel_localizedAttributedStringForKey_value_table_, - key.pointer, - value?.pointer ?? ffi.nullptr, - tableName?.pointer ?? ffi.nullptr); + /// attribute:atIndex:longestEffectiveRange:inRange: + objc.ObjCObjectBase? attribute_atIndex_longestEffectiveRange_inRange_( + objc.NSString attrName, + int location, + ffi.Pointer range, + objc.NSRange rangeLimit) { + final _ret = _objc_msgSend_1hy2clh( + this.ref.pointer, + _sel_attribute_atIndex_longestEffectiveRange_inRange_, + attrName.ref.pointer, + location, + range, + rangeLimit); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// isEqualToAttributedString: + bool isEqualToAttributedString_(NSAttributedString other) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqualToAttributedString_, other.ref.pointer); + } + + /// initWithString: + NSAttributedString initWithString_(objc.NSString str) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, str.ref.pointer); return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + retain: false, 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); + /// initWithString:attributes: + NSAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithString_attributes_, + str.ref.pointer, + attrs?.ref.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// infoDictionary - objc.NSDictionary? get infoDictionary { - final _ret = _objc_msgSend_82(this.pointer, _sel_infoDictionary); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// initWithAttributedString: + NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithAttributedString_, attrStr.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// localizedInfoDictionary - objc.NSDictionary? get localizedInfoDictionary { - final _ret = _objc_msgSend_82(this.pointer, _sel_localizedInfoDictionary); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// enumerateAttributesInRange:options:usingBlock: + void enumerateAttributesInRange_options_usingBlock_( + objc.NSRange enumerationRange, + NSAttributedStringEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> + block) { + _objc_msgSend_1g4s41q( + this.ref.pointer, + _sel_enumerateAttributesInRange_options_usingBlock_, + enumerationRange, + opts.value, + block.ref.pointer); } - /// objectForInfoDictionaryKey: - objc.ObjCObjectBase? objectForInfoDictionaryKey_(objc.NSString key) { - final _ret = _objc_msgSend_35( - this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// enumerateAttribute:inRange:options:usingBlock: + void enumerateAttribute_inRange_options_usingBlock_( + objc.NSString attrName, + objc.NSRange enumerationRange, + NSAttributedStringEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> + block) { + _objc_msgSend_o0ok8d( + this.ref.pointer, + _sel_enumerateAttribute_inRange_options_usingBlock_, + attrName.ref.pointer, + enumerationRange, + opts.value, + block.ref.pointer); } - /// classNamed: - objc.ObjCObjectBase? classNamed_(objc.NSString className) { - final _ret = - _objc_msgSend_35(this.pointer, _sel_classNamed_, className.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_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// principalClass - objc.ObjCObjectBase? get principalClass { - final _ret = _objc_msgSend_83(this.pointer, _sel_principalClass); + /// initWithMarkdown:options:baseURL:error: + NSAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdown_options_baseURL_error_, + markdown.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// preferredLocalizations - objc.NSArray get preferredLocalizations { - final _ret = _objc_msgSend_33(this.pointer, _sel_preferredLocalizations); - return objc.NSArray.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_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// localizations - objc.NSArray get localizations { - final _ret = _objc_msgSend_33(this.pointer, _sel_localizations); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// initWithFormat:options:locale: + NSAttributedString initWithFormat_options_locale_(NSAttributedString format, + NSAttributedStringFormattingOptions options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_4x8h9q( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: false, 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); + /// localizedAttributedStringWithFormat: + static NSAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_juohf7(_class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_, format.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// preferredLocalizationsFromArray: - static objc.NSArray preferredLocalizationsFromArray_( - objc.NSArray localizationsArray) { - final _ret = _objc_msgSend_84(_class_NSBundle, - _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// localizedAttributedStringWithFormat:options: + static NSAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, NSAttributedStringFormattingOptions options) { + final _ret = _objc_msgSend_1vfncet( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.ref.pointer, + options.value); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// preferredLocalizationsFromArray:forPreferences: - static objc.NSArray preferredLocalizationsFromArray_forPreferences_( - objc.NSArray localizationsArray, objc.NSArray? preferencesArray) { - final _ret = _objc_msgSend_85( - _class_NSBundle, - _sel_preferredLocalizationsFromArray_forPreferences_, - localizationsArray.pointer, - preferencesArray?.pointer ?? ffi.nullptr); - return objc.NSArray.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_xvcwe5( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_context_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr, + context.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// executableArchitectures - objc.NSArray? get executableArchitectures { - final _ret = _objc_msgSend_86(this.pointer, _sel_executableArchitectures); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// localizedAttributedStringWithFormat:context: + static NSAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_iq11qg( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.ref.pointer, + context.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// setPreservationPriority:forTags: - void setPreservationPriority_forTags_(double priority, objc.NSSet tags) { - _objc_msgSend_87(this.pointer, _sel_setPreservationPriority_forTags_, - priority, tags.pointer); + /// localizedAttributedStringWithFormat:options:context: + static NSAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSDictionary context) { + final _ret = _objc_msgSend_4x8h9q( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.ref.pointer, + options.value, + context.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// preservationPriorityForTag: - double preservationPriorityForTag_(objc.NSString tag) { - return objc.useMsgSendVariants - ? _objc_msgSend_88Fpret( - this.pointer, _sel_preservationPriorityForTag_, tag.pointer) - : _objc_msgSend_88( - this.pointer, _sel_preservationPriorityForTag_, tag.pointer); + /// attributedStringByInflectingString + NSAttributedString attributedStringByInflectingString() { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_attributedStringByInflectingString); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// init - NSBundle init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSBundle.castFromPointer(_ret, retain: true, release: true); + NSAttributedString init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSBundle new1() { - final _ret = _objc_msgSend_19(_class_NSBundle, _sel_new); - return NSBundle.castFromPointer(_ret, retain: false, release: true); + static NSAttributedString new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedString, _sel_new); + return NSAttributedString.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); + static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSAttributedString, _sel_allocWithZone_, zone); + return NSAttributedString.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); + static NSAttributedString alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedString, _sel_alloc); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -1852,1411 +3183,1267 @@ class NSBundle extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSBundle, + _objc_msgSend_cqxsqq( + _class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSBundle, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSBundle, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSBundle, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSAttributedString, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSBundle, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSBundle, + _objc_msgSend_1tjlcwl( + _class_NSAttributedString, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedString, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedString, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSAttributedString self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSAttributedString retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSAttributedString autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSAttributedString, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSAttributedString? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, + retain: false, release: true); + } } -late final _class_NSBundle = objc.getClass("NSBundle"); -late final _sel_mainBundle = objc.registerName("mainBundle"); -final _objc_msgSend_34 = 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_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_initWithPath_ = objc.registerName("initWithPath:"); -late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); -final _objc_msgSend_36 = 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_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_bundleWithIdentifier_ = - objc.registerName("bundleWithIdentifier:"); -final _objc_msgSend_38 = objc.msgSendPointer +late final _sel_localizedAttributedStringForKey_value_table_ = + objc.registerName("localizedAttributedStringForKey:value:table:"); +late final _sel_bundleIdentifier = objc.registerName("bundleIdentifier"); +late final _sel_infoDictionary = objc.registerName("infoDictionary"); +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"); +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:"); +late final _sel_preferredLocalizationsFromArray_forPreferences_ = + objc.registerName("preferredLocalizationsFromArray:forPreferences:"); +late final _sel_executableArchitectures = + objc.registerName("executableArchitectures"); +late final _sel_setPreservationPriority_forTags_ = + objc.registerName("setPreservationPriority:forTags:"); +final _objc_msgSend_13ndgwe = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Double, 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_39 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - bool Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); -late final _sel_bundleURL = objc.registerName("bundleURL"); -final _objc_msgSend_40 = 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_41 = objc.msgSendPointer + double, + ffi.Pointer)>(); +late final _sel_preservationPriorityForTag_ = + objc.registerName("preservationPriorityForTag:"); +final _objc_msgSend_om71r5 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Double Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + double 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_42 = objc.msgSendPointer +final _objc_msgSend_om71r5Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Double Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + double 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_43 = 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_44 = 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_45 = 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_46 = 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_47 = 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_48 = 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_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_pathForResource_ofType_inDirectory_ = - objc.registerName("pathForResource:ofType:inDirectory:"); -final _objc_msgSend_50 = 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_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_ = - objc.registerName("pathForResource:ofType:"); -final _objc_msgSend_52 = 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_53 = 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_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)>(); -late final _sel_localizedStringForKey_value_table_ = - objc.registerName("localizedStringForKey:value:table:"); -final _objc_msgSend_55 = 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, +/// 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 [NSAttributedString] that points to the same underlying object as [other]. - NSAttributedString.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSBundle] that points to the same underlying object as [other]. + NSBundle.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSAttributedString] that wraps the given raw object pointer. - NSAttributedString.castFromPointer(ffi.Pointer other, + /// 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 [NSAttributedString]. + /// Returns whether [obj] is an instance of [NSBundle]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSBundle); } - /// string - objc.NSString get string { - final _ret = _objc_msgSend_11(this.pointer, _sel_string); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// mainBundle + static NSBundle getMainBundle() { + final _ret = _objc_msgSend_1unuoxw(_class_NSBundle, _sel_mainBundle); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - /// attributesAtIndex:effectiveRange: - objc.NSDictionary attributesAtIndex_effectiveRange_( - int location, ffi.Pointer<_NSRange> range) { - final _ret = _objc_msgSend_56( - this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// bundleWithPath: + static NSBundle? bundleWithPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleWithPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - /// length - int get length { - return _objc_msgSend_57(this.pointer, _sel_length); + /// initWithPath: + NSBundle? initWithPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: false, release: true); } - /// attribute:atIndex:effectiveRange: - objc.ObjCObjectBase? attribute_atIndex_effectiveRange_( - objc.NSString attrName, int location, ffi.Pointer<_NSRange> range) { - final _ret = _objc_msgSend_58( - this.pointer, - _sel_attribute_atIndex_effectiveRange_, - attrName.pointer, - location, - range); + /// bundleWithURL: + static NSBundle? bundleWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleWithURL_, url.ref.pointer); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - /// attributedSubstringFromRange: - NSAttributedString attributedSubstringFromRange_(_NSRange range) { - final _ret = _objc_msgSend_59( - this.pointer, _sel_attributedSubstringFromRange_, range); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// initWithURL: + NSBundle? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: false, release: true); } - /// attributesAtIndex:longestEffectiveRange:inRange: - objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _objc_msgSend_60( - this.pointer, - _sel_attributesAtIndex_longestEffectiveRange_inRange_, - location, - range, - rangeLimit); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// bundleForClass: + static NSBundle bundleForClass_(objc.ObjCObjectBase aClass) { + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleForClass_, aClass.ref.pointer); + return NSBundle.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_61( - this.pointer, - _sel_attribute_atIndex_longestEffectiveRange_inRange_, - attrName.pointer, - location, - range, - rangeLimit); + /// bundleWithIdentifier: + static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleWithIdentifier_, identifier.ref.pointer); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - /// isEqualToAttributedString: - bool isEqualToAttributedString_(NSAttributedString other) { - return _objc_msgSend_62( - this.pointer, _sel_isEqualToAttributedString_, other.pointer); + /// allBundles + static objc.NSArray getAllBundles() { + final _ret = _objc_msgSend_1unuoxw(_class_NSBundle, _sel_allBundles); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// initWithString: - NSAttributedString initWithString_(objc.NSString str) { - final _ret = - _objc_msgSend_63(this.pointer, _sel_initWithString_, str.pointer); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// allFrameworks + static objc.NSArray getAllFrameworks() { + final _ret = _objc_msgSend_1unuoxw(_class_NSBundle, _sel_allFrameworks); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// initWithString:attributes: - NSAttributedString initWithString_attributes_( - objc.NSString str, objc.NSDictionary? attrs) { - final _ret = _objc_msgSend_64(this.pointer, _sel_initWithString_attributes_, - str.pointer, attrs?.pointer ?? ffi.nullptr); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// load + bool load() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_load); } - /// initWithAttributedString: - NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { - final _ret = _objc_msgSend_65( - this.pointer, _sel_initWithAttributedString_, attrStr.pointer); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// isLoaded + bool get loaded { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLoaded); } - /// enumerateAttributesInRange:options:usingBlock: - void enumerateAttributesInRange_options_usingBlock_( - _NSRange enumerationRange, - NSAttributedStringEnumerationOptions opts, - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { - _objc_msgSend_66( - this.pointer, - _sel_enumerateAttributesInRange_options_usingBlock_, - enumerationRange, - opts.value, - block.pointer); + /// unload + bool unload() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_unload); } - /// enumerateAttribute:inRange:options:usingBlock: - void enumerateAttribute_inRange_options_usingBlock_( - objc.NSString attrName, - _NSRange enumerationRange, - NSAttributedStringEnumerationOptions opts, - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { - _objc_msgSend_67( - this.pointer, - _sel_enumerateAttribute_inRange_options_usingBlock_, - attrName.pointer, - enumerationRange, - opts.value, - block.pointer); + /// preflightAndReturnError: + bool preflightAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_preflightAndReturnError_, error); } - /// initWithContentsOfMarkdownFileAtURL:options:baseURL:error: - NSAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - objc.NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - objc.NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_72( - this.pointer, - _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, - markdownFile.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); + /// loadAndReturnError: + bool loadAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_loadAndReturnError_, error); + } + + /// bundleURL + objc.NSURL get bundleURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_bundleURL); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// resourceURL + objc.NSURL? get resourceURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_resourceURL); return _ret.address == 0 ? null - : NSAttributedString.castFromPointer(_ret, retain: true, release: true); + : objc.NSURL.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_73( - this.pointer, - _sel_initWithMarkdown_options_baseURL_error_, - markdown.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); + /// executableURL + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executableURL); return _ret.address == 0 ? null - : NSAttributedString.castFromPointer(_ret, retain: true, release: true); + : objc.NSURL.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_74( - this.pointer, - _sel_initWithMarkdownString_options_baseURL_error_, - markdownString.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); + /// URLForAuxiliaryExecutable: + objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_URLForAuxiliaryExecutable_, executableName.ref.pointer); return _ret.address == 0 ? null - : NSAttributedString.castFromPointer(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// initWithFormat:options:locale: - NSAttributedString initWithFormat_options_locale_(NSAttributedString format, - NSAttributedStringFormattingOptions options, objc.NSLocale? locale) { - final _ret = _objc_msgSend_75( - this.pointer, - _sel_initWithFormat_options_locale_, - format.pointer, - options.value, - locale?.pointer ?? ffi.nullptr); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// privateFrameworksURL + objc.NSURL? get privateFrameworksURL { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_privateFrameworksURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// localizedAttributedStringWithFormat: - static NSAttributedString localizedAttributedStringWithFormat_( - NSAttributedString format) { - final _ret = _objc_msgSend_65(_class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_, format.pointer); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// sharedFrameworksURL + objc.NSURL? get sharedFrameworksURL { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedFrameworksURL); + return _ret.address == 0 + ? null + : objc.NSURL.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); + /// sharedSupportURL + objc.NSURL? get sharedSupportURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedSupportURL); + return _ret.address == 0 + ? null + : objc.NSURL.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); + /// builtInPlugInsURL + objc.NSURL? get builtInPlugInsURL { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_builtInPlugInsURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// localizedAttributedStringWithFormat:context: - static NSAttributedString localizedAttributedStringWithFormat_context_( - NSAttributedString format, objc.NSDictionary context) { - final _ret = _objc_msgSend_78( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_context_, - format.pointer, - context.pointer); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// appStoreReceiptURL + objc.NSURL? get appStoreReceiptURL { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_appStoreReceiptURL); + return _ret.address == 0 + ? null + : objc.NSURL.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_79( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_options_context_, - format.pointer, - options.value, - context.pointer); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// bundlePath + objc.NSString get bundlePath { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_bundlePath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// attributedStringByInflectingString - NSAttributedString attributedStringByInflectingString() { - final _ret = - _objc_msgSend_80(this.pointer, _sel_attributedStringByInflectingString); - return NSAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// resourcePath + objc.NSString? get resourcePath { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_resourcePath); + return _ret.address == 0 + ? null + : objc.NSString.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); + /// executablePath + objc.NSString? get executablePath { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executablePath); + return _ret.address == 0 + ? null + : objc.NSString.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); + /// pathForAuxiliaryExecutable: + objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_pathForAuxiliaryExecutable_, executableName.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// allocWithZone: - static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + /// privateFrameworksPath + objc.NSString? get privateFrameworksPath { final _ret = - _objc_msgSend_28(_class_NSAttributedString, _sel_allocWithZone_, zone); - return NSAttributedString.castFromPointer(_ret, - retain: false, release: true); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_privateFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// alloc - static NSAttributedString alloc() { - final _ret = _objc_msgSend_19(_class_NSAttributedString, _sel_alloc); - return NSAttributedString.castFromPointer(_ret, - retain: false, release: true); + /// sharedFrameworksPath + objc.NSString? get sharedFrameworksPath { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, 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); + /// sharedSupportPath + objc.NSString? get sharedSupportPath { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedSupportPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSAttributedString, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// builtInPlugInsPath + objc.NSString? get builtInPlugInsPath { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_builtInPlugInsPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); + /// 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_1qje3rk( + _class_NSBundle, + _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + bundleURL.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSAttributedString, _sel_useStoredAccessor); + /// URLsForResourcesWithExtension:subdirectory:inBundleWithURL: + static objc.NSArray? + URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( + objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { + final _ret = _objc_msgSend_aud7dn( + _class_NSBundle, + _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + bundleURL.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// 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); + /// URLForResource:withExtension: + objc.NSURL? URLForResource_withExtension_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_URLForResource_withExtension_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSAttributedString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// URLForResource:withExtension:subdirectory: + objc.NSURL? URLForResource_withExtension_subdirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_URLForResource_withExtension_subdirectory_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSAttributedString, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// 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_1qje3rk( + this.ref.pointer, + _sel_URLForResource_withExtension_subdirectory_localization_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// URLsForResourcesWithExtension:subdirectory: + objc.NSArray? URLsForResourcesWithExtension_subdirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : 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); + /// URLsForResourcesWithExtension:subdirectory:localization: + objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_localization_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} -late final _class_NSAttributedString = objc.getClass("NSAttributedString"); -late final _sel_string = objc.registerName("string"); + /// pathForResource:ofType:inDirectory: + objc.NSString? pathForResource_ofType_inDirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_pathForResource_ofType_inDirectory_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -final class _NSRange extends ffi.Struct { - @ffi.UnsignedLong() - external int location; + /// pathsForResourcesOfType:inDirectory: + objc.NSArray pathsForResourcesOfType_inDirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_pathsForResourcesOfType_inDirectory_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - @ffi.UnsignedLong() - external int length; -} + /// pathForResource:ofType: + objc.NSString? pathForResource_ofType_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_pathForResource_ofType_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_attributesAtIndex_effectiveRange_ = - objc.registerName("attributesAtIndex:effectiveRange:"); -final _objc_msgSend_56 = 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_57 = objc.msgSendPointer + /// 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_1qje3rk( + this.ref.pointer, + _sel_pathForResource_ofType_inDirectory_forLocalization_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.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_aud7dn( + this.ref.pointer, + _sel_pathsForResourcesOfType_inDirectory_forLocalization_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.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_aud7dn( + this.ref.pointer, + _sel_localizedStringForKey_value_table_, + key.ref.pointer, + value?.ref.pointer ?? ffi.nullptr, + tableName?.ref.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_aud7dn( + this.ref.pointer, + _sel_localizedAttributedStringForKey_value_table_, + key.ref.pointer, + value?.ref.pointer ?? ffi.nullptr, + tableName?.ref.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + /// bundleIdentifier + objc.NSString? get bundleIdentifier { + final _ret = _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.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_1unuoxw(this.ref.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_juohf7( + this.ref.pointer, _sel_objectForInfoDictionaryKey_, key.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// classNamed: + objc.ObjCObjectBase? classNamed_(objc.NSString className) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_classNamed_, className.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// principalClass + objc.ObjCObjectBase? get principalClass { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_principalClass); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// preferredLocalizations + objc.NSArray get preferredLocalizations { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredLocalizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// localizations + objc.NSArray get localizations { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// developmentLocalization + objc.NSString? get developmentLocalization { + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_juohf7(_class_NSBundle, + _sel_preferredLocalizationsFromArray_, localizationsArray.ref.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_iq11qg( + _class_NSBundle, + _sel_preferredLocalizationsFromArray_forPreferences_, + localizationsArray.ref.pointer, + preferencesArray?.ref.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// executableArchitectures + objc.NSArray? get executableArchitectures { + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_13ndgwe(this.ref.pointer, + _sel_setPreservationPriority_forTags_, priority, tags.ref.pointer); + } + + /// preservationPriorityForTag: + double preservationPriorityForTag_(objc.NSString tag) { + return objc.useMsgSendVariants + ? _objc_msgSend_om71r5Fpret( + this.ref.pointer, _sel_preservationPriorityForTag_, tag.ref.pointer) + : _objc_msgSend_om71r5(this.ref.pointer, + _sel_preservationPriorityForTag_, tag.ref.pointer); + } + + /// init + NSBundle init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSBundle.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSBundle new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSBundle, _sel_new); + return NSBundle.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSBundle, _sel_allocWithZone_, zone); + return NSBundle.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSBundle alloc() { + final _ret = _objc_msgSend_1unuoxw(_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_cqxsqq( + _class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } + + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSBundle, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSBundle, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSBundle, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSBundle, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSBundle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSBundle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSBundle, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSBundle self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSBundle.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSBundle retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSBundle.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSBundle autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSBundle.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableAttributedString = + objc.getClass("NSMutableAttributedString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_85e5ih = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_attribute_atIndex_effectiveRange_ = - objc.registerName("attribute:atIndex:effectiveRange:"); -final _objc_msgSend_58 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_setAttributes_range_ = + objc.registerName("setAttributes:range:"); +final _objc_msgSend_lusc9 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>() + objc.NSRange)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer<_NSRange>)>(); -late final _sel_attributedSubstringFromRange_ = - objc.registerName("attributedSubstringFromRange:"); -final _objc_msgSend_59 = objc.msgSendPointer + objc.NSRange)>(); +late final _sel_mutableString = objc.registerName("mutableString"); +late final _sel_addAttribute_value_range_ = + objc.registerName("addAttribute:value:range:"); +final _objc_msgSend_1fmqvtu = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = - objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); -final _objc_msgSend_60 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>() - .asFunction< - ffi.Pointer Function( + void 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_61 = 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_62 = 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_63 = 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_64 = objc.msgSendPointer + objc.NSRange)>(); +late final _sel_addAttributes_range_ = + objc.registerName("addAttributes:range:"); +late final _sel_removeAttribute_range_ = + objc.registerName("removeAttribute:range:"); +late final _sel_replaceCharactersInRange_withAttributedString_ = + objc.registerName("replaceCharactersInRange:withAttributedString:"); +late final _sel_insertAttributedString_atIndex_ = + objc.registerName("insertAttributedString:atIndex:"); +final _objc_msgSend_cjm5ga = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithAttributedString_ = - objc.registerName("initWithAttributedString:"); -final _objc_msgSend_65 = objc.msgSendPointer + int)>(); +late final _sel_appendAttributedString_ = + objc.registerName("appendAttributedString:"); +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +final _objc_msgSend_9xf7uy = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -enum NSAttributedStringEnumerationOptions { - NSAttributedStringEnumerationReverse(2), - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired(1048576); + void Function(ffi.Pointer, + ffi.Pointer, objc.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:"); - final int value; - const NSAttributedStringEnumerationOptions(this.value); +/// NSMutableAttributedString +class NSMutableAttributedString extends NSAttributedString { + NSMutableAttributedString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSAttributedStringEnumerationOptions fromValue(int value) => - switch (value) { - 2 => NSAttributedStringEnumerationReverse, - 1048576 => - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, - _ => throw ArgumentError( - "Unknown value for NSAttributedStringEnumerationOptions: $value"), - }; -} + /// Constructs a [NSMutableAttributedString] that points to the same underlying object as [other]. + NSMutableAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -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); + /// 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); -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 whether [obj] is an instance of [NSMutableAttributedString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); + } - /// 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); + /// replaceCharactersInRange:withString: + void replaceCharactersInRange_withString_( + objc.NSRange range, objc.NSString str) { + _objc_msgSend_85e5ih(this.ref.pointer, + _sel_replaceCharactersInRange_withString_, range, str.ref.pointer); } - /// 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; + /// setAttributes:range: + void setAttributes_range_(objc.NSDictionary? attrs, objc.NSRange range) { + _objc_msgSend_lusc9(this.ref.pointer, _sel_setAttributes_range_, + attrs?.ref.pointer ?? ffi.nullptr, range); + } - /// 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; + /// mutableString + objc.NSMutableString get mutableString { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mutableString); + return objc.NSMutableString.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// 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); -} + /// addAttribute:value:range: + void addAttribute_value_range_( + objc.NSString name, objc.ObjCObjectBase value, objc.NSRange range) { + _objc_msgSend_1fmqvtu(this.ref.pointer, _sel_addAttribute_value_range_, + name.ref.pointer, value.ref.pointer, range); + } -late final _sel_enumerateAttributesInRange_options_usingBlock_ = - objc.registerName("enumerateAttributesInRange:options:usingBlock:"); -final _objc_msgSend_66 = 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); + /// addAttributes:range: + void addAttributes_range_(objc.NSDictionary attrs, objc.NSRange range) { + _objc_msgSend_lusc9( + this.ref.pointer, _sel_addAttributes_range_, attrs.ref.pointer, range); + } -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); + /// removeAttribute:range: + void removeAttribute_range_(objc.NSString name, objc.NSRange range) { + _objc_msgSend_lusc9( + this.ref.pointer, _sel_removeAttribute_range_, name.ref.pointer, range); + } - /// 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); + /// replaceCharactersInRange:withAttributedString: + void replaceCharactersInRange_withAttributedString_( + objc.NSRange range, NSAttributedString attrString) { + _objc_msgSend_85e5ih( + this.ref.pointer, + _sel_replaceCharactersInRange_withAttributedString_, + range, + attrString.ref.pointer); } - /// 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; + /// insertAttributedString:atIndex: + void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertAttributedString_atIndex_, + attrString.ref.pointer, loc); + } - /// 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; + /// appendAttributedString: + void appendAttributedString_(NSAttributedString attrString) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_appendAttributedString_, attrString.ref.pointer); + } - /// 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; + /// deleteCharactersInRange: + void deleteCharactersInRange_(objc.NSRange range) { + _objc_msgSend_9xf7uy( + this.ref.pointer, _sel_deleteCharactersInRange_, range); + } - 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); -} + /// setAttributedString: + void setAttributedString_(NSAttributedString attrString) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAttributedString_, attrString.ref.pointer); + } -late final _sel_enumerateAttribute_inRange_options_usingBlock_ = - objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); -final _objc_msgSend_67 = 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)>(); + /// beginEditing + void beginEditing() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_beginEditing); + } -/// NSAttributedStringMarkdownParsingOptions -class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { - NSAttributedStringMarkdownParsingOptions._( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// endEditing + void endEditing() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_endEditing); + } - /// Constructs a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. - NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// appendLocalizedFormat: + void appendLocalizedFormat_(NSAttributedString format) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_appendLocalizedFormat_, format.ref.pointer); + } - /// 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); + /// initWithString: + NSMutableAttributedString initWithString_(objc.NSString str) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, str.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); + } - /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, - _class_NSAttributedStringMarkdownParsingOptions); + /// initWithString:attributes: + NSMutableAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithString_attributes_, + str.ref.pointer, + attrs?.ref.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// init - NSAttributedStringMarkdownParsingOptions init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, - retain: true, release: true); + /// initWithAttributedString: + NSMutableAttributedString initWithAttributedString_( + NSAttributedString attrStr) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithAttributedString_, attrStr.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// allowsExtendedAttributes - bool get allowsExtendedAttributes { - return _objc_msgSend_13(this.pointer, _sel_allowsExtendedAttributes); + /// initWithContentsOfMarkdownFileAtURL:options:baseURL:error: + NSMutableAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// setAllowsExtendedAttributes: - set allowsExtendedAttributes(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAllowsExtendedAttributes_, value); + /// initWithMarkdown:options:baseURL:error: + NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdown_options_baseURL_error_, + markdown.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// interpretedSyntax - NSAttributedStringMarkdownInterpretedSyntax get interpretedSyntax { - final _ret = _objc_msgSend_68(this.pointer, _sel_interpretedSyntax); - return NSAttributedStringMarkdownInterpretedSyntax.fromValue(_ret); + /// initWithMarkdownString:options:baseURL:error: + NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// setInterpretedSyntax: - set interpretedSyntax(NSAttributedStringMarkdownInterpretedSyntax value) { - return _objc_msgSend_69( - this.pointer, _sel_setInterpretedSyntax_, value.value); + /// initWithFormat:options:locale: + NSMutableAttributedString initWithFormat_options_locale_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSLocale? locale) { + final _ret = _objc_msgSend_4x8h9q( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// failurePolicy - NSAttributedStringMarkdownParsingFailurePolicy get failurePolicy { - final _ret = _objc_msgSend_70(this.pointer, _sel_failurePolicy); - return NSAttributedStringMarkdownParsingFailurePolicy.fromValue(_ret); + /// localizedAttributedStringWithFormat: + static NSMutableAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_juohf7(_class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_, format.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// setFailurePolicy: - set failurePolicy(NSAttributedStringMarkdownParsingFailurePolicy value) { - return _objc_msgSend_71(this.pointer, _sel_setFailurePolicy_, value.value); + /// localizedAttributedStringWithFormat:options: + static NSMutableAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, NSAttributedStringFormattingOptions options) { + final _ret = _objc_msgSend_1vfncet( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.ref.pointer, + options.value); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// 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); + /// initWithFormat:options:locale:context: + NSMutableAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_xvcwe5( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_context_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr, + context.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - /// setLanguageCode: - set languageCode(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); + /// localizedAttributedStringWithFormat:context: + static NSMutableAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_iq11qg( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.ref.pointer, + context.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// appliesSourcePositionAttributes - bool get appliesSourcePositionAttributes { - return _objc_msgSend_13(this.pointer, _sel_appliesSourcePositionAttributes); + /// localizedAttributedStringWithFormat:options:context: + static NSMutableAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSDictionary context) { + final _ret = _objc_msgSend_4x8h9q( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.ref.pointer, + options.value, + context.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// setAppliesSourcePositionAttributes: - set appliesSourcePositionAttributes(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAppliesSourcePositionAttributes_, value); + /// init + NSMutableAttributedString init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSAttributedStringMarkdownParsingOptions new1() { - final _ret = _objc_msgSend_19( - _class_NSAttributedStringMarkdownParsingOptions, _sel_new); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + static NSMutableAttributedString new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSMutableAttributedString, _sel_new); + return NSMutableAttributedString.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, + static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSMutableAttributedString, _sel_allocWithZone_, zone); + return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSAttributedStringMarkdownParsingOptions alloc() { - final _ret = _objc_msgSend_19( - _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + static NSMutableAttributedString alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSMutableAttributedString, _sel_alloc); + return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); } @@ -3265,2104 +4452,1633 @@ class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSAttributedStringMarkdownParsingOptions, + _objc_msgSend_cqxsqq( + _class_NSMutableAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSAttributedStringMarkdownParsingOptions, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13(_class_NSAttributedStringMarkdownParsingOptions, - _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSAttributedStringMarkdownParsingOptions, - _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSMutableAttributedString, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_keyPathsForValuesAffectingValueForKey_, - key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMutableAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSMutableAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSAttributedStringMarkdownParsingOptions, + _objc_msgSend_1tjlcwl( + _class_NSMutableAttributedString, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMutableAttributedString, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMutableAttributedString, _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:"); + /// self + NSMutableAttributedString self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } -enum NSAttributedStringMarkdownInterpretedSyntax { - NSAttributedStringMarkdownInterpretedSyntaxFull(0), - NSAttributedStringMarkdownInterpretedSyntaxInlineOnly(1), - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace(2); + /// retain + NSMutableAttributedString retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSAttributedStringMarkdownInterpretedSyntax(this.value); + /// autorelease + NSMutableAttributedString autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } - static NSAttributedStringMarkdownInterpretedSyntax fromValue(int value) => - switch (value) { - 0 => NSAttributedStringMarkdownInterpretedSyntaxFull, - 1 => NSAttributedStringMarkdownInterpretedSyntaxInlineOnly, - 2 => - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace, - _ => throw ArgumentError( - "Unknown value for NSAttributedStringMarkdownInterpretedSyntax: $value"), - }; + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSMutableAttributedString, _sel_supportsSecureCoding); + } + + /// initWithCoder: + NSMutableAttributedString? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); + } } -late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); -final _objc_msgSend_68 = 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_69 = 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_70 = 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_71 = 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_72 = objc.msgSendPointer +late final _class_NSFormatter = objc.getClass("NSFormatter"); +late final _sel_stringForObjectValue_ = + objc.registerName("stringForObjectValue:"); +late final _sel_attributedStringForObjectValue_withDefaultAttributes_ = + objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); +late final _sel_editingStringForObjectValue_ = + objc.registerName("editingStringForObjectValue:"); +late final _sel_getObjectValue_forString_errorDescription_ = + objc.registerName("getObjectValue:forString:errorDescription:"); +final _objc_msgSend_1tdtroe = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer>, ffi.Pointer, ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, 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_73 = objc.msgSendPointer +late final _sel_isPartialStringValid_newEditingString_errorDescription_ = objc + .registerName("isPartialStringValid:newEditingString:errorDescription:"); +final _objc_msgSend_to8xlo = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer>, ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, 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_74 = objc.msgSendPointer +late final _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_ = + objc.registerName( + "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); +final _objc_msgSend_1hu6x2w = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + objc.NSRange, ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + objc.NSRange, ffi.Pointer>)>(); -enum NSAttributedStringFormattingOptions { - NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging(1), - NSAttributedStringFormattingApplyReplacementIndexAttribute(2); +/// NSFormatter +class NSFormatter extends objc.NSObject { + NSFormatter._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - final int value; - const NSAttributedStringFormattingOptions(this.value); + /// Constructs a [NSFormatter] that points to the same underlying object as [other]. + NSFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSAttributedStringFormattingOptions fromValue(int value) => - switch (value) { - 1 => NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, - 2 => NSAttributedStringFormattingApplyReplacementIndexAttribute, - _ => throw ArgumentError( - "Unknown value for NSAttributedStringFormattingOptions: $value"), - }; -} + /// Constructs a [NSFormatter] that wraps the given raw object pointer. + NSFormatter.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -late final _sel_initWithFormat_options_locale_ = - objc.registerName("initWithFormat:options:locale:"); -final _objc_msgSend_75 = 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_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_localizedAttributedStringWithFormat_context_ = - objc.registerName("localizedAttributedStringWithFormat:context:"); -final _objc_msgSend_78 = 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_79 = 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_80 = 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_81 = 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_82 = 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_83 = 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_84 = 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_85 = 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_86 = 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_87 = 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_88 = 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_88Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + /// Returns whether [obj] is an instance of [NSFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFormatter); + } -/// NSMutableAttributedString -class NSMutableAttributedString extends NSAttributedString { - NSMutableAttributedString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// stringForObjectValue: + objc.NSString? stringForObjectValue_(objc.ObjCObjectBase? obj) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_stringForObjectValue_, obj?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Constructs a [NSMutableAttributedString] that points to the same underlying object as [other]. - NSMutableAttributedString.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// attributedStringForObjectValue:withDefaultAttributes: + NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( + objc.ObjCObjectBase obj, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_attributedStringForObjectValue_withDefaultAttributes_, + obj.ref.pointer, + attrs?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, 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); + /// editingStringForObjectValue: + objc.NSString? editingStringForObjectValue_(objc.ObjCObjectBase obj) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_editingStringForObjectValue_, obj.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Returns whether [obj] is an instance of [NSMutableAttributedString]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); + /// getObjectValue:forString:errorDescription: + bool getObjectValue_forString_errorDescription_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer> error) { + return _objc_msgSend_1tdtroe( + this.ref.pointer, + _sel_getObjectValue_forString_errorDescription_, + obj, + string.ref.pointer, + error); } - /// replaceCharactersInRange:withString: - void replaceCharactersInRange_withString_(_NSRange range, objc.NSString str) { - _objc_msgSend_89(this.pointer, _sel_replaceCharactersInRange_withString_, - range, str.pointer); + /// isPartialStringValid:newEditingString:errorDescription: + bool isPartialStringValid_newEditingString_errorDescription_( + objc.NSString partialString, + ffi.Pointer> newString, + ffi.Pointer> error) { + return _objc_msgSend_to8xlo( + this.ref.pointer, + _sel_isPartialStringValid_newEditingString_errorDescription_, + partialString.ref.pointer, + newString, + error); } - /// setAttributes:range: - void setAttributes_range_(objc.NSDictionary? attrs, _NSRange range) { - _objc_msgSend_90(this.pointer, _sel_setAttributes_range_, - attrs?.pointer ?? ffi.nullptr, range); + /// isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription: + bool + isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( + ffi.Pointer> partialStringPtr, + ffi.Pointer proposedSelRangePtr, + objc.NSString origString, + objc.NSRange origSelRange, + ffi.Pointer> error) { + return _objc_msgSend_1hu6x2w( + this.ref.pointer, + _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, + partialStringPtr, + proposedSelRangePtr, + origString.ref.pointer, + origSelRange, + error); } - /// mutableString - objc.NSMutableString get mutableString { - final _ret = _objc_msgSend_91(this.pointer, _sel_mutableString); - return objc.NSMutableString.castFromPointer(_ret, - retain: true, release: true); + /// init + NSFormatter init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - /// addAttribute:value:range: - void addAttribute_value_range_( - objc.NSString name, objc.ObjCObjectBase value, _NSRange range) { - _objc_msgSend_92(this.pointer, _sel_addAttribute_value_range_, name.pointer, - value.pointer, range); + /// new + static NSFormatter new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFormatter, _sel_new); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - /// addAttributes:range: - void addAttributes_range_(objc.NSDictionary attrs, _NSRange range) { - _objc_msgSend_93( - this.pointer, _sel_addAttributes_range_, attrs.pointer, range); + /// allocWithZone: + static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSFormatter, _sel_allocWithZone_, zone); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - /// removeAttribute:range: - void removeAttribute_range_(objc.NSString name, _NSRange range) { - _objc_msgSend_94( - this.pointer, _sel_removeAttribute_range_, name.pointer, range); + /// alloc + static NSFormatter alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFormatter, _sel_alloc); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - /// replaceCharactersInRange:withAttributedString: - void replaceCharactersInRange_withAttributedString_( - _NSRange range, NSAttributedString attrString) { - _objc_msgSend_95( - this.pointer, - _sel_replaceCharactersInRange_withAttributedString_, - range, - attrString.pointer); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } - /// insertAttributedString:atIndex: - void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { - _objc_msgSend_96(this.pointer, _sel_insertAttributedString_atIndex_, - attrString.pointer, loc); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } - /// appendAttributedString: - void appendAttributedString_(NSAttributedString attrString) { - _objc_msgSend_97( - this.pointer, _sel_appendAttributedString_, attrString.pointer); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSFormatter, _sel_accessInstanceVariablesDirectly); } - /// deleteCharactersInRange: - void deleteCharactersInRange_(_NSRange range) { - _objc_msgSend_98(this.pointer, _sel_deleteCharactersInRange_, range); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSFormatter, _sel_useStoredAccessor); } - /// setAttributedString: - void setAttributedString_(NSAttributedString attrString) { - _objc_msgSend_97( - this.pointer, _sel_setAttributedString_, attrString.pointer); + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// beginEditing - void beginEditing() { - _objc_msgSend_7(this.pointer, _sel_beginEditing); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } - /// endEditing - void endEditing() { - _objc_msgSend_7(this.pointer, _sel_endEditing); + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } - /// appendLocalizedFormat: - void appendLocalizedFormat_(NSAttributedString format) { - _objc_msgSend_97(this.pointer, _sel_appendLocalizedFormat_, format.pointer); + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// initWithString: - NSMutableAttributedString initWithString_(objc.NSString str) { + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = - _objc_msgSend_63(this.pointer, _sel_initWithString_, str.pointer); - return NSMutableAttributedString.castFromPointer(_ret, - retain: true, release: true); + _objc_msgSend_1unuoxw(_class_NSFormatter, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// initWithString:attributes: - NSMutableAttributedString initWithString_attributes_( - objc.NSString str, objc.NSDictionary? attrs) { - final _ret = _objc_msgSend_64(this.pointer, _sel_initWithString_attributes_, - str.pointer, attrs?.pointer ?? ffi.nullptr); - return NSMutableAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// self + NSFormatter self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSFormatter.castFromPointer(_ret, retain: true, release: true); } - /// initWithAttributedString: - NSMutableAttributedString initWithAttributedString_( - NSAttributedString attrStr) { - final _ret = _objc_msgSend_65( - this.pointer, _sel_initWithAttributedString_, attrStr.pointer); - return NSMutableAttributedString.castFromPointer(_ret, - retain: true, release: true); + /// retain + NSFormatter retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSFormatter.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_72( - this.pointer, - _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, - markdownFile.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); + /// autorelease + NSFormatter autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSFormatter.castFromPointer(_ret, retain: true, release: true); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSFormatter? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : NSMutableAttributedString.castFromPointer(_ret, - retain: true, release: true); + : NSFormatter.castFromPointer(_ret, retain: false, 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_73( - 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_74( - 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_75( - this.pointer, - _sel_initWithFormat_options_locale_, - format.pointer, - options.value, - locale?.pointer ?? ffi.nullptr); - return NSMutableAttributedString.castFromPointer(_ret, - retain: true, release: true); - } - - /// localizedAttributedStringWithFormat: - static NSMutableAttributedString localizedAttributedStringWithFormat_( - NSAttributedString format) { - final _ret = _objc_msgSend_65(_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); - } - - /// localizedAttributedStringWithFormat:context: - static NSMutableAttributedString localizedAttributedStringWithFormat_context_( - NSAttributedString format, objc.NSDictionary context) { - final _ret = _objc_msgSend_78( - _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_79( - _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); - } +late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); - } +enum NSFormattingContext { + NSFormattingContextUnknown(0), + NSFormattingContextDynamic(1), + NSFormattingContextStandalone(2), + NSFormattingContextListItem(3), + NSFormattingContextBeginningOfSentence(4), + NSFormattingContextMiddleOfSentence(5); - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSMutableAttributedString, _sel_useStoredAccessor); - } + final int value; + const NSFormattingContext(this.value); - /// 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); - } + static NSFormattingContext fromValue(int value) => switch (value) { + 0 => NSFormattingContextUnknown, + 1 => NSFormattingContextDynamic, + 2 => NSFormattingContextStandalone, + 3 => NSFormattingContextListItem, + 4 => NSFormattingContextBeginningOfSentence, + 5 => NSFormattingContextMiddleOfSentence, + _ => + throw ArgumentError("Unknown value for NSFormattingContext: $value"), + }; +} - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSMutableAttributedString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } +late final _sel_formattingContext = objc.registerName("formattingContext"); +final _objc_msgSend_10wicfq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFormattingContext_ = + objc.registerName("setFormattingContext:"); +final _objc_msgSend_1gtwv7x = 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_getObjectValue_forString_range_error_ = + objc.registerName("getObjectValue:forString:range:error:"); +final _objc_msgSend_bl9kx = 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_stringFromDate_ = objc.registerName("stringFromDate:"); +late final _sel_dateFromString_ = objc.registerName("dateFromString:"); - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSMutableAttributedString, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } +enum NSDateFormatterStyle { + NSDateFormatterNoStyle(0), + NSDateFormatterShortStyle(1), + NSDateFormatterMediumStyle(2), + NSDateFormatterLongStyle(3), + NSDateFormatterFullStyle(4); - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSDateFormatterStyle(this.value); - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } + static NSDateFormatterStyle fromValue(int value) => switch (value) { + 0 => NSDateFormatterNoStyle, + 1 => NSDateFormatterShortStyle, + 2 => NSDateFormatterMediumStyle, + 3 => NSDateFormatterLongStyle, + 4 => NSDateFormatterFullStyle, + _ => + throw ArgumentError("Unknown value for NSDateFormatterStyle: $value"), + }; } -late final _class_NSMutableAttributedString = - objc.getClass("NSMutableAttributedString"); -late final _sel_replaceCharactersInRange_withString_ = - objc.registerName("replaceCharactersInRange:withString:"); -final _objc_msgSend_89 = objc.msgSendPointer +late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = + objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); +final _objc_msgSend_1sgexgh = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_setAttributes_range_ = - objc.registerName("setAttributes:range:"); -final _objc_msgSend_90 = objc.msgSendPointer + ffi.Pointer, + int, + int)>(); +late final _sel_dateFormatFromTemplate_options_locale_ = + objc.registerName("dateFormatFromTemplate:options:locale:"); +final _objc_msgSend_1czjmpk = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - _NSRange)>>() + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - _NSRange)>(); -late final _sel_mutableString = objc.registerName("mutableString"); -final _objc_msgSend_91 = objc.msgSendPointer + int, + ffi.Pointer)>(); + +enum NSDateFormatterBehavior { + NSDateFormatterBehaviorDefault(0), + NSDateFormatterBehavior10_0(1000), + NSDateFormatterBehavior10_4(1040); + + final int value; + const NSDateFormatterBehavior(this.value); + + static NSDateFormatterBehavior fromValue(int value) => switch (value) { + 0 => NSDateFormatterBehaviorDefault, + 1000 => NSDateFormatterBehavior10_0, + 1040 => NSDateFormatterBehavior10_4, + _ => throw ArgumentError( + "Unknown value for NSDateFormatterBehavior: $value"), + }; +} + +late final _sel_defaultFormatterBehavior = + objc.registerName("defaultFormatterBehavior"); +final _objc_msgSend_ti9wzk = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_addAttribute_value_range_ = - objc.registerName("addAttribute:value:range:"); -final _objc_msgSend_92 = objc.msgSendPointer +late final _sel_setDefaultFormatterBehavior_ = + objc.registerName("setDefaultFormatterBehavior:"); +final _objc_msgSend_ffb1q7 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_addAttributes_range_ = - objc.registerName("addAttributes:range:"); -final _objc_msgSend_93 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setLocalizedDateFormatFromTemplate_ = + objc.registerName("setLocalizedDateFormatFromTemplate:"); +late final _sel_dateFormat = objc.registerName("dateFormat"); +late final _sel_setDateFormat_ = objc.registerName("setDateFormat:"); +late final _sel_dateStyle = objc.registerName("dateStyle"); +final _objc_msgSend_r4ksf1 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_removeAttribute_range_ = - objc.registerName("removeAttribute:range:"); -final _objc_msgSend_94 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); +final _objc_msgSend_7hnqfw = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_replaceCharactersInRange_withAttributedString_ = - objc.registerName("replaceCharactersInRange:withAttributedString:"); -final _objc_msgSend_95 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_timeStyle = objc.registerName("timeStyle"); +late final _sel_setTimeStyle_ = objc.registerName("setTimeStyle:"); +late final _sel_locale = objc.registerName("locale"); +late final _sel_setLocale_ = objc.registerName("setLocale:"); +late final _sel_generatesCalendarDates = + objc.registerName("generatesCalendarDates"); +late final _sel_setGeneratesCalendarDates_ = + objc.registerName("setGeneratesCalendarDates:"); +late final _sel_formatterBehavior = objc.registerName("formatterBehavior"); +late final _sel_setFormatterBehavior_ = + objc.registerName("setFormatterBehavior:"); +late final _class_NSTimeZone = objc.getClass("NSTimeZone"); +late final _sel_name = objc.registerName("name"); +late final _sel_data = objc.registerName("data"); +late final _sel_secondsFromGMTForDate_ = + objc.registerName("secondsFromGMTForDate:"); +final _objc_msgSend_hrsqsi = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Long 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_96 = objc.msgSendPointer + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_abbreviationForDate_ = + objc.registerName("abbreviationForDate:"); +late final _sel_isDaylightSavingTimeForDate_ = + objc.registerName("isDaylightSavingTimeForDate:"); +late final _sel_daylightSavingTimeOffsetForDate_ = + objc.registerName("daylightSavingTimeOffsetForDate:"); +late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = + objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); +late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); +late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); +late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); +late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); +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:"); +late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); +late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); +final _objc_msgSend_z1fx1b = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_appendAttributedString_ = - objc.registerName("appendAttributedString:"); -final _objc_msgSend_97 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +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:"); + +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_1c91ngg = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_deleteCharactersInRange_ = - objc.registerName("deleteCharactersInRange:"); -final _objc_msgSend_98 = objc.msgSendPointer + 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:"); +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_crtxa9 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .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:"); + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_timeZoneWithAbbreviation_ = + objc.registerName("timeZoneWithAbbreviation:"); -/// NSDateFormatter -class NSDateFormatter extends NSFormatter { - NSDateFormatter._(ffi.Pointer pointer, +/// 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 [NSDateFormatter] that points to the same underlying object as [other]. - NSDateFormatter.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSTimeZone] that points to the same underlying object as [other]. + NSTimeZone.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSDateFormatter] that wraps the given raw object pointer. - NSDateFormatter.castFromPointer(ffi.Pointer other, + /// 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 [NSDateFormatter]. + /// Returns whether [obj] is an instance of [NSTimeZone]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); - } - - /// formattingContext - NSFormattingContext get formattingContext { - final _ret = _objc_msgSend_99(this.pointer, _sel_formattingContext); - return NSFormattingContext.fromValue(_ret); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTimeZone); } - /// setFormattingContext: - set formattingContext(NSFormattingContext value) { - return _objc_msgSend_100( - this.pointer, _sel_setFormattingContext_, value.value); + /// name + objc.NSString get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// getObjectValue:forString:range:error: - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - objc.NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _objc_msgSend_101( - this.pointer, - _sel_getObjectValue_forString_range_error_, - obj, - string.pointer, - rangep, - error); + /// data + objc.NSData get data { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// stringFromDate: - objc.NSString stringFromDate_(objc.NSDate date) { - final _ret = - _objc_msgSend_102(this.pointer, _sel_stringFromDate_, date.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// secondsFromGMTForDate: + int secondsFromGMTForDate_(objc.NSDate aDate) { + return _objc_msgSend_hrsqsi( + this.ref.pointer, _sel_secondsFromGMTForDate_, aDate.ref.pointer); } - /// dateFromString: - objc.NSDate? dateFromString_(objc.NSString string) { - final _ret = - _objc_msgSend_103(this.pointer, _sel_dateFromString_, string.pointer); + /// abbreviationForDate: + objc.NSString? abbreviationForDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_abbreviationForDate_, aDate.ref.pointer); return _ret.address == 0 ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// localizedStringFromDate:dateStyle:timeStyle: - static objc.NSString localizedStringFromDate_dateStyle_timeStyle_( - objc.NSDate date, - NSDateFormatterStyle dstyle, - NSDateFormatterStyle tstyle) { - final _ret = _objc_msgSend_104( - _class_NSDateFormatter, - _sel_localizedStringFromDate_dateStyle_timeStyle_, - date.pointer, - dstyle.value, - tstyle.value); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// isDaylightSavingTimeForDate: + bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDaylightSavingTimeForDate_, aDate.ref.pointer); } - /// dateFormatFromTemplate:options:locale: - static objc.NSString? dateFormatFromTemplate_options_locale_( - objc.NSString tmplate, int opts, objc.NSLocale? locale) { - final _ret = _objc_msgSend_105( - _class_NSDateFormatter, - _sel_dateFormatFromTemplate_options_locale_, - tmplate.pointer, - opts, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// daylightSavingTimeOffsetForDate: + double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_om71r5Fpret(this.ref.pointer, + _sel_daylightSavingTimeOffsetForDate_, aDate.ref.pointer) + : _objc_msgSend_om71r5(this.ref.pointer, + _sel_daylightSavingTimeOffsetForDate_, aDate.ref.pointer); } - /// defaultFormatterBehavior - static NSDateFormatterBehavior getDefaultFormatterBehavior() { - final _ret = _objc_msgSend_106( - _class_NSDateFormatter, _sel_defaultFormatterBehavior); - return NSDateFormatterBehavior.fromValue(_ret); + /// nextDaylightSavingTimeTransitionAfterDate: + objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// setDefaultFormatterBehavior: - static void setDefaultFormatterBehavior(NSDateFormatterBehavior value) { - return _objc_msgSend_107( - _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value.value); + /// systemTimeZone + static NSTimeZone getSystemTimeZone() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_systemTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// setLocalizedDateFormatFromTemplate: - void setLocalizedDateFormatFromTemplate_(objc.NSString dateFormatTemplate) { - _objc_msgSend_108(this.pointer, _sel_setLocalizedDateFormatFromTemplate_, - dateFormatTemplate.pointer); + /// resetSystemTimeZone + static void resetSystemTimeZone() { + _objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); } - /// dateFormat - objc.NSString get dateFormat { - final _ret = _objc_msgSend_11(this.pointer, _sel_dateFormat); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// defaultTimeZone + static NSTimeZone getDefaultTimeZone() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_defaultTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// setDateFormat: - set dateFormat(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setDateFormat_, value.pointer); + /// setDefaultTimeZone: + static void setDefaultTimeZone(NSTimeZone value) { + return _objc_msgSend_ukcdfq( + _class_NSTimeZone, _sel_setDefaultTimeZone_, value.ref.pointer); } - /// dateStyle - NSDateFormatterStyle get dateStyle { - final _ret = _objc_msgSend_109(this.pointer, _sel_dateStyle); - return NSDateFormatterStyle.fromValue(_ret); + /// localTimeZone + static NSTimeZone getLocalTimeZone() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_localTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// setDateStyle: - set dateStyle(NSDateFormatterStyle value) { - return _objc_msgSend_110(this.pointer, _sel_setDateStyle_, value.value); + /// knownTimeZoneNames + static objc.NSArray getKnownTimeZoneNames() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_knownTimeZoneNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// timeStyle - NSDateFormatterStyle get timeStyle { - final _ret = _objc_msgSend_109(this.pointer, _sel_timeStyle); - return NSDateFormatterStyle.fromValue(_ret); + /// abbreviationDictionary + static objc.NSDictionary getAbbreviationDictionary() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_abbreviationDictionary); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// setTimeStyle: - set timeStyle(NSDateFormatterStyle value) { - return _objc_msgSend_110(this.pointer, _sel_setTimeStyle_, value.value); + /// setAbbreviationDictionary: + static void setAbbreviationDictionary(objc.NSDictionary value) { + return _objc_msgSend_ukcdfq( + _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.ref.pointer); } - /// locale - objc.NSLocale get locale { - final _ret = _objc_msgSend_111(this.pointer, _sel_locale); - return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); + /// timeZoneDataVersion + static objc.NSString getTimeZoneDataVersion() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_timeZoneDataVersion); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setLocale: - set locale(objc.NSLocale value) { - return _objc_msgSend_112(this.pointer, _sel_setLocale_, value.pointer); + /// secondsFromGMT + int get secondsFromGMT { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_secondsFromGMT); } - /// generatesCalendarDates - bool get generatesCalendarDates { - return _objc_msgSend_13(this.pointer, _sel_generatesCalendarDates); + /// abbreviation + objc.NSString? get abbreviation { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_abbreviation); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setGeneratesCalendarDates: - set generatesCalendarDates(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setGeneratesCalendarDates_, value); + /// isDaylightSavingTime + bool get daylightSavingTime { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDaylightSavingTime); } - /// formatterBehavior - NSDateFormatterBehavior get formatterBehavior { - final _ret = _objc_msgSend_106(this.pointer, _sel_formatterBehavior); - return NSDateFormatterBehavior.fromValue(_ret); + /// daylightSavingTimeOffset + double get daylightSavingTimeOffset { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_daylightSavingTimeOffset) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_daylightSavingTimeOffset); } - /// setFormatterBehavior: - set formatterBehavior(NSDateFormatterBehavior value) { - return _objc_msgSend_107( - this.pointer, _sel_setFormatterBehavior_, value.value); + /// nextDaylightSavingTimeTransition + objc.NSDate? get nextDaylightSavingTimeTransition { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_nextDaylightSavingTimeTransition); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// timeZone - NSTimeZone get timeZone { - final _ret = _objc_msgSend_119(this.pointer, _sel_timeZone); - return NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// description + objc.NSString get description { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setTimeZone: - set timeZone(NSTimeZone value) { - return _objc_msgSend_120(this.pointer, _sel_setTimeZone_, value.pointer); + /// isEqualToTimeZone: + bool isEqualToTimeZone_(NSTimeZone aTimeZone) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqualToTimeZone_, aTimeZone.ref.pointer); } - /// calendar - NSCalendar get calendar { - final _ret = _objc_msgSend_129(this.pointer, _sel_calendar); - return NSCalendar.castFromPointer(_ret, retain: true, release: true); + /// localizedName:locale: + objc.NSString? localizedName_locale_( + NSTimeZoneNameStyle style, objc.NSLocale? locale) { + final _ret = _objc_msgSend_1c91ngg( + this.ref.pointer, + _sel_localizedName_locale_, + style.value, + locale?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setCalendar: - set calendar(NSCalendar value) { - return _objc_msgSend_169(this.pointer, _sel_setCalendar_, value.pointer); + /// timeZoneWithName: + static NSTimeZone? timeZoneWithName_(objc.NSString tzName) { + final _ret = _objc_msgSend_juohf7( + _class_NSTimeZone, _sel_timeZoneWithName_, tzName.ref.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// isLenient - bool get lenient { - return _objc_msgSend_13(this.pointer, _sel_isLenient); + /// timeZoneWithName:data: + static NSTimeZone? timeZoneWithName_data_( + objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_iq11qg( + _class_NSTimeZone, + _sel_timeZoneWithName_data_, + tzName.ref.pointer, + aData?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// setLenient: - set lenient(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setLenient_, value); + /// initWithName: + NSTimeZone? initWithName_(objc.NSString tzName) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithName_, tzName.ref.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - /// twoDigitStartDate - objc.NSDate? get twoDigitStartDate { - final _ret = _objc_msgSend_124(this.pointer, _sel_twoDigitStartDate); + /// initWithName:data: + NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithName_data_, + tzName.ref.pointer, + aData?.ref.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - /// setTwoDigitStartDate: - set twoDigitStartDate(objc.NSDate? value) { - return _objc_msgSend_170(this.pointer, _sel_setTwoDigitStartDate_, - value?.pointer ?? ffi.nullptr); + /// timeZoneForSecondsFromGMT: + static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { + final _ret = _objc_msgSend_crtxa9( + _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// defaultDate - objc.NSDate? get defaultDate { - final _ret = _objc_msgSend_124(this.pointer, _sel_defaultDate); + /// timeZoneWithAbbreviation: + static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { + final _ret = _objc_msgSend_juohf7(_class_NSTimeZone, + _sel_timeZoneWithAbbreviation_, abbreviation.ref.pointer); return _ret.address == 0 ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// setDefaultDate: - set defaultDate(objc.NSDate? value) { - return _objc_msgSend_170( - this.pointer, _sel_setDefaultDate_, value?.pointer ?? ffi.nullptr); + /// init + NSTimeZone init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - /// eraSymbols - objc.NSArray get eraSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_eraSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// new + static NSTimeZone new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_new); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - /// setEraSymbols: - set eraSymbols(objc.NSArray value) { - return _objc_msgSend_171(this.pointer, _sel_setEraSymbols_, value.pointer); + /// allocWithZone: + static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSTimeZone, _sel_allocWithZone_, zone); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - /// monthSymbols - objc.NSArray get monthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_monthSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// alloc + static NSTimeZone alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_alloc); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - /// setMonthSymbols: - set monthSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setMonthSymbols_, value.pointer); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } - /// shortMonthSymbols - objc.NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_shortMonthSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } - /// setShortMonthSymbols: - set shortMonthSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setShortMonthSymbols_, value.pointer); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); } - /// weekdaySymbols - objc.NSArray get weekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_weekdaySymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSTimeZone, _sel_useStoredAccessor); } - /// setWeekdaySymbols: - set weekdaySymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setWeekdaySymbols_, value.pointer); + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSTimeZone, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// shortWeekdaySymbols - objc.NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_shortWeekdaySymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSTimeZone, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } - /// setShortWeekdaySymbols: - set shortWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setShortWeekdaySymbols_, value.pointer); + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSTimeZone, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } - /// AMSymbol - objc.NSString get AMSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_AMSymbol); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setAMSymbol: - set AMSymbol(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setAMSymbol_, value.pointer); + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// PMSymbol - objc.NSString get PMSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_PMSymbol); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// setPMSymbol: - set PMSymbol(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setPMSymbol_, value.pointer); - } - - /// longEraSymbols - objc.NSArray get longEraSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_longEraSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setLongEraSymbols: - set longEraSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setLongEraSymbols_, value.pointer); - } - - /// veryShortMonthSymbols - objc.NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_veryShortMonthSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setVeryShortMonthSymbols: - set veryShortMonthSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setVeryShortMonthSymbols_, value.pointer); - } - - /// standaloneMonthSymbols - objc.NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_standaloneMonthSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setStandaloneMonthSymbols: - set standaloneMonthSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setStandaloneMonthSymbols_, value.pointer); - } - - /// shortStandaloneMonthSymbols - objc.NSArray get shortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_shortStandaloneMonthSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setShortStandaloneMonthSymbols: - set shortStandaloneMonthSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setShortStandaloneMonthSymbols_, value.pointer); - } - - /// veryShortStandaloneMonthSymbols - objc.NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_veryShortStandaloneMonthSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setVeryShortStandaloneMonthSymbols: - set veryShortStandaloneMonthSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.pointer); - } - - /// veryShortWeekdaySymbols - objc.NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_veryShortWeekdaySymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setVeryShortWeekdaySymbols: - set veryShortWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setVeryShortWeekdaySymbols_, value.pointer); - } - - /// standaloneWeekdaySymbols - objc.NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_standaloneWeekdaySymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setStandaloneWeekdaySymbols: - set standaloneWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setStandaloneWeekdaySymbols_, value.pointer); - } - - /// shortStandaloneWeekdaySymbols - objc.NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_shortStandaloneWeekdaySymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setShortStandaloneWeekdaySymbols: - set shortStandaloneWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.pointer); - } - - /// veryShortStandaloneWeekdaySymbols - objc.NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSTimeZone, _sel_supportsSecureCoding); } +} - /// setVeryShortStandaloneWeekdaySymbols: - set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_171(this.pointer, - _sel_setVeryShortStandaloneWeekdaySymbols_, value.pointer); - } +late final _sel_timeZone = objc.registerName("timeZone"); +late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); +late final _class_NSCalendar = objc.getClass("NSCalendar"); +late final _sel_currentCalendar = objc.registerName("currentCalendar"); +late final _sel_autoupdatingCurrentCalendar = + objc.registerName("autoupdatingCurrentCalendar"); +late final _sel_calendarWithIdentifier_ = + objc.registerName("calendarWithIdentifier:"); +late final _sel_initWithCalendarIdentifier_ = + objc.registerName("initWithCalendarIdentifier:"); +late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); +late final _sel_firstWeekday = objc.registerName("firstWeekday"); +late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); +final _objc_msgSend_1k4zaz5 = 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_minimumDaysInFirstWeek = + objc.registerName("minimumDaysInFirstWeek"); +late final _sel_setMinimumDaysInFirstWeek_ = + objc.registerName("setMinimumDaysInFirstWeek:"); +late final _sel_eraSymbols = objc.registerName("eraSymbols"); +late final _sel_longEraSymbols = objc.registerName("longEraSymbols"); +late final _sel_monthSymbols = objc.registerName("monthSymbols"); +late final _sel_shortMonthSymbols = objc.registerName("shortMonthSymbols"); +late final _sel_veryShortMonthSymbols = + objc.registerName("veryShortMonthSymbols"); +late final _sel_standaloneMonthSymbols = + objc.registerName("standaloneMonthSymbols"); +late final _sel_shortStandaloneMonthSymbols = + objc.registerName("shortStandaloneMonthSymbols"); +late final _sel_veryShortStandaloneMonthSymbols = + objc.registerName("veryShortStandaloneMonthSymbols"); +late final _sel_weekdaySymbols = objc.registerName("weekdaySymbols"); +late final _sel_shortWeekdaySymbols = objc.registerName("shortWeekdaySymbols"); +late final _sel_veryShortWeekdaySymbols = + objc.registerName("veryShortWeekdaySymbols"); +late final _sel_standaloneWeekdaySymbols = + objc.registerName("standaloneWeekdaySymbols"); +late final _sel_shortStandaloneWeekdaySymbols = + objc.registerName("shortStandaloneWeekdaySymbols"); +late final _sel_veryShortStandaloneWeekdaySymbols = + objc.registerName("veryShortStandaloneWeekdaySymbols"); +late final _sel_quarterSymbols = objc.registerName("quarterSymbols"); +late final _sel_shortQuarterSymbols = objc.registerName("shortQuarterSymbols"); +late final _sel_standaloneQuarterSymbols = + objc.registerName("standaloneQuarterSymbols"); +late final _sel_shortStandaloneQuarterSymbols = + objc.registerName("shortStandaloneQuarterSymbols"); +late final _sel_AMSymbol = objc.registerName("AMSymbol"); +late final _sel_PMSymbol = objc.registerName("PMSymbol"); - /// quarterSymbols - objc.NSArray get quarterSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_quarterSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } +enum NSCalendarUnit { + NSCalendarUnitEra(2), + NSCalendarUnitYear(4), + NSCalendarUnitMonth(8), + NSCalendarUnitDay(16), + NSCalendarUnitHour(32), + NSCalendarUnitMinute(64), + NSCalendarUnitSecond(128), + NSCalendarUnitWeekday(512), + NSCalendarUnitWeekdayOrdinal(1024), + NSCalendarUnitQuarter(2048), + NSCalendarUnitWeekOfMonth(4096), + NSCalendarUnitWeekOfYear(8192), + NSCalendarUnitYearForWeekOfYear(16384), + NSCalendarUnitNanosecond(32768), + NSCalendarUnitCalendar(1048576), + NSCalendarUnitTimeZone(2097152), + NSWeekCalendarUnit(256); - /// setQuarterSymbols: - set quarterSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setQuarterSymbols_, value.pointer); - } + static const NSEraCalendarUnit = NSCalendarUnitEra; + static const NSYearCalendarUnit = NSCalendarUnitYear; + static const NSMonthCalendarUnit = NSCalendarUnitMonth; + static const NSDayCalendarUnit = NSCalendarUnitDay; + static const NSHourCalendarUnit = NSCalendarUnitHour; + static const NSMinuteCalendarUnit = NSCalendarUnitMinute; + static const NSSecondCalendarUnit = NSCalendarUnitSecond; + static const NSWeekdayCalendarUnit = NSCalendarUnitWeekday; + static const NSWeekdayOrdinalCalendarUnit = NSCalendarUnitWeekdayOrdinal; + static const NSQuarterCalendarUnit = NSCalendarUnitQuarter; + static const NSWeekOfMonthCalendarUnit = NSCalendarUnitWeekOfMonth; + static const NSWeekOfYearCalendarUnit = NSCalendarUnitWeekOfYear; + static const NSYearForWeekOfYearCalendarUnit = + NSCalendarUnitYearForWeekOfYear; + static const NSCalendarCalendarUnit = NSCalendarUnitCalendar; + static const NSTimeZoneCalendarUnit = NSCalendarUnitTimeZone; - /// shortQuarterSymbols - objc.NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_shortQuarterSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSCalendarUnit(this.value); - /// setShortQuarterSymbols: - set shortQuarterSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setShortQuarterSymbols_, value.pointer); - } + static NSCalendarUnit fromValue(int value) => switch (value) { + 2 => NSCalendarUnitEra, + 4 => NSCalendarUnitYear, + 8 => NSCalendarUnitMonth, + 16 => NSCalendarUnitDay, + 32 => NSCalendarUnitHour, + 64 => NSCalendarUnitMinute, + 128 => NSCalendarUnitSecond, + 512 => NSCalendarUnitWeekday, + 1024 => NSCalendarUnitWeekdayOrdinal, + 2048 => NSCalendarUnitQuarter, + 4096 => NSCalendarUnitWeekOfMonth, + 8192 => NSCalendarUnitWeekOfYear, + 16384 => NSCalendarUnitYearForWeekOfYear, + 32768 => NSCalendarUnitNanosecond, + 1048576 => NSCalendarUnitCalendar, + 2097152 => NSCalendarUnitTimeZone, + 256 => NSWeekCalendarUnit, + _ => throw ArgumentError("Unknown value for NSCalendarUnit: $value"), + }; - /// standaloneQuarterSymbols - objc.NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_standaloneQuarterSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + @override + String toString() { + if (this == NSCalendarUnitEra) + return "NSCalendarUnit.NSCalendarUnitEra, NSCalendarUnit.NSEraCalendarUnit"; + if (this == NSCalendarUnitYear) + return "NSCalendarUnit.NSCalendarUnitYear, NSCalendarUnit.NSYearCalendarUnit"; + if (this == NSCalendarUnitMonth) + return "NSCalendarUnit.NSCalendarUnitMonth, NSCalendarUnit.NSMonthCalendarUnit"; + if (this == NSCalendarUnitDay) + return "NSCalendarUnit.NSCalendarUnitDay, NSCalendarUnit.NSDayCalendarUnit"; + if (this == NSCalendarUnitHour) + return "NSCalendarUnit.NSCalendarUnitHour, NSCalendarUnit.NSHourCalendarUnit"; + if (this == NSCalendarUnitMinute) + return "NSCalendarUnit.NSCalendarUnitMinute, NSCalendarUnit.NSMinuteCalendarUnit"; + if (this == NSCalendarUnitSecond) + return "NSCalendarUnit.NSCalendarUnitSecond, NSCalendarUnit.NSSecondCalendarUnit"; + if (this == NSCalendarUnitWeekday) + return "NSCalendarUnit.NSCalendarUnitWeekday, NSCalendarUnit.NSWeekdayCalendarUnit"; + if (this == NSCalendarUnitWeekdayOrdinal) + return "NSCalendarUnit.NSCalendarUnitWeekdayOrdinal, NSCalendarUnit.NSWeekdayOrdinalCalendarUnit"; + if (this == NSCalendarUnitQuarter) + return "NSCalendarUnit.NSCalendarUnitQuarter, NSCalendarUnit.NSQuarterCalendarUnit"; + if (this == NSCalendarUnitWeekOfMonth) + return "NSCalendarUnit.NSCalendarUnitWeekOfMonth, NSCalendarUnit.NSWeekOfMonthCalendarUnit"; + if (this == NSCalendarUnitWeekOfYear) + return "NSCalendarUnit.NSCalendarUnitWeekOfYear, NSCalendarUnit.NSWeekOfYearCalendarUnit"; + if (this == NSCalendarUnitYearForWeekOfYear) + return "NSCalendarUnit.NSCalendarUnitYearForWeekOfYear, NSCalendarUnit.NSYearForWeekOfYearCalendarUnit"; + if (this == NSCalendarUnitCalendar) + return "NSCalendarUnit.NSCalendarUnitCalendar, NSCalendarUnit.NSCalendarCalendarUnit"; + if (this == NSCalendarUnitTimeZone) + return "NSCalendarUnit.NSCalendarUnitTimeZone, NSCalendarUnit.NSTimeZoneCalendarUnit"; + return super.toString(); } +} - /// setStandaloneQuarterSymbols: - set standaloneQuarterSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setStandaloneQuarterSymbols_, value.pointer); - } - - /// shortStandaloneQuarterSymbols - objc.NSArray get shortStandaloneQuarterSymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_shortStandaloneQuarterSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setShortStandaloneQuarterSymbols: - set shortStandaloneQuarterSymbols(objc.NSArray value) { - return _objc_msgSend_171( - this.pointer, _sel_setShortStandaloneQuarterSymbols_, value.pointer); - } - - /// gregorianStartDate - objc.NSDate? get gregorianStartDate { - final _ret = _objc_msgSend_124(this.pointer, _sel_gregorianStartDate); - return _ret.address == 0 - ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); - } - - /// setGregorianStartDate: - set gregorianStartDate(objc.NSDate? value) { - return _objc_msgSend_170(this.pointer, _sel_setGregorianStartDate_, - value?.pointer ?? ffi.nullptr); - } - - /// doesRelativeDateFormatting - bool get doesRelativeDateFormatting { - return _objc_msgSend_13(this.pointer, _sel_doesRelativeDateFormatting); - } - - /// setDoesRelativeDateFormatting: - set doesRelativeDateFormatting(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setDoesRelativeDateFormatting_, value); - } - - /// initWithDateFormat:allowNaturalLanguage: - objc.ObjCObjectBase initWithDateFormat_allowNaturalLanguage_( - objc.NSString format, bool flag) { - final _ret = _objc_msgSend_172(this.pointer, - _sel_initWithDateFormat_allowNaturalLanguage_, format.pointer, flag); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// allowsNaturalLanguage - bool allowsNaturalLanguage() { - return _objc_msgSend_13(this.pointer, _sel_allowsNaturalLanguage); - } - - /// init - NSDateFormatter init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); - } - - /// new - static NSDateFormatter new1() { - final _ret = _objc_msgSend_19(_class_NSDateFormatter, _sel_new); - return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); - } - - /// allocWithZone: - static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSDateFormatter, _sel_allocWithZone_, zone); - return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); - } - - /// alloc - static NSDateFormatter alloc() { - final _ret = _objc_msgSend_19(_class_NSDateFormatter, _sel_alloc); - return NSDateFormatter.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_NSDateFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSDateFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); - } - - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSDateFormatter, _sel_useStoredAccessor); - } - - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSDateFormatter, - _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_NSDateFormatter, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSDateFormatter, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } -} - -late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); - -enum NSFormattingContext { - NSFormattingContextUnknown(0), - NSFormattingContextDynamic(1), - NSFormattingContextStandalone(2), - NSFormattingContextListItem(3), - NSFormattingContextBeginningOfSentence(4), - NSFormattingContextMiddleOfSentence(5); - - final int value; - const NSFormattingContext(this.value); - - static NSFormattingContext fromValue(int value) => switch (value) { - 0 => NSFormattingContextUnknown, - 1 => NSFormattingContextDynamic, - 2 => NSFormattingContextStandalone, - 3 => NSFormattingContextListItem, - 4 => NSFormattingContextBeginningOfSentence, - 5 => NSFormattingContextMiddleOfSentence, - _ => - throw ArgumentError("Unknown value for NSFormattingContext: $value"), - }; -} - -late final _sel_formattingContext = objc.registerName("formattingContext"); -final _objc_msgSend_99 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setFormattingContext_ = - objc.registerName("setFormattingContext:"); -final _objc_msgSend_100 = objc.msgSendPointer +late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); +final _objc_msgSend_8biqtb = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, + objc.NSRange Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function(ffi.Pointer, + objc.NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_getObjectValue_forString_range_error_ = - objc.registerName("getObjectValue:forString:range:error:"); -final _objc_msgSend_101 = objc.msgSendPointer +final _objc_msgSend_8biqtbStret = objc.msgSendStretPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.Pointer>)>>() + ffi.UnsignedLong)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.Pointer>)>(); -late final _sel_stringFromDate_ = objc.registerName("stringFromDate:"); -final _objc_msgSend_102 = objc.msgSendPointer + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_maximumRangeOfUnit_ = objc.registerName("maximumRangeOfUnit:"); +late final _sel_rangeOfUnit_inUnit_forDate_ = + objc.registerName("rangeOfUnit:inUnit:forDate:"); +final _objc_msgSend_1lmqh7m = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + objc.NSRange Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_dateFromString_ = objc.registerName("dateFromString:"); -final _objc_msgSend_103 = objc.msgSendPointer + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +final _objc_msgSend_1lmqh7mStret = objc.msgSendStretPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -enum NSDateFormatterStyle { - NSDateFormatterNoStyle(0), - NSDateFormatterShortStyle(1), - NSDateFormatterMediumStyle(2), - NSDateFormatterLongStyle(3), - NSDateFormatterFullStyle(4); - - final int value; - const NSDateFormatterStyle(this.value); - - static NSDateFormatterStyle fromValue(int value) => switch (value) { - 0 => NSDateFormatterNoStyle, - 1 => NSDateFormatterShortStyle, - 2 => NSDateFormatterMediumStyle, - 3 => NSDateFormatterLongStyle, - 4 => NSDateFormatterFullStyle, - _ => - throw ArgumentError("Unknown value for NSDateFormatterStyle: $value"), - }; -} - -late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = - objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); -final _objc_msgSend_104 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_ordinalityOfUnit_inUnit_forDate_ = + objc.registerName("ordinalityOfUnit:inUnit:forDate:"); +final _objc_msgSend_1bi4n7h = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong, - ffi.UnsignedLong)>>() + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, - int)>(); -late final _sel_dateFormatFromTemplate_options_locale_ = - objc.registerName("dateFormatFromTemplate:options:locale:"); -final _objc_msgSend_105 = objc.msgSendPointer + int, + ffi.Pointer)>(); +late final _sel_rangeOfUnit_startDate_interval_forDate_ = + objc.registerName("rangeOfUnit:startDate:interval:forDate:"); +final _objc_msgSend_amvrpq = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, + ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); - -enum NSDateFormatterBehavior { - NSDateFormatterBehaviorDefault(0), - NSDateFormatterBehavior10_0(1000), - NSDateFormatterBehavior10_4(1040); - - final int value; - const NSDateFormatterBehavior(this.value); - - static NSDateFormatterBehavior fromValue(int value) => switch (value) { - 0 => NSDateFormatterBehaviorDefault, - 1000 => NSDateFormatterBehavior10_0, - 1040 => NSDateFormatterBehavior10_4, - _ => throw ArgumentError( - "Unknown value for NSDateFormatterBehavior: $value"), - }; -} - -late final _sel_defaultFormatterBehavior = - objc.registerName("defaultFormatterBehavior"); -final _objc_msgSend_106 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefaultFormatterBehavior_ = - objc.registerName("setDefaultFormatterBehavior:"); -final _objc_msgSend_107 = objc.msgSendPointer +late final _class_NSDateComponents = objc.getClass("NSDateComponents"); +late final _sel_calendar = objc.registerName("calendar"); +late final _sel_setCalendar_ = objc.registerName("setCalendar:"); +late final _sel_era = objc.registerName("era"); +late final _sel_setEra_ = objc.registerName("setEra:"); +final _objc_msgSend_ke7qz2 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Pointer, ffi.Long)>>() .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_setLocalizedDateFormatFromTemplate_ = - objc.registerName("setLocalizedDateFormatFromTemplate:"); -final _objc_msgSend_108 = objc.msgSendPointer +late final _sel_year = objc.registerName("year"); +late final _sel_setYear_ = objc.registerName("setYear:"); +late final _sel_month = objc.registerName("month"); +late final _sel_setMonth_ = objc.registerName("setMonth:"); +late final _sel_day = objc.registerName("day"); +late final _sel_setDay_ = objc.registerName("setDay:"); +late final _sel_hour = objc.registerName("hour"); +late final _sel_setHour_ = objc.registerName("setHour:"); +late final _sel_minute = objc.registerName("minute"); +late final _sel_setMinute_ = objc.registerName("setMinute:"); +late final _sel_second = objc.registerName("second"); +late final _sel_setSecond_ = objc.registerName("setSecond:"); +late final _sel_nanosecond = objc.registerName("nanosecond"); +late final _sel_setNanosecond_ = objc.registerName("setNanosecond:"); +late final _sel_weekday = objc.registerName("weekday"); +late final _sel_setWeekday_ = objc.registerName("setWeekday:"); +late final _sel_weekdayOrdinal = objc.registerName("weekdayOrdinal"); +late final _sel_setWeekdayOrdinal_ = objc.registerName("setWeekdayOrdinal:"); +late final _sel_quarter = objc.registerName("quarter"); +late final _sel_setQuarter_ = objc.registerName("setQuarter:"); +late final _sel_weekOfMonth = objc.registerName("weekOfMonth"); +late final _sel_setWeekOfMonth_ = objc.registerName("setWeekOfMonth:"); +late final _sel_weekOfYear = objc.registerName("weekOfYear"); +late final _sel_setWeekOfYear_ = objc.registerName("setWeekOfYear:"); +late final _sel_yearForWeekOfYear = objc.registerName("yearForWeekOfYear"); +late final _sel_setYearForWeekOfYear_ = + objc.registerName("setYearForWeekOfYear:"); +late final _sel_isLeapMonth = objc.registerName("isLeapMonth"); +late final _sel_setLeapMonth_ = objc.registerName("setLeapMonth:"); +late final _sel_date = objc.registerName("date"); +late final _sel_week = objc.registerName("week"); +late final _sel_setWeek_ = objc.registerName("setWeek:"); +late final _sel_setValue_forComponent_ = + objc.registerName("setValue:forComponent:"); +final _objc_msgSend_13g4496 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_dateFormat = objc.registerName("dateFormat"); -late final _sel_setDateFormat_ = objc.registerName("setDateFormat:"); -late final _sel_dateStyle = objc.registerName("dateStyle"); -final _objc_msgSend_109 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); -final _objc_msgSend_110 = objc.msgSendPointer + ffi.Pointer, int, int)>(); +late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); +final _objc_msgSend_1uobo2v = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, + ffi.Long Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function(ffi.Pointer, + int Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_timeStyle = objc.registerName("timeStyle"); -late final _sel_setTimeStyle_ = objc.registerName("setTimeStyle:"); -late final _sel_locale = objc.registerName("locale"); -final _objc_msgSend_111 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setLocale_ = objc.registerName("setLocale:"); -final _objc_msgSend_112 = 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_generatesCalendarDates = - objc.registerName("generatesCalendarDates"); -late final _sel_setGeneratesCalendarDates_ = - objc.registerName("setGeneratesCalendarDates:"); -late final _sel_formatterBehavior = objc.registerName("formatterBehavior"); -late final _sel_setFormatterBehavior_ = - objc.registerName("setFormatterBehavior:"); +late final _sel_isValidDate = objc.registerName("isValidDate"); +late final _sel_isValidDateInCalendar_ = + objc.registerName("isValidDateInCalendar:"); -/// NSTimeZone -class NSTimeZone extends objc.NSObject { - NSTimeZone._(ffi.Pointer pointer, +/// NSDateComponents +class NSDateComponents extends objc.NSObject { + NSDateComponents._(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 [NSDateComponents] that points to the same underlying object as [other]. + NSDateComponents.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSTimeZone] that wraps the given raw object pointer. - NSTimeZone.castFromPointer(ffi.Pointer other, + /// Constructs a [NSDateComponents] that wraps the given raw object pointer. + NSDateComponents.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSTimeZone]. + /// Returns whether [obj] is an instance of [NSDateComponents]. 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); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateComponents); } - /// data - objc.NSData get data { - final _ret = _objc_msgSend_113(this.pointer, _sel_data); - return objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// calendar + NSCalendar? get calendar { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_calendar); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - /// secondsFromGMTForDate: - int secondsFromGMTForDate_(objc.NSDate aDate) { - return _objc_msgSend_114( - this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); + /// setCalendar: + set calendar(NSCalendar? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCalendar_, value?.ref.pointer ?? ffi.nullptr); } - /// abbreviationForDate: - objc.NSString? abbreviationForDate_(objc.NSDate aDate) { - final _ret = _objc_msgSend_115( - this.pointer, _sel_abbreviationForDate_, aDate.pointer); + /// timeZone + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_timeZone); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// isDaylightSavingTimeForDate: - bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { - return _objc_msgSend_116( - this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); + /// setTimeZone: + set timeZone(NSTimeZone? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTimeZone_, value?.ref.pointer ?? ffi.nullptr); } - /// daylightSavingTimeOffsetForDate: - double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { - return objc.useMsgSendVariants - ? _objc_msgSend_117Fpret( - this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) - : _objc_msgSend_117( - this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); + /// era + int get era { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_era); } - /// nextDaylightSavingTimeTransitionAfterDate: - objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { - final _ret = _objc_msgSend_118(this.pointer, - _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); - return _ret.address == 0 - ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + /// setEra: + set era(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setEra_, value); } - /// systemTimeZone - static NSTimeZone getSystemTimeZone() { - final _ret = _objc_msgSend_119(_class_NSTimeZone, _sel_systemTimeZone); - return NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// year + int get year { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_year); } - /// resetSystemTimeZone - static void resetSystemTimeZone() { - _objc_msgSend_7(_class_NSTimeZone, _sel_resetSystemTimeZone); + /// setYear: + set year(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setYear_, value); } - /// defaultTimeZone - static NSTimeZone getDefaultTimeZone() { - final _ret = _objc_msgSend_119(_class_NSTimeZone, _sel_defaultTimeZone); - return NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// month + int get month { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_month); } - /// setDefaultTimeZone: - static void setDefaultTimeZone(NSTimeZone value) { - return _objc_msgSend_120( - _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); + /// setMonth: + set month(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setMonth_, value); } - /// localTimeZone - static NSTimeZone getLocalTimeZone() { - final _ret = _objc_msgSend_119(_class_NSTimeZone, _sel_localTimeZone); - return NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// day + int get day { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_day); } - /// knownTimeZoneNames - static objc.NSArray getKnownTimeZoneNames() { - final _ret = _objc_msgSend_33(_class_NSTimeZone, _sel_knownTimeZoneNames); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// setDay: + set day(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setDay_, value); } - /// abbreviationDictionary - static objc.NSDictionary getAbbreviationDictionary() { - final _ret = - _objc_msgSend_121(_class_NSTimeZone, _sel_abbreviationDictionary); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// hour + int get hour { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_hour); } - /// setAbbreviationDictionary: - static void setAbbreviationDictionary(objc.NSDictionary value) { - return _objc_msgSend_122( - _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); + /// setHour: + set hour(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setHour_, value); } - /// timeZoneDataVersion - static objc.NSString getTimeZoneDataVersion() { - final _ret = _objc_msgSend_11(_class_NSTimeZone, _sel_timeZoneDataVersion); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// minute + int get minute { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_minute); } - /// secondsFromGMT - int get secondsFromGMT { - return _objc_msgSend_123(this.pointer, _sel_secondsFromGMT); + /// setMinute: + set minute(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setMinute_, value); } - /// 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); + /// second + int get second { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_second); } - /// isDaylightSavingTime - bool get daylightSavingTime { - return _objc_msgSend_13(this.pointer, _sel_isDaylightSavingTime); + /// setSecond: + set second(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setSecond_, value); } - /// daylightSavingTimeOffset - double get daylightSavingTimeOffset { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_daylightSavingTimeOffset) - : _objc_msgSend_18(this.pointer, _sel_daylightSavingTimeOffset); + /// nanosecond + int get nanosecond { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_nanosecond); } - /// nextDaylightSavingTimeTransition - objc.NSDate? get nextDaylightSavingTimeTransition { - final _ret = - _objc_msgSend_124(this.pointer, _sel_nextDaylightSavingTimeTransition); - return _ret.address == 0 - ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + /// setNanosecond: + set nanosecond(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setNanosecond_, value); } - /// description - objc.NSString get description { - final _ret = _objc_msgSend_11(this.pointer, _sel_description); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// weekday + int get weekday { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekday); } - /// isEqualToTimeZone: - bool isEqualToTimeZone_(NSTimeZone aTimeZone) { - return _objc_msgSend_125( - this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); + /// setWeekday: + set weekday(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeekday_, value); } - /// localizedName:locale: - objc.NSString? localizedName_locale_( - NSTimeZoneNameStyle style, objc.NSLocale? locale) { - final _ret = _objc_msgSend_126(this.pointer, _sel_localizedName_locale_, - style.value, locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// weekdayOrdinal + int get weekdayOrdinal { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekdayOrdinal); } - /// timeZoneWithName: - static NSTimeZone? timeZoneWithName_(objc.NSString tzName) { - final _ret = _objc_msgSend_35( - _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); - return _ret.address == 0 - ? null - : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// setWeekdayOrdinal: + set weekdayOrdinal(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setWeekdayOrdinal_, value); } - /// timeZoneWithName:data: - static NSTimeZone? timeZoneWithName_data_( - objc.NSString tzName, objc.NSData? aData) { - final _ret = _objc_msgSend_127( - _class_NSTimeZone, - _sel_timeZoneWithName_data_, - tzName.pointer, - aData?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// quarter + int get quarter { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_quarter); } - /// initWithName: - NSTimeZone? initWithName_(objc.NSString tzName) { - final _ret = - _objc_msgSend_35(this.pointer, _sel_initWithName_, tzName.pointer); - return _ret.address == 0 - ? null - : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// setQuarter: + set quarter(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setQuarter_, value); } - /// initWithName:data: - NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { - final _ret = _objc_msgSend_127(this.pointer, _sel_initWithName_data_, - tzName.pointer, aData?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// weekOfMonth + int get weekOfMonth { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekOfMonth); } - /// timeZoneForSecondsFromGMT: - static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { - final _ret = _objc_msgSend_128( - _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); - return NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// setWeekOfMonth: + set weekOfMonth(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeekOfMonth_, value); } - /// timeZoneWithAbbreviation: - static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { - final _ret = _objc_msgSend_35(_class_NSTimeZone, - _sel_timeZoneWithAbbreviation_, abbreviation.pointer); + /// weekOfYear + int get weekOfYear { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekOfYear); + } + + /// setWeekOfYear: + set weekOfYear(int value) { + return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeekOfYear_, value); + } + + /// yearForWeekOfYear + int get yearForWeekOfYear { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_yearForWeekOfYear); + } + + /// setYearForWeekOfYear: + set yearForWeekOfYear(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setYearForWeekOfYear_, value); + } + + /// isLeapMonth + bool get leapMonth { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLeapMonth); + } + + /// setLeapMonth: + set leapMonth(bool value) { + return _objc_msgSend_117qins(this.ref.pointer, _sel_setLeapMonth_, value); + } + + /// date + objc.NSDate? get date { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_date); return _ret.address == 0 ? null - : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } + + /// week + int week() { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_week); + } + + /// setWeek: + void setWeek_(int v) { + _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeek_, v); + } + + /// setValue:forComponent: + void setValue_forComponent_(int value, NSCalendarUnit unit) { + _objc_msgSend_13g4496( + this.ref.pointer, _sel_setValue_forComponent_, value, unit.value); + } + + /// valueForComponent: + int valueForComponent_(NSCalendarUnit unit) { + return _objc_msgSend_1uobo2v( + this.ref.pointer, _sel_valueForComponent_, unit.value); + } + + /// isValidDate + bool get validDate { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValidDate); + } + + /// isValidDateInCalendar: + bool isValidDateInCalendar_(NSCalendar calendar) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isValidDateInCalendar_, calendar.ref.pointer); } /// init - NSTimeZone init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSTimeZone.castFromPointer(_ret, retain: true, release: true); + NSDateComponents init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } /// new - static NSTimeZone new1() { - final _ret = _objc_msgSend_19(_class_NSTimeZone, _sel_new); - return NSTimeZone.castFromPointer(_ret, retain: false, release: true); + static NSDateComponents new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDateComponents, _sel_new); + return NSDateComponents.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); + static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDateComponents, _sel_allocWithZone_, zone); + return NSDateComponents.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); + static NSDateComponents alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDateComponents, _sel_alloc); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -5370,346 +6086,674 @@ class NSTimeZone extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSTimeZone, + _objc_msgSend_cqxsqq( + _class_NSDateComponents, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSTimeZone, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSDateComponents, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSTimeZone, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSDateComponents, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSTimeZone, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSDateComponents, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSDateComponents, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSTimeZone, + _objc_msgSend_1tjlcwl( + _class_NSDateComponents, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateComponents, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateComponents, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSDateComponents self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSDateComponents retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSDateComponents autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSDateComponents, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSDateComponents? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDateComponents.castFromPointer(_ret, retain: false, release: true); + } } -late final _class_NSTimeZone = objc.getClass("NSTimeZone"); -late final _sel_name = objc.registerName("name"); -late final _sel_data = objc.registerName("data"); -final _objc_msgSend_113 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_secondsFromGMTForDate_ = - objc.registerName("secondsFromGMTForDate:"); -final _objc_msgSend_114 = objc.msgSendPointer +late final _sel_dateFromComponents_ = objc.registerName("dateFromComponents:"); +late final _sel_components_fromDate_ = + objc.registerName("components:fromDate:"); +final _objc_msgSend_t9w2ff = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_abbreviationForDate_ = - objc.registerName("abbreviationForDate:"); -final _objc_msgSend_115 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +enum NSCalendarOptions { + NSCalendarWrapComponents(1), + NSCalendarMatchStrictly(2), + NSCalendarSearchBackwards(4), + NSCalendarMatchPreviousTimePreservingSmallerUnits(256), + NSCalendarMatchNextTimePreservingSmallerUnits(512), + NSCalendarMatchNextTime(1024), + NSCalendarMatchFirst(4096), + NSCalendarMatchLast(8192); + + final int value; + const NSCalendarOptions(this.value); + + static NSCalendarOptions fromValue(int value) => switch (value) { + 1 => NSCalendarWrapComponents, + 2 => NSCalendarMatchStrictly, + 4 => NSCalendarSearchBackwards, + 256 => NSCalendarMatchPreviousTimePreservingSmallerUnits, + 512 => NSCalendarMatchNextTimePreservingSmallerUnits, + 1024 => NSCalendarMatchNextTime, + 4096 => NSCalendarMatchFirst, + 8192 => NSCalendarMatchLast, + _ => throw ArgumentError("Unknown value for NSCalendarOptions: $value"), + }; +} + +late final _sel_dateByAddingComponents_toDate_options_ = + objc.registerName("dateByAddingComponents:toDate:options:"); +final _objc_msgSend_2sm1zi = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isDaylightSavingTimeForDate_ = - objc.registerName("isDaylightSavingTimeForDate:"); -final _objc_msgSend_116 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_components_fromDate_toDate_options_ = + objc.registerName("components:fromDate:toDate:options:"); +final _objc_msgSend_1jc93x2 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_daylightSavingTimeOffsetForDate_ = - objc.registerName("daylightSavingTimeOffsetForDate:"); -final _objc_msgSend_117 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_getEra_year_month_day_fromDate_ = + objc.registerName("getEra:year:month:day:fromDate:"); +final _objc_msgSend_1ermmsa = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Double Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_117Fpret = objc.msgSendFpretPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_ = + objc.registerName("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); +late final _sel_getHour_minute_second_nanosecond_fromDate_ = + objc.registerName("getHour:minute:second:nanosecond:fromDate:"); +late final _sel_component_fromDate_ = objc.registerName("component:fromDate:"); +final _objc_msgSend_tm9h70 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Double Function( + ffi.Long Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = - objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); -final _objc_msgSend_118 = objc.msgSendPointer + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_ = objc + .registerName("dateWithEra:year:month:day:hour:minute:second:nanosecond:"); +final _objc_msgSend_1747i7s = 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_119 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>() .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_120 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int, + int, + int, + int, + int)>(); +late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_ = + objc.registerName( + "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); +late final _sel_startOfDayForDate_ = objc.registerName("startOfDayForDate:"); +late final _sel_componentsInTimeZone_fromDate_ = + objc.registerName("componentsInTimeZone:fromDate:"); +late final _sel_compareDate_toDate_toUnitGranularity_ = + objc.registerName("compareDate:toDate:toUnitGranularity:"); +final _objc_msgSend_jpc2bg = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Long Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .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"); -final _objc_msgSend_121 = objc.msgSendPointer + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_equalToDate_toUnitGranularity_ = + objc.registerName("isDate:equalToDate:toUnitGranularity:"); +final _objc_msgSend_188aig1 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setAbbreviationDictionary_ = - objc.registerName("setAbbreviationDictionary:"); -final _objc_msgSend_122 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_inSameDayAsDate_ = + objc.registerName("isDate:inSameDayAsDate:"); +final _objc_msgSend_1ywe6ev = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, 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"); -final _objc_msgSend_123 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -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"); -final _objc_msgSend_124 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_description = objc.registerName("description"); -late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); -final _objc_msgSend_125 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_isDateInToday_ = objc.registerName("isDateInToday:"); +late final _sel_isDateInYesterday_ = objc.registerName("isDateInYesterday:"); +late final _sel_isDateInTomorrow_ = objc.registerName("isDateInTomorrow:"); +late final _sel_isDateInWeekend_ = objc.registerName("isDateInWeekend:"); +late final _sel_rangeOfWeekendStartDate_interval_containingDate_ = + objc.registerName("rangeOfWeekendStartDate:interval:containingDate:"); +final _objc_msgSend_seipso = 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)>(); - -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_126 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_nextWeekendStartDate_interval_options_afterDate_ = + objc.registerName("nextWeekendStartDate:interval:options:afterDate:"); +final _objc_msgSend_1brdgri = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, + 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_127 = objc.msgSendPointer +late final _sel_components_fromDateComponents_toDateComponents_options_ = objc + .registerName("components:fromDateComponents:toDateComponents:options:"); +late final _sel_dateByAddingUnit_value_toDate_options_ = + objc.registerName("dateByAddingUnit:value:toDate:options:"); +final _objc_msgSend_b1fge4 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.Long, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + int, + int, 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_128 = 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"); -late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); + int)>(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} -/// NSCalendar -class NSCalendar extends objc.NSObject { - NSCalendar._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerTrampoline) + ..keepIsolateAlive = false; - /// Constructs a [NSCalendar] that points to the same underlying object as [other]. - NSCalendar.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSDate_bool_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + objc.NSDate?, ffi.Bool, ffi.Pointer)>(pointer, + retain: retain, release: release); - /// Constructs a [NSCalendar] that wraps the given raw object pointer. - NSCalendar.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [NSCalendar]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCalendar); + /// 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. + static objc.ObjCBlock)> fromFunction( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureCallable, + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : objc.NSDate.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + listener(void Function(objc.NSDate?, bool, ffi.Pointer) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSDate.castFromPointer(arg0, + retain: false, release: true), + arg1, + arg2)); + final wrapper = _wrapListenerBlock_rvgf02(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, + ffi.Pointer)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSDate_bool_bool_CallExtension on objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> { + void call(objc.NSDate? arg0, bool arg1, ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = + objc.registerName( + "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); +final _objc_msgSend_z9v2cv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_nextDateAfterDate_matchingComponents_options_ = + objc.registerName("nextDateAfterDate:matchingComponents:options:"); +late final _sel_nextDateAfterDate_matchingUnit_value_options_ = + objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); +final _objc_msgSend_1im3h6w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Long, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>(); +late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = + objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); +final _objc_msgSend_tio5o0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int)>(); +late final _sel_dateBySettingUnit_value_ofDate_options_ = + objc.registerName("dateBySettingUnit:value:ofDate:options:"); +late final _sel_dateBySettingHour_minute_second_ofDate_options_ = + objc.registerName("dateBySettingHour:minute:second:ofDate:options:"); +final _objc_msgSend_16h627a = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + ffi.Pointer, + int)>(); +late final _sel_date_matchesComponents_ = + objc.registerName("date:matchesComponents:"); + +/// NSCalendar +class NSCalendar extends objc.NSObject { + NSCalendar._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCalendar] that points to the same underlying object as [other]. + NSCalendar.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSCalendar] that wraps the given raw object pointer. + NSCalendar.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCalendar]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSCalendar); } /// currentCalendar static NSCalendar getCurrentCalendar() { - final _ret = _objc_msgSend_129(_class_NSCalendar, _sel_currentCalendar); + final _ret = _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_currentCalendar); return NSCalendar.castFromPointer(_ret, retain: true, release: true); } /// autoupdatingCurrentCalendar static NSCalendar getAutoupdatingCurrentCalendar() { - final _ret = - _objc_msgSend_129(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); + final _ret = _objc_msgSend_1unuoxw( + _class_NSCalendar, _sel_autoupdatingCurrentCalendar); return NSCalendar.castFromPointer(_ret, retain: true, release: true); } /// calendarWithIdentifier: static NSCalendar? calendarWithIdentifier_( objc.NSString calendarIdentifierConstant) { - final _ret = _objc_msgSend_130(_class_NSCalendar, - _sel_calendarWithIdentifier_, calendarIdentifierConstant.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSCalendar, + _sel_calendarWithIdentifier_, calendarIdentifierConstant.ref.pointer); return _ret.address == 0 ? null : NSCalendar.castFromPointer(_ret, retain: true, release: true); @@ -5717,28 +6761,30 @@ class NSCalendar extends objc.NSObject { /// init NSCalendar init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSCalendar.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } /// initWithCalendarIdentifier: objc.ObjCObjectBase? initWithCalendarIdentifier_(objc.NSString ident) { - final _ret = _objc_msgSend_35( - this.pointer, _sel_initWithCalendarIdentifier_, ident.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCalendarIdentifier_, ident.ref.pointer); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: false, release: true); } /// calendarIdentifier objc.NSString get calendarIdentifier { - final _ret = _objc_msgSend_11(this.pointer, _sel_calendarIdentifier); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_calendarIdentifier); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// locale objc.NSLocale? get locale { - final _ret = _objc_msgSend_131(this.pointer, _sel_locale); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_locale); return _ret.address == 0 ? null : objc.NSLocale.castFromPointer(_ret, retain: true, release: true); @@ -5746,213 +6792,238 @@ class NSCalendar extends objc.NSObject { /// setLocale: set locale(objc.NSLocale? value) { - return _objc_msgSend_132( - this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value?.ref.pointer ?? ffi.nullptr); } /// timeZone NSTimeZone get timeZone { - final _ret = _objc_msgSend_119(this.pointer, _sel_timeZone); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_timeZone); return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// setTimeZone: set timeZone(NSTimeZone value) { - return _objc_msgSend_120(this.pointer, _sel_setTimeZone_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTimeZone_, value.ref.pointer); } /// firstWeekday int get firstWeekday { - return _objc_msgSend_57(this.pointer, _sel_firstWeekday); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_firstWeekday); } /// setFirstWeekday: set firstWeekday(int value) { - return _objc_msgSend_133(this.pointer, _sel_setFirstWeekday_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setFirstWeekday_, value); } /// minimumDaysInFirstWeek int get minimumDaysInFirstWeek { - return _objc_msgSend_57(this.pointer, _sel_minimumDaysInFirstWeek); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_minimumDaysInFirstWeek); } /// setMinimumDaysInFirstWeek: set minimumDaysInFirstWeek(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setMinimumDaysInFirstWeek_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumDaysInFirstWeek_, value); } /// eraSymbols objc.NSArray get eraSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_eraSymbols); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_eraSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// longEraSymbols objc.NSArray get longEraSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_longEraSymbols); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_longEraSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// monthSymbols objc.NSArray get monthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_monthSymbols); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_monthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortMonthSymbols objc.NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_shortMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortMonthSymbols objc.NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_veryShortMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// standaloneMonthSymbols objc.NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_standaloneMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortStandaloneMonthSymbols objc.NSArray get shortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_shortStandaloneMonthSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortStandaloneMonthSymbols objc.NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_veryShortStandaloneMonthSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// weekdaySymbols objc.NSArray get weekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_weekdaySymbols); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_weekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortWeekdaySymbols objc.NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_shortWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortWeekdaySymbols objc.NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_veryShortWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// standaloneWeekdaySymbols objc.NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_standaloneWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortStandaloneWeekdaySymbols objc.NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_shortStandaloneWeekdaySymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortStandaloneWeekdaySymbols objc.NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// quarterSymbols objc.NSArray get quarterSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_quarterSymbols); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_quarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortQuarterSymbols objc.NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_shortQuarterSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// standaloneQuarterSymbols objc.NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_standaloneQuarterSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortStandaloneQuarterSymbols objc.NSArray get shortStandaloneQuarterSymbols { - final _ret = - _objc_msgSend_33(this.pointer, _sel_shortStandaloneQuarterSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// AMSymbol objc.NSString get AMSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_AMSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_AMSymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// PMSymbol objc.NSString get PMSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_PMSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_PMSymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// minimumRangeOfUnit: - void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, NSCalendarUnit unit) { + objc.NSRange minimumRangeOfUnit_(NSCalendarUnit unit) { + final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_134Stret( - stret, this.pointer, _sel_minimumRangeOfUnit_, unit.value) - : stret.ref = _objc_msgSend_134( - this.pointer, _sel_minimumRangeOfUnit_, unit.value); + ? _objc_msgSend_8biqtbStret( + _ptr, this.ref.pointer, _sel_minimumRangeOfUnit_, unit.value) + : _ptr.ref = _objc_msgSend_8biqtb( + this.ref.pointer, _sel_minimumRangeOfUnit_, unit.value); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); } /// maximumRangeOfUnit: - void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, NSCalendarUnit unit) { + objc.NSRange maximumRangeOfUnit_(NSCalendarUnit unit) { + final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_134Stret( - stret, this.pointer, _sel_maximumRangeOfUnit_, unit.value) - : stret.ref = _objc_msgSend_134( - this.pointer, _sel_maximumRangeOfUnit_, unit.value); + ? _objc_msgSend_8biqtbStret( + _ptr, this.ref.pointer, _sel_maximumRangeOfUnit_, unit.value) + : _ptr.ref = _objc_msgSend_8biqtb( + this.ref.pointer, _sel_maximumRangeOfUnit_, unit.value); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); } /// rangeOfUnit:inUnit:forDate: - void rangeOfUnit_inUnit_forDate_(ffi.Pointer<_NSRange> stret, + objc.NSRange rangeOfUnit_inUnit_forDate_( NSCalendarUnit smaller, NSCalendarUnit larger, objc.NSDate date) { + final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_135Stret( - stret, - this.pointer, + ? _objc_msgSend_1lmqh7mStret( + _ptr, + this.ref.pointer, _sel_rangeOfUnit_inUnit_forDate_, smaller.value, larger.value, - date.pointer) - : stret.ref = _objc_msgSend_135( - this.pointer, + date.ref.pointer) + : _ptr.ref = _objc_msgSend_1lmqh7m( + this.ref.pointer, _sel_rangeOfUnit_inUnit_forDate_, smaller.value, larger.value, - date.pointer); + date.ref.pointer); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); } /// ordinalityOfUnit:inUnit:forDate: int ordinalityOfUnit_inUnit_forDate_( NSCalendarUnit smaller, NSCalendarUnit larger, objc.NSDate date) { - return _objc_msgSend_136( - this.pointer, + return _objc_msgSend_1bi4n7h( + this.ref.pointer, _sel_ordinalityOfUnit_inUnit_forDate_, smaller.value, larger.value, - date.pointer); + date.ref.pointer); } /// rangeOfUnit:startDate:interval:forDate: @@ -5961,19 +7032,19 @@ class NSCalendar extends objc.NSObject { ffi.Pointer> datep, ffi.Pointer tip, objc.NSDate date) { - return _objc_msgSend_137( - this.pointer, + return _objc_msgSend_amvrpq( + this.ref.pointer, _sel_rangeOfUnit_startDate_interval_forDate_, unit.value, datep, tip, - date.pointer); + date.ref.pointer); } /// dateFromComponents: objc.NSDate? dateFromComponents_(NSDateComponents comps) { - final _ret = _objc_msgSend_147( - this.pointer, _sel_dateFromComponents_, comps.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dateFromComponents_, comps.ref.pointer); return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); @@ -5982,19 +7053,19 @@ class NSCalendar extends objc.NSObject { /// components:fromDate: NSDateComponents components_fromDate_( NSCalendarUnit unitFlags, objc.NSDate date) { - final _ret = _objc_msgSend_148( - this.pointer, _sel_components_fromDate_, unitFlags.value, date.pointer); + final _ret = _objc_msgSend_t9w2ff(this.ref.pointer, + _sel_components_fromDate_, unitFlags.value, date.ref.pointer); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } /// dateByAddingComponents:toDate:options: objc.NSDate? dateByAddingComponents_toDate_options_( NSDateComponents comps, objc.NSDate date, NSCalendarOptions opts) { - final _ret = _objc_msgSend_149( - this.pointer, + final _ret = _objc_msgSend_2sm1zi( + this.ref.pointer, _sel_dateByAddingComponents_toDate_options_, - comps.pointer, - date.pointer, + comps.ref.pointer, + date.ref.pointer, opts.value); return _ret.address == 0 ? null @@ -6007,12 +7078,12 @@ class NSCalendar extends objc.NSObject { objc.NSDate startingDate, objc.NSDate resultDate, NSCalendarOptions opts) { - final _ret = _objc_msgSend_150( - this.pointer, + final _ret = _objc_msgSend_1jc93x2( + this.ref.pointer, _sel_components_fromDate_toDate_options_, unitFlags.value, - startingDate.pointer, - resultDate.pointer, + startingDate.ref.pointer, + resultDate.ref.pointer, opts.value); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } @@ -6024,14 +7095,14 @@ class NSCalendar extends objc.NSObject { ffi.Pointer monthValuePointer, ffi.Pointer dayValuePointer, objc.NSDate date) { - _objc_msgSend_151( - this.pointer, + _objc_msgSend_1ermmsa( + this.ref.pointer, _sel_getEra_year_month_day_fromDate_, eraValuePointer, yearValuePointer, monthValuePointer, dayValuePointer, - date.pointer); + date.ref.pointer); } /// getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate: @@ -6041,14 +7112,14 @@ class NSCalendar extends objc.NSObject { ffi.Pointer weekValuePointer, ffi.Pointer weekdayValuePointer, objc.NSDate date) { - _objc_msgSend_151( - this.pointer, + _objc_msgSend_1ermmsa( + this.ref.pointer, _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, eraValuePointer, yearValuePointer, weekValuePointer, weekdayValuePointer, - date.pointer); + date.ref.pointer); } /// getHour:minute:second:nanosecond:fromDate: @@ -6058,20 +7129,20 @@ class NSCalendar extends objc.NSObject { ffi.Pointer secondValuePointer, ffi.Pointer nanosecondValuePointer, objc.NSDate date) { - _objc_msgSend_151( - this.pointer, + _objc_msgSend_1ermmsa( + this.ref.pointer, _sel_getHour_minute_second_nanosecond_fromDate_, hourValuePointer, minuteValuePointer, secondValuePointer, nanosecondValuePointer, - date.pointer); + date.ref.pointer); } /// component:fromDate: int component_fromDate_(NSCalendarUnit unit, objc.NSDate date) { - return _objc_msgSend_152( - this.pointer, _sel_component_fromDate_, unit.value, date.pointer); + return _objc_msgSend_tm9h70(this.ref.pointer, _sel_component_fromDate_, + unit.value, date.ref.pointer); } /// dateWithEra:year:month:day:hour:minute:second:nanosecond: @@ -6084,8 +7155,8 @@ class NSCalendar extends objc.NSObject { int minuteValue, int secondValue, int nanosecondValue) { - final _ret = _objc_msgSend_153( - this.pointer, + final _ret = _objc_msgSend_1747i7s( + this.ref.pointer, _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, eraValue, yearValue, @@ -6111,8 +7182,8 @@ class NSCalendar extends objc.NSObject { int minuteValue, int secondValue, int nanosecondValue) { - final _ret = _objc_msgSend_153( - this.pointer, + final _ret = _objc_msgSend_1747i7s( + this.ref.pointer, _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, eraValue, yearValue, @@ -6129,27 +7200,30 @@ class NSCalendar extends objc.NSObject { /// startOfDayForDate: objc.NSDate startOfDayForDate_(objc.NSDate date) { - final _ret = - _objc_msgSend_154(this.pointer, _sel_startOfDayForDate_, date.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_startOfDayForDate_, date.ref.pointer); return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// componentsInTimeZone:fromDate: NSDateComponents componentsInTimeZone_fromDate_( NSTimeZone timezone, objc.NSDate date) { - final _ret = _objc_msgSend_155(this.pointer, - _sel_componentsInTimeZone_fromDate_, timezone.pointer, date.pointer); + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_componentsInTimeZone_fromDate_, + timezone.ref.pointer, + date.ref.pointer); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } /// compareDate:toDate:toUnitGranularity: objc.NSComparisonResult compareDate_toDate_toUnitGranularity_( objc.NSDate date1, objc.NSDate date2, NSCalendarUnit unit) { - final _ret = _objc_msgSend_156( - this.pointer, + final _ret = _objc_msgSend_jpc2bg( + this.ref.pointer, _sel_compareDate_toDate_toUnitGranularity_, - date1.pointer, - date2.pointer, + date1.ref.pointer, + date2.ref.pointer, unit.value); return objc.NSComparisonResult.fromValue(_ret); } @@ -6157,40 +7231,42 @@ class NSCalendar extends objc.NSObject { /// isDate:equalToDate:toUnitGranularity: bool isDate_equalToDate_toUnitGranularity_( objc.NSDate date1, objc.NSDate date2, NSCalendarUnit unit) { - return _objc_msgSend_157( - this.pointer, + return _objc_msgSend_188aig1( + this.ref.pointer, _sel_isDate_equalToDate_toUnitGranularity_, - date1.pointer, - date2.pointer, + date1.ref.pointer, + date2.ref.pointer, unit.value); } /// isDate:inSameDayAsDate: bool isDate_inSameDayAsDate_(objc.NSDate date1, objc.NSDate date2) { - return _objc_msgSend_158(this.pointer, _sel_isDate_inSameDayAsDate_, - date1.pointer, date2.pointer); + return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_isDate_inSameDayAsDate_, + date1.ref.pointer, date2.ref.pointer); } /// isDateInToday: bool isDateInToday_(objc.NSDate date) { - return _objc_msgSend_116(this.pointer, _sel_isDateInToday_, date.pointer); + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInToday_, date.ref.pointer); } /// isDateInYesterday: bool isDateInYesterday_(objc.NSDate date) { - return _objc_msgSend_116( - this.pointer, _sel_isDateInYesterday_, date.pointer); + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInYesterday_, date.ref.pointer); } /// isDateInTomorrow: bool isDateInTomorrow_(objc.NSDate date) { - return _objc_msgSend_116( - this.pointer, _sel_isDateInTomorrow_, date.pointer); + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInTomorrow_, date.ref.pointer); } /// isDateInWeekend: bool isDateInWeekend_(objc.NSDate date) { - return _objc_msgSend_116(this.pointer, _sel_isDateInWeekend_, date.pointer); + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInWeekend_, date.ref.pointer); } /// rangeOfWeekendStartDate:interval:containingDate: @@ -6198,12 +7274,12 @@ class NSCalendar extends objc.NSObject { ffi.Pointer> datep, ffi.Pointer tip, objc.NSDate date) { - return _objc_msgSend_159( - this.pointer, + return _objc_msgSend_seipso( + this.ref.pointer, _sel_rangeOfWeekendStartDate_interval_containingDate_, datep, tip, - date.pointer); + date.ref.pointer); } /// nextWeekendStartDate:interval:options:afterDate: @@ -6212,13 +7288,13 @@ class NSCalendar extends objc.NSObject { ffi.Pointer tip, NSCalendarOptions options, objc.NSDate date) { - return _objc_msgSend_160( - this.pointer, + return _objc_msgSend_1brdgri( + this.ref.pointer, _sel_nextWeekendStartDate_interval_options_afterDate_, datep, tip, options.value, - date.pointer); + date.ref.pointer); } /// components:fromDateComponents:toDateComponents:options: @@ -6227,12 +7303,12 @@ class NSCalendar extends objc.NSObject { NSDateComponents startingDateComp, NSDateComponents resultDateComp, NSCalendarOptions options) { - final _ret = _objc_msgSend_161( - this.pointer, + final _ret = _objc_msgSend_1jc93x2( + this.ref.pointer, _sel_components_fromDateComponents_toDateComponents_options_, unitFlags.value, - startingDateComp.pointer, - resultDateComp.pointer, + startingDateComp.ref.pointer, + resultDateComp.ref.pointer, options.value); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } @@ -6240,12 +7316,12 @@ class NSCalendar extends objc.NSObject { /// dateByAddingUnit:value:toDate:options: objc.NSDate? dateByAddingUnit_value_toDate_options_(NSCalendarUnit unit, int value, objc.NSDate date, NSCalendarOptions options) { - final _ret = _objc_msgSend_162( - this.pointer, + final _ret = _objc_msgSend_b1fge4( + this.ref.pointer, _sel_dateByAddingUnit_value_toDate_options_, unit.value, value, - date.pointer, + date.ref.pointer, options.value); return _ret.address == 0 ? null @@ -6257,24 +7333,26 @@ class NSCalendar extends objc.NSObject { objc.NSDate start, NSDateComponents comps, NSCalendarOptions opts, - ObjCBlock_ffiVoid_NSDate_bool_bool block) { - _objc_msgSend_163( - this.pointer, + objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + block) { + _objc_msgSend_z9v2cv( + this.ref.pointer, _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, - start.pointer, - comps.pointer, + start.ref.pointer, + comps.ref.pointer, opts.value, - block.pointer); + block.ref.pointer); } /// nextDateAfterDate:matchingComponents:options: objc.NSDate? nextDateAfterDate_matchingComponents_options_( objc.NSDate date, NSDateComponents comps, NSCalendarOptions options) { - final _ret = _objc_msgSend_164( - this.pointer, + final _ret = _objc_msgSend_2sm1zi( + this.ref.pointer, _sel_nextDateAfterDate_matchingComponents_options_, - date.pointer, - comps.pointer, + date.ref.pointer, + comps.ref.pointer, options.value); return _ret.address == 0 ? null @@ -6284,10 +7362,10 @@ class NSCalendar extends objc.NSObject { /// nextDateAfterDate:matchingUnit:value:options: objc.NSDate? nextDateAfterDate_matchingUnit_value_options_(objc.NSDate date, NSCalendarUnit unit, int value, NSCalendarOptions options) { - final _ret = _objc_msgSend_165( - this.pointer, + final _ret = _objc_msgSend_1im3h6w( + this.ref.pointer, _sel_nextDateAfterDate_matchingUnit_value_options_, - date.pointer, + date.ref.pointer, unit.value, value, options.value); @@ -6303,10 +7381,10 @@ class NSCalendar extends objc.NSObject { int minuteValue, int secondValue, NSCalendarOptions options) { - final _ret = _objc_msgSend_166( - this.pointer, + final _ret = _objc_msgSend_tio5o0( + this.ref.pointer, _sel_nextDateAfterDate_matchingHour_minute_second_options_, - date.pointer, + date.ref.pointer, hourValue, minuteValue, secondValue, @@ -6319,12 +7397,12 @@ class NSCalendar extends objc.NSObject { /// dateBySettingUnit:value:ofDate:options: objc.NSDate? dateBySettingUnit_value_ofDate_options_( NSCalendarUnit unit, int v, objc.NSDate date, NSCalendarOptions opts) { - final _ret = _objc_msgSend_162( - this.pointer, + final _ret = _objc_msgSend_b1fge4( + this.ref.pointer, _sel_dateBySettingUnit_value_ofDate_options_, unit.value, v, - date.pointer, + date.ref.pointer, opts.value); return _ret.address == 0 ? null @@ -6334,13 +7412,13 @@ class NSCalendar extends objc.NSObject { /// dateBySettingHour:minute:second:ofDate:options: objc.NSDate? dateBySettingHour_minute_second_ofDate_options_( int h, int m, int s, objc.NSDate date, NSCalendarOptions opts) { - final _ret = _objc_msgSend_167( - this.pointer, + final _ret = _objc_msgSend_16h627a( + this.ref.pointer, _sel_dateBySettingHour_minute_second_ofDate_options_, h, m, s, - date.pointer, + date.ref.pointer, opts.value); return _ret.address == 0 ? null @@ -6349,25 +7427,26 @@ class NSCalendar extends objc.NSObject { /// date:matchesComponents: bool date_matchesComponents_(objc.NSDate date, NSDateComponents components) { - return _objc_msgSend_168(this.pointer, _sel_date_matchesComponents_, - date.pointer, components.pointer); + return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_date_matchesComponents_, + date.ref.pointer, components.ref.pointer); } /// new static NSCalendar new1() { - final _ret = _objc_msgSend_19(_class_NSCalendar, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_new); return NSCalendar.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28(_class_NSCalendar, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSCalendar, _sel_allocWithZone_, zone); return NSCalendar.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSCalendar alloc() { - final _ret = _objc_msgSend_19(_class_NSCalendar, _sel_alloc); + final _ret = _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_alloc); return NSCalendar.castFromPointer(_ret, retain: false, release: true); } @@ -6376,58 +7455,58 @@ class NSCalendar extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSCalendar, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSCalendar, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSCalendar, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSCalendar, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSCalendar, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSCalendar, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSCalendar, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSCalendar, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSCalendar, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSCalendar, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSCalendar, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSCalendar, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -6435,1538 +7514,2148 @@ class NSCalendar extends objc.NSObject { /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = - _objc_msgSend_19(_class_NSCalendar, _sel_classForKeyedUnarchiver); + _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSCalendar self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSCalendar retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSCalendar autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSCalendar, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSCalendar? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: false, release: true); + } } -late final _class_NSCalendar = objc.getClass("NSCalendar"); -late final _sel_currentCalendar = objc.registerName("currentCalendar"); -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_autoupdatingCurrentCalendar = - objc.registerName("autoupdatingCurrentCalendar"); -late final _sel_calendarWithIdentifier_ = - objc.registerName("calendarWithIdentifier:"); -final _objc_msgSend_130 = objc.msgSendPointer +late final _sel_isLenient = objc.registerName("isLenient"); +late final _sel_setLenient_ = objc.registerName("setLenient:"); +late final _sel_twoDigitStartDate = objc.registerName("twoDigitStartDate"); +late final _sel_setTwoDigitStartDate_ = + objc.registerName("setTwoDigitStartDate:"); +late final _sel_defaultDate = objc.registerName("defaultDate"); +late final _sel_setDefaultDate_ = objc.registerName("setDefaultDate:"); +late final _sel_setEraSymbols_ = objc.registerName("setEraSymbols:"); +late final _sel_setMonthSymbols_ = objc.registerName("setMonthSymbols:"); +late final _sel_setShortMonthSymbols_ = + objc.registerName("setShortMonthSymbols:"); +late final _sel_setWeekdaySymbols_ = objc.registerName("setWeekdaySymbols:"); +late final _sel_setShortWeekdaySymbols_ = + objc.registerName("setShortWeekdaySymbols:"); +late final _sel_setAMSymbol_ = objc.registerName("setAMSymbol:"); +late final _sel_setPMSymbol_ = objc.registerName("setPMSymbol:"); +late final _sel_setLongEraSymbols_ = objc.registerName("setLongEraSymbols:"); +late final _sel_setVeryShortMonthSymbols_ = + objc.registerName("setVeryShortMonthSymbols:"); +late final _sel_setStandaloneMonthSymbols_ = + objc.registerName("setStandaloneMonthSymbols:"); +late final _sel_setShortStandaloneMonthSymbols_ = + objc.registerName("setShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortStandaloneMonthSymbols_ = + objc.registerName("setVeryShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortWeekdaySymbols_ = + objc.registerName("setVeryShortWeekdaySymbols:"); +late final _sel_setStandaloneWeekdaySymbols_ = + objc.registerName("setStandaloneWeekdaySymbols:"); +late final _sel_setShortStandaloneWeekdaySymbols_ = + objc.registerName("setShortStandaloneWeekdaySymbols:"); +late final _sel_setVeryShortStandaloneWeekdaySymbols_ = + objc.registerName("setVeryShortStandaloneWeekdaySymbols:"); +late final _sel_setQuarterSymbols_ = objc.registerName("setQuarterSymbols:"); +late final _sel_setShortQuarterSymbols_ = + objc.registerName("setShortQuarterSymbols:"); +late final _sel_setStandaloneQuarterSymbols_ = + objc.registerName("setStandaloneQuarterSymbols:"); +late final _sel_setShortStandaloneQuarterSymbols_ = + objc.registerName("setShortStandaloneQuarterSymbols:"); +late final _sel_gregorianStartDate = objc.registerName("gregorianStartDate"); +late final _sel_setGregorianStartDate_ = + objc.registerName("setGregorianStartDate:"); +late final _sel_doesRelativeDateFormatting = + objc.registerName("doesRelativeDateFormatting"); +late final _sel_setDoesRelativeDateFormatting_ = + objc.registerName("setDoesRelativeDateFormatting:"); +late final _sel_initWithDateFormat_allowNaturalLanguage_ = + objc.registerName("initWithDateFormat:allowNaturalLanguage:"); +final _objc_msgSend_qqbb5y = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Bool)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithCalendarIdentifier_ = - objc.registerName("initWithCalendarIdentifier:"); -late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); -final _objc_msgSend_131 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_132 = 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_firstWeekday = objc.registerName("firstWeekday"); -late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); -final _objc_msgSend_133 = 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_minimumDaysInFirstWeek = - objc.registerName("minimumDaysInFirstWeek"); -late final _sel_setMinimumDaysInFirstWeek_ = - objc.registerName("setMinimumDaysInFirstWeek:"); -late final _sel_eraSymbols = objc.registerName("eraSymbols"); -late final _sel_longEraSymbols = objc.registerName("longEraSymbols"); -late final _sel_monthSymbols = objc.registerName("monthSymbols"); -late final _sel_shortMonthSymbols = objc.registerName("shortMonthSymbols"); -late final _sel_veryShortMonthSymbols = - objc.registerName("veryShortMonthSymbols"); -late final _sel_standaloneMonthSymbols = - objc.registerName("standaloneMonthSymbols"); -late final _sel_shortStandaloneMonthSymbols = - objc.registerName("shortStandaloneMonthSymbols"); -late final _sel_veryShortStandaloneMonthSymbols = - objc.registerName("veryShortStandaloneMonthSymbols"); -late final _sel_weekdaySymbols = objc.registerName("weekdaySymbols"); -late final _sel_shortWeekdaySymbols = objc.registerName("shortWeekdaySymbols"); -late final _sel_veryShortWeekdaySymbols = - objc.registerName("veryShortWeekdaySymbols"); -late final _sel_standaloneWeekdaySymbols = - objc.registerName("standaloneWeekdaySymbols"); -late final _sel_shortStandaloneWeekdaySymbols = - objc.registerName("shortStandaloneWeekdaySymbols"); -late final _sel_veryShortStandaloneWeekdaySymbols = - objc.registerName("veryShortStandaloneWeekdaySymbols"); -late final _sel_quarterSymbols = objc.registerName("quarterSymbols"); -late final _sel_shortQuarterSymbols = objc.registerName("shortQuarterSymbols"); -late final _sel_standaloneQuarterSymbols = - objc.registerName("standaloneQuarterSymbols"); -late final _sel_shortStandaloneQuarterSymbols = - objc.registerName("shortStandaloneQuarterSymbols"); -late final _sel_AMSymbol = objc.registerName("AMSymbol"); -late final _sel_PMSymbol = objc.registerName("PMSymbol"); - -enum NSCalendarUnit { - NSCalendarUnitEra(2), - NSCalendarUnitYear(4), - NSCalendarUnitMonth(8), - NSCalendarUnitDay(16), - NSCalendarUnitHour(32), - NSCalendarUnitMinute(64), - NSCalendarUnitSecond(128), - NSCalendarUnitWeekday(512), - NSCalendarUnitWeekdayOrdinal(1024), - NSCalendarUnitQuarter(2048), - NSCalendarUnitWeekOfMonth(4096), - NSCalendarUnitWeekOfYear(8192), - NSCalendarUnitYearForWeekOfYear(16384), - NSCalendarUnitNanosecond(32768), - NSCalendarUnitCalendar(1048576), - NSCalendarUnitTimeZone(2097152), - NSWeekCalendarUnit(256); - - static const NSEraCalendarUnit = NSCalendarUnitEra; - static const NSYearCalendarUnit = NSCalendarUnitYear; - static const NSMonthCalendarUnit = NSCalendarUnitMonth; - static const NSDayCalendarUnit = NSCalendarUnitDay; - static const NSHourCalendarUnit = NSCalendarUnitHour; - static const NSMinuteCalendarUnit = NSCalendarUnitMinute; - static const NSSecondCalendarUnit = NSCalendarUnitSecond; - static const NSWeekdayCalendarUnit = NSCalendarUnitWeekday; - static const NSWeekdayOrdinalCalendarUnit = NSCalendarUnitWeekdayOrdinal; - static const NSQuarterCalendarUnit = NSCalendarUnitQuarter; - static const NSWeekOfMonthCalendarUnit = NSCalendarUnitWeekOfMonth; - static const NSWeekOfYearCalendarUnit = NSCalendarUnitWeekOfYear; - static const NSYearForWeekOfYearCalendarUnit = - NSCalendarUnitYearForWeekOfYear; - static const NSCalendarCalendarUnit = NSCalendarUnitCalendar; - static const NSTimeZoneCalendarUnit = NSCalendarUnitTimeZone; - - final int value; - const NSCalendarUnit(this.value); - - static NSCalendarUnit fromValue(int value) => switch (value) { - 2 => NSCalendarUnitEra, - 4 => NSCalendarUnitYear, - 8 => NSCalendarUnitMonth, - 16 => NSCalendarUnitDay, - 32 => NSCalendarUnitHour, - 64 => NSCalendarUnitMinute, - 128 => NSCalendarUnitSecond, - 512 => NSCalendarUnitWeekday, - 1024 => NSCalendarUnitWeekdayOrdinal, - 2048 => NSCalendarUnitQuarter, - 4096 => NSCalendarUnitWeekOfMonth, - 8192 => NSCalendarUnitWeekOfYear, - 16384 => NSCalendarUnitYearForWeekOfYear, - 32768 => NSCalendarUnitNanosecond, - 1048576 => NSCalendarUnitCalendar, - 2097152 => NSCalendarUnitTimeZone, - 256 => NSWeekCalendarUnit, - _ => throw ArgumentError("Unknown value for NSCalendarUnit: $value"), - }; - - @override - String toString() { - if (this == NSCalendarUnitEra) - return "NSCalendarUnit.NSCalendarUnitEra, NSCalendarUnit.NSEraCalendarUnit"; - if (this == NSCalendarUnitYear) - return "NSCalendarUnit.NSCalendarUnitYear, NSCalendarUnit.NSYearCalendarUnit"; - if (this == NSCalendarUnitMonth) - return "NSCalendarUnit.NSCalendarUnitMonth, NSCalendarUnit.NSMonthCalendarUnit"; - if (this == NSCalendarUnitDay) - return "NSCalendarUnit.NSCalendarUnitDay, NSCalendarUnit.NSDayCalendarUnit"; - if (this == NSCalendarUnitHour) - return "NSCalendarUnit.NSCalendarUnitHour, NSCalendarUnit.NSHourCalendarUnit"; - if (this == NSCalendarUnitMinute) - return "NSCalendarUnit.NSCalendarUnitMinute, NSCalendarUnit.NSMinuteCalendarUnit"; - if (this == NSCalendarUnitSecond) - return "NSCalendarUnit.NSCalendarUnitSecond, NSCalendarUnit.NSSecondCalendarUnit"; - if (this == NSCalendarUnitWeekday) - return "NSCalendarUnit.NSCalendarUnitWeekday, NSCalendarUnit.NSWeekdayCalendarUnit"; - if (this == NSCalendarUnitWeekdayOrdinal) - return "NSCalendarUnit.NSCalendarUnitWeekdayOrdinal, NSCalendarUnit.NSWeekdayOrdinalCalendarUnit"; - if (this == NSCalendarUnitQuarter) - return "NSCalendarUnit.NSCalendarUnitQuarter, NSCalendarUnit.NSQuarterCalendarUnit"; - if (this == NSCalendarUnitWeekOfMonth) - return "NSCalendarUnit.NSCalendarUnitWeekOfMonth, NSCalendarUnit.NSWeekOfMonthCalendarUnit"; - if (this == NSCalendarUnitWeekOfYear) - return "NSCalendarUnit.NSCalendarUnitWeekOfYear, NSCalendarUnit.NSWeekOfYearCalendarUnit"; - if (this == NSCalendarUnitYearForWeekOfYear) - return "NSCalendarUnit.NSCalendarUnitYearForWeekOfYear, NSCalendarUnit.NSYearForWeekOfYearCalendarUnit"; - if (this == NSCalendarUnitCalendar) - return "NSCalendarUnit.NSCalendarUnitCalendar, NSCalendarUnit.NSCalendarCalendarUnit"; - if (this == NSCalendarUnitTimeZone) - return "NSCalendarUnit.NSCalendarUnitTimeZone, NSCalendarUnit.NSTimeZoneCalendarUnit"; - return super.toString(); - } -} - -late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); -final _objc_msgSend_134 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_134Stret = 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_maximumRangeOfUnit_ = objc.registerName("maximumRangeOfUnit:"); -late final _sel_rangeOfUnit_inUnit_forDate_ = - objc.registerName("rangeOfUnit:inUnit:forDate:"); -final _objc_msgSend_135 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -final _objc_msgSend_135Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -late final _sel_ordinalityOfUnit_inUnit_forDate_ = - objc.registerName("ordinalityOfUnit:inUnit:forDate:"); -final _objc_msgSend_136 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - int Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - int, - int, - ffi.Pointer)>(); -late final _sel_rangeOfUnit_startDate_interval_forDate_ = - objc.registerName("rangeOfUnit:startDate:interval:forDate:"); -final _objc_msgSend_137 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - bool Function( ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); + bool)>(); +late final _sel_allowsNaturalLanguage = + objc.registerName("allowsNaturalLanguage"); -/// NSDateComponents -class NSDateComponents extends objc.NSObject { - NSDateComponents._(ffi.Pointer pointer, +/// NSDateFormatter +class NSDateFormatter extends NSFormatter { + NSDateFormatter._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSDateComponents] that points to the same underlying object as [other]. - NSDateComponents.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSDateFormatter] that points to the same underlying object as [other]. + NSDateFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSDateComponents] that wraps the given raw object pointer. - NSDateComponents.castFromPointer(ffi.Pointer other, + /// Constructs a [NSDateFormatter] that wraps the given raw object pointer. + NSDateFormatter.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSDateComponents]. + /// Returns whether [obj] is an instance of [NSDateFormatter]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDateComponents); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); } - /// calendar - NSCalendar? get calendar { - final _ret = _objc_msgSend_138(this.pointer, _sel_calendar); - return _ret.address == 0 - ? null - : NSCalendar.castFromPointer(_ret, retain: true, release: true); - } - - /// setCalendar: - set calendar(NSCalendar? value) { - return _objc_msgSend_139( - this.pointer, _sel_setCalendar_, value?.pointer ?? ffi.nullptr); - } - - /// timeZone - NSTimeZone? get timeZone { - final _ret = _objc_msgSend_140(this.pointer, _sel_timeZone); - return _ret.address == 0 - ? null - : NSTimeZone.castFromPointer(_ret, retain: true, release: true); - } - - /// setTimeZone: - set timeZone(NSTimeZone? value) { - return _objc_msgSend_141( - this.pointer, _sel_setTimeZone_, value?.pointer ?? ffi.nullptr); - } - - /// era - int get era { - return _objc_msgSend_123(this.pointer, _sel_era); + /// formattingContext + NSFormattingContext get formattingContext { + final _ret = + _objc_msgSend_10wicfq(this.ref.pointer, _sel_formattingContext); + return NSFormattingContext.fromValue(_ret); } - /// setEra: - set era(int value) { - return _objc_msgSend_142(this.pointer, _sel_setEra_, value); + /// setFormattingContext: + set formattingContext(NSFormattingContext value) { + return _objc_msgSend_1gtwv7x( + this.ref.pointer, _sel_setFormattingContext_, value.value); } - /// year - int get year { - return _objc_msgSend_123(this.pointer, _sel_year); + /// getObjectValue:forString:range:error: + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer rangep, + ffi.Pointer> error) { + return _objc_msgSend_bl9kx( + this.ref.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.ref.pointer, + rangep, + error); } - /// setYear: - set year(int value) { - return _objc_msgSend_142(this.pointer, _sel_setYear_, value); + /// stringFromDate: + objc.NSString stringFromDate_(objc.NSDate date) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_stringFromDate_, date.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// month - int get month { - return _objc_msgSend_123(this.pointer, _sel_month); + /// dateFromString: + objc.NSDate? dateFromString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dateFromString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// setMonth: - set month(int value) { - return _objc_msgSend_142(this.pointer, _sel_setMonth_, value); + /// localizedStringFromDate:dateStyle:timeStyle: + static objc.NSString localizedStringFromDate_dateStyle_timeStyle_( + objc.NSDate date, + NSDateFormatterStyle dstyle, + NSDateFormatterStyle tstyle) { + final _ret = _objc_msgSend_1sgexgh( + _class_NSDateFormatter, + _sel_localizedStringFromDate_dateStyle_timeStyle_, + date.ref.pointer, + dstyle.value, + tstyle.value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// day - int get day { - return _objc_msgSend_123(this.pointer, _sel_day); + /// dateFormatFromTemplate:options:locale: + static objc.NSString? dateFormatFromTemplate_options_locale_( + objc.NSString tmplate, int opts, objc.NSLocale? locale) { + final _ret = _objc_msgSend_1czjmpk( + _class_NSDateFormatter, + _sel_dateFormatFromTemplate_options_locale_, + tmplate.ref.pointer, + opts, + locale?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setDay: - set day(int value) { - return _objc_msgSend_142(this.pointer, _sel_setDay_, value); + /// defaultFormatterBehavior + static NSDateFormatterBehavior getDefaultFormatterBehavior() { + final _ret = _objc_msgSend_ti9wzk( + _class_NSDateFormatter, _sel_defaultFormatterBehavior); + return NSDateFormatterBehavior.fromValue(_ret); } - /// hour - int get hour { - return _objc_msgSend_123(this.pointer, _sel_hour); + /// setDefaultFormatterBehavior: + static void setDefaultFormatterBehavior(NSDateFormatterBehavior value) { + return _objc_msgSend_ffb1q7( + _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value.value); } - /// setHour: - set hour(int value) { - return _objc_msgSend_142(this.pointer, _sel_setHour_, value); + /// setLocalizedDateFormatFromTemplate: + void setLocalizedDateFormatFromTemplate_(objc.NSString dateFormatTemplate) { + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setLocalizedDateFormatFromTemplate_, + dateFormatTemplate.ref.pointer); } - /// minute - int get minute { - return _objc_msgSend_123(this.pointer, _sel_minute); + /// dateFormat + objc.NSString get dateFormat { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setMinute: - set minute(int value) { - return _objc_msgSend_142(this.pointer, _sel_setMinute_, value); + /// setDateFormat: + set dateFormat(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDateFormat_, value.ref.pointer); } - /// second - int get second { - return _objc_msgSend_123(this.pointer, _sel_second); + /// dateStyle + NSDateFormatterStyle get dateStyle { + final _ret = _objc_msgSend_r4ksf1(this.ref.pointer, _sel_dateStyle); + return NSDateFormatterStyle.fromValue(_ret); } - /// setSecond: - set second(int value) { - return _objc_msgSend_142(this.pointer, _sel_setSecond_, value); + /// setDateStyle: + set dateStyle(NSDateFormatterStyle value) { + return _objc_msgSend_7hnqfw( + this.ref.pointer, _sel_setDateStyle_, value.value); } - /// nanosecond - int get nanosecond { - return _objc_msgSend_123(this.pointer, _sel_nanosecond); + /// timeStyle + NSDateFormatterStyle get timeStyle { + final _ret = _objc_msgSend_r4ksf1(this.ref.pointer, _sel_timeStyle); + return NSDateFormatterStyle.fromValue(_ret); } - /// setNanosecond: - set nanosecond(int value) { - return _objc_msgSend_142(this.pointer, _sel_setNanosecond_, value); + /// setTimeStyle: + set timeStyle(NSDateFormatterStyle value) { + return _objc_msgSend_7hnqfw( + this.ref.pointer, _sel_setTimeStyle_, value.value); } - /// weekday - int get weekday { - return _objc_msgSend_123(this.pointer, _sel_weekday); + /// locale + objc.NSLocale get locale { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - /// setWeekday: - set weekday(int value) { - return _objc_msgSend_142(this.pointer, _sel_setWeekday_, value); + /// setLocale: + set locale(objc.NSLocale value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value.ref.pointer); } - /// weekdayOrdinal - int get weekdayOrdinal { - return _objc_msgSend_123(this.pointer, _sel_weekdayOrdinal); + /// generatesCalendarDates + bool get generatesCalendarDates { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_generatesCalendarDates); } - /// setWeekdayOrdinal: - set weekdayOrdinal(int value) { - return _objc_msgSend_142(this.pointer, _sel_setWeekdayOrdinal_, value); + /// setGeneratesCalendarDates: + set generatesCalendarDates(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setGeneratesCalendarDates_, value); } - /// quarter - int get quarter { - return _objc_msgSend_123(this.pointer, _sel_quarter); + /// formatterBehavior + NSDateFormatterBehavior get formatterBehavior { + final _ret = _objc_msgSend_ti9wzk(this.ref.pointer, _sel_formatterBehavior); + return NSDateFormatterBehavior.fromValue(_ret); } - /// setQuarter: - set quarter(int value) { - return _objc_msgSend_142(this.pointer, _sel_setQuarter_, value); + /// setFormatterBehavior: + set formatterBehavior(NSDateFormatterBehavior value) { + return _objc_msgSend_ffb1q7( + this.ref.pointer, _sel_setFormatterBehavior_, value.value); } - /// weekOfMonth - int get weekOfMonth { - return _objc_msgSend_123(this.pointer, _sel_weekOfMonth); + /// timeZone + NSTimeZone get timeZone { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// setWeekOfMonth: - set weekOfMonth(int value) { - return _objc_msgSend_142(this.pointer, _sel_setWeekOfMonth_, value); + /// setTimeZone: + set timeZone(NSTimeZone value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTimeZone_, value.ref.pointer); } - /// weekOfYear - int get weekOfYear { - return _objc_msgSend_123(this.pointer, _sel_weekOfYear); + /// calendar + NSCalendar get calendar { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_calendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - /// setWeekOfYear: - set weekOfYear(int value) { - return _objc_msgSend_142(this.pointer, _sel_setWeekOfYear_, value); + /// setCalendar: + set calendar(NSCalendar value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCalendar_, value.ref.pointer); } - /// yearForWeekOfYear - int get yearForWeekOfYear { - return _objc_msgSend_123(this.pointer, _sel_yearForWeekOfYear); + /// isLenient + bool get lenient { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLenient); } - /// setYearForWeekOfYear: - set yearForWeekOfYear(int value) { - return _objc_msgSend_142(this.pointer, _sel_setYearForWeekOfYear_, value); + /// setLenient: + set lenient(bool value) { + return _objc_msgSend_117qins(this.ref.pointer, _sel_setLenient_, value); } - /// isLeapMonth - bool get leapMonth { - return _objc_msgSend_13(this.pointer, _sel_isLeapMonth); + /// twoDigitStartDate + objc.NSDate? get twoDigitStartDate { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_twoDigitStartDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// setLeapMonth: - set leapMonth(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setLeapMonth_, value); + /// setTwoDigitStartDate: + set twoDigitStartDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTwoDigitStartDate_, + value?.ref.pointer ?? ffi.nullptr); } - /// date - objc.NSDate? get date { - final _ret = _objc_msgSend_124(this.pointer, _sel_date); + /// defaultDate + objc.NSDate? get defaultDate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_defaultDate); return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// week - int week() { - return _objc_msgSend_123(this.pointer, _sel_week); + /// setDefaultDate: + set defaultDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDefaultDate_, + value?.ref.pointer ?? ffi.nullptr); } - /// setWeek: - void setWeek_(int v) { - _objc_msgSend_143(this.pointer, _sel_setWeek_, v); + /// eraSymbols + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setValue:forComponent: - void setValue_forComponent_(int value, NSCalendarUnit unit) { - _objc_msgSend_144( - this.pointer, _sel_setValue_forComponent_, value, unit.value); + /// setEraSymbols: + set eraSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setEraSymbols_, value.ref.pointer); } - /// valueForComponent: - int valueForComponent_(NSCalendarUnit unit) { - return _objc_msgSend_145(this.pointer, _sel_valueForComponent_, unit.value); + /// monthSymbols + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// isValidDate - bool get validDate { - return _objc_msgSend_13(this.pointer, _sel_isValidDate); + /// setMonthSymbols: + set monthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMonthSymbols_, value.ref.pointer); } - /// isValidDateInCalendar: - bool isValidDateInCalendar_(NSCalendar calendar) { - return _objc_msgSend_146( - this.pointer, _sel_isValidDateInCalendar_, calendar.pointer); + /// shortMonthSymbols + objc.NSArray get shortMonthSymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// init - NSDateComponents init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSDateComponents.castFromPointer(_ret, retain: true, release: true); + /// setShortMonthSymbols: + set shortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setShortMonthSymbols_, value.ref.pointer); } - /// new - static NSDateComponents new1() { - final _ret = _objc_msgSend_19(_class_NSDateComponents, _sel_new); - return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + /// weekdaySymbols + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// allocWithZone: - static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSDateComponents, _sel_allocWithZone_, zone); - return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + /// setWeekdaySymbols: + set weekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setWeekdaySymbols_, value.ref.pointer); } - /// alloc - static NSDateComponents alloc() { - final _ret = _objc_msgSend_19(_class_NSDateComponents, _sel_alloc); - return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + /// shortWeekdaySymbols + objc.NSArray get shortWeekdaySymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - objc.ObjCObjectBase aTarget, - ffi.Pointer aSelector, - objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSDateComponents, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + /// setShortWeekdaySymbols: + set shortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setShortWeekdaySymbols_, value.ref.pointer); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSDateComponents, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// AMSymbol + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); + /// setAMSymbol: + set AMSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAMSymbol_, value.ref.pointer); } - /// useStoredAccessor + /// PMSymbol + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// setPMSymbol: + set PMSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPMSymbol_, value.ref.pointer); + } + + /// longEraSymbols + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setLongEraSymbols: + set longEraSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLongEraSymbols_, value.ref.pointer); + } + + /// veryShortMonthSymbols + objc.NSArray get veryShortMonthSymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setVeryShortMonthSymbols: + set veryShortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setVeryShortMonthSymbols_, value.ref.pointer); + } + + /// standaloneMonthSymbols + objc.NSArray get standaloneMonthSymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setStandaloneMonthSymbols: + set standaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setStandaloneMonthSymbols_, value.ref.pointer); + } + + /// shortStandaloneMonthSymbols + objc.NSArray get shortStandaloneMonthSymbols { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setShortStandaloneMonthSymbols: + set shortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setShortStandaloneMonthSymbols_, value.ref.pointer); + } + + /// veryShortStandaloneMonthSymbols + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setVeryShortStandaloneMonthSymbols: + set veryShortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setVeryShortStandaloneMonthSymbols_, value.ref.pointer); + } + + /// veryShortWeekdaySymbols + objc.NSArray get veryShortWeekdaySymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setVeryShortWeekdaySymbols: + set veryShortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setVeryShortWeekdaySymbols_, value.ref.pointer); + } + + /// standaloneWeekdaySymbols + objc.NSArray get standaloneWeekdaySymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setStandaloneWeekdaySymbols: + set standaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setStandaloneWeekdaySymbols_, value.ref.pointer); + } + + /// shortStandaloneWeekdaySymbols + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setShortStandaloneWeekdaySymbols: + set shortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setShortStandaloneWeekdaySymbols_, value.ref.pointer); + } + + /// veryShortStandaloneWeekdaySymbols + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setVeryShortStandaloneWeekdaySymbols: + set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setVeryShortStandaloneWeekdaySymbols_, value.ref.pointer); + } + + /// quarterSymbols + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setQuarterSymbols: + set quarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setQuarterSymbols_, value.ref.pointer); + } + + /// shortQuarterSymbols + objc.NSArray get shortQuarterSymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setShortQuarterSymbols: + set shortQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setShortQuarterSymbols_, value.ref.pointer); + } + + /// standaloneQuarterSymbols + objc.NSArray get standaloneQuarterSymbols { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setStandaloneQuarterSymbols: + set standaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setStandaloneQuarterSymbols_, value.ref.pointer); + } + + /// shortStandaloneQuarterSymbols + objc.NSArray get shortStandaloneQuarterSymbols { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setShortStandaloneQuarterSymbols: + set shortStandaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setShortStandaloneQuarterSymbols_, value.ref.pointer); + } + + /// gregorianStartDate + objc.NSDate? get gregorianStartDate { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_gregorianStartDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } + + /// setGregorianStartDate: + set gregorianStartDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setGregorianStartDate_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// doesRelativeDateFormatting + bool get doesRelativeDateFormatting { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_doesRelativeDateFormatting); + } + + /// setDoesRelativeDateFormatting: + set doesRelativeDateFormatting(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setDoesRelativeDateFormatting_, value); + } + + /// initWithDateFormat:allowNaturalLanguage: + objc.ObjCObjectBase initWithDateFormat_allowNaturalLanguage_( + objc.NSString format, bool flag) { + final _ret = _objc_msgSend_qqbb5y( + this.ref.retainAndReturnPointer(), + _sel_initWithDateFormat_allowNaturalLanguage_, + format.ref.pointer, + flag); + return objc.ObjCObjectBase(_ret, retain: false, release: true); + } + + /// allowsNaturalLanguage + bool allowsNaturalLanguage() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsNaturalLanguage); + } + + /// init + NSDateFormatter init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSDateFormatter new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDateFormatter, _sel_new); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDateFormatter, _sel_allocWithZone_, zone); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSDateFormatter alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDateFormatter, _sel_alloc); + return NSDateFormatter.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_cqxsqq( + _class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } + + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSDateComponents, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSDateFormatter, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSDateComponents, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSDateFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSDateComponents, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSDateFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSDateComponents, + _objc_msgSend_1tjlcwl( + _class_NSDateFormatter, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSDateComponents, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateFormatter, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSDateFormatter self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSDateFormatter retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSDateFormatter autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithCoder: + NSDateFormatter? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDateFormatter.castFromPointer(_ret, retain: false, release: true); + } } -late final _class_NSDateComponents = objc.getClass("NSDateComponents"); -late final _sel_calendar = objc.registerName("calendar"); -final _objc_msgSend_138 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCalendar_ = objc.registerName("setCalendar:"); -final _objc_msgSend_139 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_140 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_141 = 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_era = objc.registerName("era"); -late final _sel_setEra_ = objc.registerName("setEra:"); -final _objc_msgSend_142 = 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_year = objc.registerName("year"); -late final _sel_setYear_ = objc.registerName("setYear:"); -late final _sel_month = objc.registerName("month"); -late final _sel_setMonth_ = objc.registerName("setMonth:"); -late final _sel_day = objc.registerName("day"); -late final _sel_setDay_ = objc.registerName("setDay:"); -late final _sel_hour = objc.registerName("hour"); -late final _sel_setHour_ = objc.registerName("setHour:"); -late final _sel_minute = objc.registerName("minute"); -late final _sel_setMinute_ = objc.registerName("setMinute:"); -late final _sel_second = objc.registerName("second"); -late final _sel_setSecond_ = objc.registerName("setSecond:"); -late final _sel_nanosecond = objc.registerName("nanosecond"); -late final _sel_setNanosecond_ = objc.registerName("setNanosecond:"); -late final _sel_weekday = objc.registerName("weekday"); -late final _sel_setWeekday_ = objc.registerName("setWeekday:"); -late final _sel_weekdayOrdinal = objc.registerName("weekdayOrdinal"); -late final _sel_setWeekdayOrdinal_ = objc.registerName("setWeekdayOrdinal:"); -late final _sel_quarter = objc.registerName("quarter"); -late final _sel_setQuarter_ = objc.registerName("setQuarter:"); -late final _sel_weekOfMonth = objc.registerName("weekOfMonth"); -late final _sel_setWeekOfMonth_ = objc.registerName("setWeekOfMonth:"); -late final _sel_weekOfYear = objc.registerName("weekOfYear"); -late final _sel_setWeekOfYear_ = objc.registerName("setWeekOfYear:"); -late final _sel_yearForWeekOfYear = objc.registerName("yearForWeekOfYear"); -late final _sel_setYearForWeekOfYear_ = - objc.registerName("setYearForWeekOfYear:"); -late final _sel_isLeapMonth = objc.registerName("isLeapMonth"); -late final _sel_setLeapMonth_ = objc.registerName("setLeapMonth:"); -late final _sel_date = objc.registerName("date"); -late final _sel_week = objc.registerName("week"); -late final _sel_setWeek_ = objc.registerName("setWeek:"); -final _objc_msgSend_143 = 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_setValue_forComponent_ = - objc.registerName("setValue:forComponent:"); -final _objc_msgSend_144 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Long, ffi.UnsignedLong)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int, int)>(); -late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); -final _objc_msgSend_145 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_isValidDate = objc.registerName("isValidDate"); -late final _sel_isValidDateInCalendar_ = - objc.registerName("isValidDateInCalendar:"); -final _objc_msgSend_146 = 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_dateFromComponents_ = objc.registerName("dateFromComponents:"); -final _objc_msgSend_147 = 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_components_fromDate_ = - objc.registerName("components:fromDate:"); -final _objc_msgSend_148 = 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 _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); +late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); +late final _sel_numberFromString_ = objc.registerName("numberFromString:"); -enum NSCalendarOptions { - NSCalendarWrapComponents(1), - NSCalendarMatchStrictly(2), - NSCalendarSearchBackwards(4), - NSCalendarMatchPreviousTimePreservingSmallerUnits(256), - NSCalendarMatchNextTimePreservingSmallerUnits(512), - NSCalendarMatchNextTime(1024), - NSCalendarMatchFirst(4096), - NSCalendarMatchLast(8192); +enum NSNumberFormatterStyle { + NSNumberFormatterNoStyle(0), + NSNumberFormatterDecimalStyle(1), + NSNumberFormatterCurrencyStyle(2), + NSNumberFormatterPercentStyle(3), + NSNumberFormatterScientificStyle(4), + NSNumberFormatterSpellOutStyle(5), + NSNumberFormatterOrdinalStyle(6), + NSNumberFormatterCurrencyISOCodeStyle(8), + NSNumberFormatterCurrencyPluralStyle(9), + NSNumberFormatterCurrencyAccountingStyle(10); final int value; - const NSCalendarOptions(this.value); + const NSNumberFormatterStyle(this.value); - static NSCalendarOptions fromValue(int value) => switch (value) { - 1 => NSCalendarWrapComponents, - 2 => NSCalendarMatchStrictly, - 4 => NSCalendarSearchBackwards, - 256 => NSCalendarMatchPreviousTimePreservingSmallerUnits, - 512 => NSCalendarMatchNextTimePreservingSmallerUnits, - 1024 => NSCalendarMatchNextTime, - 4096 => NSCalendarMatchFirst, - 8192 => NSCalendarMatchLast, - _ => throw ArgumentError("Unknown value for NSCalendarOptions: $value"), + static NSNumberFormatterStyle fromValue(int value) => switch (value) { + 0 => NSNumberFormatterNoStyle, + 1 => NSNumberFormatterDecimalStyle, + 2 => NSNumberFormatterCurrencyStyle, + 3 => NSNumberFormatterPercentStyle, + 4 => NSNumberFormatterScientificStyle, + 5 => NSNumberFormatterSpellOutStyle, + 6 => NSNumberFormatterOrdinalStyle, + 8 => NSNumberFormatterCurrencyISOCodeStyle, + 9 => NSNumberFormatterCurrencyPluralStyle, + 10 => NSNumberFormatterCurrencyAccountingStyle, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterStyle: $value"), }; } -late final _sel_dateByAddingComponents_toDate_options_ = - objc.registerName("dateByAddingComponents:toDate:options:"); -final _objc_msgSend_149 = objc.msgSendPointer +late final _sel_localizedStringFromNumber_numberStyle_ = + objc.registerName("localizedStringFromNumber:numberStyle:"); +final _objc_msgSend_1dsaaq7 = 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_components_fromDate_toDate_options_ = - objc.registerName("components:fromDate:toDate:options:"); -final _objc_msgSend_150 = objc.msgSendPointer + +enum NSNumberFormatterBehavior { + NSNumberFormatterBehaviorDefault(0), + NSNumberFormatterBehavior10_0(1000), + NSNumberFormatterBehavior10_4(1040); + + final int value; + const NSNumberFormatterBehavior(this.value); + + static NSNumberFormatterBehavior fromValue(int value) => switch (value) { + 0 => NSNumberFormatterBehaviorDefault, + 1000 => NSNumberFormatterBehavior10_0, + 1040 => NSNumberFormatterBehavior10_4, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterBehavior: $value"), + }; +} + +final _objc_msgSend_1nvfxwt = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_getEra_year_month_day_fromDate_ = - objc.registerName("getEra:year:month:day:fromDate:"); -final _objc_msgSend_151 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1p18hg0 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_ = - objc.registerName("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); -late final _sel_getHour_minute_second_nanosecond_fromDate_ = - objc.registerName("getHour:minute:second:nanosecond:fromDate:"); -late final _sel_component_fromDate_ = objc.registerName("component:fromDate:"); -final _objc_msgSend_152 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberStyle = objc.registerName("numberStyle"); +final _objc_msgSend_1we0qxe = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_ = objc - .registerName("dateWithEra:year:month:day:hour:minute:second:nanosecond:"); -final _objc_msgSend_153 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); +final _objc_msgSend_qp19lh = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - int, - int, - int, - int, - int)>(); -late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_ = - objc.registerName( - "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); -late final _sel_startOfDayForDate_ = objc.registerName("startOfDayForDate:"); -final _objc_msgSend_154 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_generatesDecimalNumbers = + objc.registerName("generatesDecimalNumbers"); +late final _sel_setGeneratesDecimalNumbers_ = + objc.registerName("setGeneratesDecimalNumbers:"); +late final _sel_negativeFormat = objc.registerName("negativeFormat"); +late final _sel_setNegativeFormat_ = objc.registerName("setNegativeFormat:"); +late final _sel_textAttributesForNegativeValues = + objc.registerName("textAttributesForNegativeValues"); +late final _sel_setTextAttributesForNegativeValues_ = + objc.registerName("setTextAttributesForNegativeValues:"); +late final _sel_positiveFormat = objc.registerName("positiveFormat"); +late final _sel_setPositiveFormat_ = objc.registerName("setPositiveFormat:"); +late final _sel_textAttributesForPositiveValues = + objc.registerName("textAttributesForPositiveValues"); +late final _sel_setTextAttributesForPositiveValues_ = + objc.registerName("setTextAttributesForPositiveValues:"); +late final _sel_allowsFloats = objc.registerName("allowsFloats"); +late final _sel_setAllowsFloats_ = objc.registerName("setAllowsFloats:"); +late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); +late final _sel_setDecimalSeparator_ = + objc.registerName("setDecimalSeparator:"); +late final _sel_alwaysShowsDecimalSeparator = + objc.registerName("alwaysShowsDecimalSeparator"); +late final _sel_setAlwaysShowsDecimalSeparator_ = + objc.registerName("setAlwaysShowsDecimalSeparator:"); +late final _sel_currencyDecimalSeparator = + objc.registerName("currencyDecimalSeparator"); +late final _sel_setCurrencyDecimalSeparator_ = + objc.registerName("setCurrencyDecimalSeparator:"); +late final _sel_usesGroupingSeparator = + objc.registerName("usesGroupingSeparator"); +late final _sel_setUsesGroupingSeparator_ = + objc.registerName("setUsesGroupingSeparator:"); +late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); +late final _sel_setGroupingSeparator_ = + objc.registerName("setGroupingSeparator:"); +late final _sel_zeroSymbol = objc.registerName("zeroSymbol"); +late final _sel_setZeroSymbol_ = objc.registerName("setZeroSymbol:"); +late final _sel_textAttributesForZero = + objc.registerName("textAttributesForZero"); +late final _sel_setTextAttributesForZero_ = + objc.registerName("setTextAttributesForZero:"); +late final _sel_nilSymbol = objc.registerName("nilSymbol"); +late final _sel_setNilSymbol_ = objc.registerName("setNilSymbol:"); +late final _sel_textAttributesForNil = + objc.registerName("textAttributesForNil"); +late final _sel_setTextAttributesForNil_ = + objc.registerName("setTextAttributesForNil:"); +late final _sel_notANumberSymbol = objc.registerName("notANumberSymbol"); +late final _sel_setNotANumberSymbol_ = + objc.registerName("setNotANumberSymbol:"); +late final _sel_textAttributesForNotANumber = + objc.registerName("textAttributesForNotANumber"); +late final _sel_setTextAttributesForNotANumber_ = + objc.registerName("setTextAttributesForNotANumber:"); +late final _sel_positiveInfinitySymbol = + objc.registerName("positiveInfinitySymbol"); +late final _sel_setPositiveInfinitySymbol_ = + objc.registerName("setPositiveInfinitySymbol:"); +late final _sel_textAttributesForPositiveInfinity = + objc.registerName("textAttributesForPositiveInfinity"); +late final _sel_setTextAttributesForPositiveInfinity_ = + objc.registerName("setTextAttributesForPositiveInfinity:"); +late final _sel_negativeInfinitySymbol = + objc.registerName("negativeInfinitySymbol"); +late final _sel_setNegativeInfinitySymbol_ = + objc.registerName("setNegativeInfinitySymbol:"); +late final _sel_textAttributesForNegativeInfinity = + objc.registerName("textAttributesForNegativeInfinity"); +late final _sel_setTextAttributesForNegativeInfinity_ = + objc.registerName("setTextAttributesForNegativeInfinity:"); +late final _sel_positivePrefix = objc.registerName("positivePrefix"); +late final _sel_setPositivePrefix_ = objc.registerName("setPositivePrefix:"); +late final _sel_positiveSuffix = objc.registerName("positiveSuffix"); +late final _sel_setPositiveSuffix_ = objc.registerName("setPositiveSuffix:"); +late final _sel_negativePrefix = objc.registerName("negativePrefix"); +late final _sel_setNegativePrefix_ = objc.registerName("setNegativePrefix:"); +late final _sel_negativeSuffix = objc.registerName("negativeSuffix"); +late final _sel_setNegativeSuffix_ = objc.registerName("setNegativeSuffix:"); +late final _sel_currencyCode = objc.registerName("currencyCode"); +late final _sel_setCurrencyCode_ = objc.registerName("setCurrencyCode:"); +late final _sel_currencySymbol = objc.registerName("currencySymbol"); +late final _sel_setCurrencySymbol_ = objc.registerName("setCurrencySymbol:"); +late final _sel_internationalCurrencySymbol = + objc.registerName("internationalCurrencySymbol"); +late final _sel_setInternationalCurrencySymbol_ = + objc.registerName("setInternationalCurrencySymbol:"); +late final _sel_percentSymbol = objc.registerName("percentSymbol"); +late final _sel_setPercentSymbol_ = objc.registerName("setPercentSymbol:"); +late final _sel_perMillSymbol = objc.registerName("perMillSymbol"); +late final _sel_setPerMillSymbol_ = objc.registerName("setPerMillSymbol:"); +late final _sel_minusSign = objc.registerName("minusSign"); +late final _sel_setMinusSign_ = objc.registerName("setMinusSign:"); +late final _sel_plusSign = objc.registerName("plusSign"); +late final _sel_setPlusSign_ = objc.registerName("setPlusSign:"); +late final _sel_exponentSymbol = objc.registerName("exponentSymbol"); +late final _sel_setExponentSymbol_ = objc.registerName("setExponentSymbol:"); +late final _sel_groupingSize = objc.registerName("groupingSize"); +late final _sel_setGroupingSize_ = objc.registerName("setGroupingSize:"); +late final _sel_secondaryGroupingSize = + objc.registerName("secondaryGroupingSize"); +late final _sel_setSecondaryGroupingSize_ = + objc.registerName("setSecondaryGroupingSize:"); +late final _sel_multiplier = objc.registerName("multiplier"); +late final _sel_setMultiplier_ = objc.registerName("setMultiplier:"); +late final _sel_formatWidth = objc.registerName("formatWidth"); +late final _sel_setFormatWidth_ = objc.registerName("setFormatWidth:"); +late final _sel_paddingCharacter = objc.registerName("paddingCharacter"); +late final _sel_setPaddingCharacter_ = + objc.registerName("setPaddingCharacter:"); + +enum NSNumberFormatterPadPosition { + NSNumberFormatterPadBeforePrefix(0), + NSNumberFormatterPadAfterPrefix(1), + NSNumberFormatterPadBeforeSuffix(2), + NSNumberFormatterPadAfterSuffix(3); + + final int value; + const NSNumberFormatterPadPosition(this.value); + + static NSNumberFormatterPadPosition fromValue(int value) => switch (value) { + 0 => NSNumberFormatterPadBeforePrefix, + 1 => NSNumberFormatterPadAfterPrefix, + 2 => NSNumberFormatterPadBeforeSuffix, + 3 => NSNumberFormatterPadAfterSuffix, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterPadPosition: $value"), + }; +} + +late final _sel_paddingPosition = objc.registerName("paddingPosition"); +final _objc_msgSend_1s69i33 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_componentsInTimeZone_fromDate_ = - objc.registerName("componentsInTimeZone:fromDate:"); -final _objc_msgSend_155 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); +final _objc_msgSend_gz8txq = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_compareDate_toDate_toUnitGranularity_ = - objc.registerName("compareDate:toDate:toUnitGranularity:"); -final _objc_msgSend_156 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +enum NSNumberFormatterRoundingMode { + NSNumberFormatterRoundCeiling(0), + NSNumberFormatterRoundFloor(1), + NSNumberFormatterRoundDown(2), + NSNumberFormatterRoundUp(3), + NSNumberFormatterRoundHalfEven(4), + NSNumberFormatterRoundHalfDown(5), + NSNumberFormatterRoundHalfUp(6); + + final int value; + const NSNumberFormatterRoundingMode(this.value); + + static NSNumberFormatterRoundingMode fromValue(int value) => switch (value) { + 0 => NSNumberFormatterRoundCeiling, + 1 => NSNumberFormatterRoundFloor, + 2 => NSNumberFormatterRoundDown, + 3 => NSNumberFormatterRoundUp, + 4 => NSNumberFormatterRoundHalfEven, + 5 => NSNumberFormatterRoundHalfDown, + 6 => NSNumberFormatterRoundHalfUp, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterRoundingMode: $value"), + }; +} + +late final _sel_roundingMode = objc.registerName("roundingMode"); +final _objc_msgSend_38d07q = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_isDate_equalToDate_toUnitGranularity_ = - objc.registerName("isDate:equalToDate:toUnitGranularity:"); -final _objc_msgSend_157 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_isDate_inSameDayAsDate_ = - objc.registerName("isDate:inSameDayAsDate:"); -final _objc_msgSend_158 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); +final _objc_msgSend_5krs29 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_isDateInToday_ = objc.registerName("isDateInToday:"); -late final _sel_isDateInYesterday_ = objc.registerName("isDateInYesterday:"); -late final _sel_isDateInTomorrow_ = objc.registerName("isDateInTomorrow:"); -late final _sel_isDateInWeekend_ = objc.registerName("isDateInWeekend:"); -late final _sel_rangeOfWeekendStartDate_interval_containingDate_ = - objc.registerName("rangeOfWeekendStartDate:interval:containingDate:"); -final _objc_msgSend_159 = 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_nextWeekendStartDate_interval_options_afterDate_ = - objc.registerName("nextWeekendStartDate:interval:options:afterDate:"); -final _objc_msgSend_160 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_components_fromDateComponents_toDateComponents_options_ = objc - .registerName("components:fromDateComponents:toDateComponents:options:"); -final _objc_msgSend_161 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_dateByAddingUnit_value_toDate_options_ = - objc.registerName("dateByAddingUnit:value:toDate:options:"); -final _objc_msgSend_162 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_roundingIncrement = objc.registerName("roundingIncrement"); +late final _sel_setRoundingIncrement_ = + objc.registerName("setRoundingIncrement:"); +late final _sel_minimumIntegerDigits = + objc.registerName("minimumIntegerDigits"); +late final _sel_setMinimumIntegerDigits_ = + objc.registerName("setMinimumIntegerDigits:"); +late final _sel_maximumIntegerDigits = + objc.registerName("maximumIntegerDigits"); +late final _sel_setMaximumIntegerDigits_ = + objc.registerName("setMaximumIntegerDigits:"); +late final _sel_minimumFractionDigits = + objc.registerName("minimumFractionDigits"); +late final _sel_setMinimumFractionDigits_ = + objc.registerName("setMinimumFractionDigits:"); +late final _sel_maximumFractionDigits = + objc.registerName("maximumFractionDigits"); +late final _sel_setMaximumFractionDigits_ = + objc.registerName("setMaximumFractionDigits:"); +late final _sel_minimum = objc.registerName("minimum"); +late final _sel_setMinimum_ = objc.registerName("setMinimum:"); +late final _sel_maximum = objc.registerName("maximum"); +late final _sel_setMaximum_ = objc.registerName("setMaximum:"); +late final _sel_currencyGroupingSeparator = + objc.registerName("currencyGroupingSeparator"); +late final _sel_setCurrencyGroupingSeparator_ = + objc.registerName("setCurrencyGroupingSeparator:"); +late final _sel_usesSignificantDigits = + objc.registerName("usesSignificantDigits"); +late final _sel_setUsesSignificantDigits_ = + objc.registerName("setUsesSignificantDigits:"); +late final _sel_minimumSignificantDigits = + objc.registerName("minimumSignificantDigits"); +late final _sel_setMinimumSignificantDigits_ = + objc.registerName("setMinimumSignificantDigits:"); +late final _sel_maximumSignificantDigits = + objc.registerName("maximumSignificantDigits"); +late final _sel_setMaximumSignificantDigits_ = + objc.registerName("setMaximumSignificantDigits:"); +late final _sel_isPartialStringValidationEnabled = + objc.registerName("isPartialStringValidationEnabled"); +late final _sel_setPartialStringValidationEnabled_ = + objc.registerName("setPartialStringValidationEnabled:"); +late final _sel_hasThousandSeparators = + objc.registerName("hasThousandSeparators"); +late final _sel_setHasThousandSeparators_ = + objc.registerName("setHasThousandSeparators:"); +late final _sel_thousandSeparator = objc.registerName("thousandSeparator"); +late final _sel_setThousandSeparator_ = + objc.registerName("setThousandSeparator:"); +late final _sel_localizesFormat = objc.registerName("localizesFormat"); +late final _sel_setLocalizesFormat_ = objc.registerName("setLocalizesFormat:"); +late final _sel_format = objc.registerName("format"); +late final _sel_setFormat_ = objc.registerName("setFormat:"); +late final _sel_attributedStringForZero = + objc.registerName("attributedStringForZero"); +late final _sel_setAttributedStringForZero_ = + objc.registerName("setAttributedStringForZero:"); +late final _sel_attributedStringForNil = + objc.registerName("attributedStringForNil"); +late final _sel_setAttributedStringForNil_ = + objc.registerName("setAttributedStringForNil:"); +late final _sel_attributedStringForNotANumber = + objc.registerName("attributedStringForNotANumber"); +late final _sel_setAttributedStringForNotANumber_ = + objc.registerName("setAttributedStringForNotANumber:"); +late final _class_NSDecimalNumberHandler = + objc.getClass("NSDecimalNumberHandler"); + +enum NSRoundingMode { + NSRoundPlain(0), + NSRoundDown(1), + NSRoundUp(2), + NSRoundBankers(3); + + final int value; + const NSRoundingMode(this.value); + + static NSRoundingMode fromValue(int value) => switch (value) { + 0 => NSRoundPlain, + 1 => NSRoundDown, + 2 => NSRoundUp, + 3 => NSRoundBankers, + _ => throw ArgumentError("Unknown value for NSRoundingMode: $value"), + }; +} + +final _objc_msgSend_1iugf7h = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Long, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - int)>(); -void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => + int Function( + ffi.Pointer, ffi.Pointer)>(); +int _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer, - bool, ffi.Pointer))(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSDate_bool_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSDate_bool_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - + ffi.UnsignedLong Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_NSRoundingMode_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSRoundingMode_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSRoundingMode_ffiVoid_closureTrampoline, 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSRoundingMode_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDate_bool_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSDate_bool_bool._(pointer, - retain: retain, release: release); - } + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>( + 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_NSDate_bool_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newPointerBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( - void Function(objc.NSDate?, bool, ffi.Pointer) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) - .cast(), - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: true, release: true), - arg1, arg2))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock)> + fromFunction(NSRoundingMode Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSRoundingMode_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0).value), + retain: false, + release: true); +} - /// Creates a listener block from a Dart function. +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSRoundingMode_ffiVoid_CallExtension + on objc.ObjCBlock)> { + NSRoundingMode call(ffi.Pointer arg0) => + NSRoundingMode.fromValue(ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0)); +} + +late final _sel_scale = objc.registerName("scale"); +final _objc_msgSend_157j54x = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +int _ObjCBlock_ffiShort_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiShort_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiShort_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_ffiShort_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiShort_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiShort_ffiVoid_closureTrampoline, 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiShort_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. /// - /// 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. + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiShort_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDate_bool_bool.listener( - void Function(objc.NSDate?, bool, ffi.Pointer) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSDate_bool_bool( - objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: false, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + int Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_ffiShort_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} - void call(objc.NSDate? arg0, bool arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiShort_ffiVoid_CallExtension + on objc.ObjCBlock)> { + int call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } -late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = - objc.registerName( - "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); -final _objc_msgSend_163 = objc.msgSendPointer +late final _class_NSDecimalNumber = objc.getClass("NSDecimalNumber"); +late final _sel_initWithMantissa_exponent_isNegative_ = + objc.registerName("initWithMantissa:exponent:isNegative:"); +final _objc_msgSend_1f2l7cc = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.UnsignedLongLong, + ffi.Short, + ffi.Bool)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_nextDateAfterDate_matchingComponents_options_ = - objc.registerName("nextDateAfterDate:matchingComponents:options:"); -final _objc_msgSend_164 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, int, int, bool)>(); +late final _sel_initWithString_locale_ = + objc.registerName("initWithString:locale:"); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +late final _sel_decimalNumberWithMantissa_exponent_isNegative_ = + objc.registerName("decimalNumberWithMantissa:exponent:isNegative:"); +late final _sel_decimalNumberWithString_ = + objc.registerName("decimalNumberWithString:"); +late final _sel_decimalNumberWithString_locale_ = + objc.registerName("decimalNumberWithString:locale:"); +late final _sel_zero = objc.registerName("zero"); +late final _sel_one = objc.registerName("one"); +late final _sel_minimumDecimalNumber = + objc.registerName("minimumDecimalNumber"); +late final _sel_maximumDecimalNumber = + objc.registerName("maximumDecimalNumber"); +late final _sel_notANumber = objc.registerName("notANumber"); +late final _sel_decimalNumberByAdding_ = + objc.registerName("decimalNumberByAdding:"); +late final _sel_decimalNumberByAdding_withBehavior_ = + objc.registerName("decimalNumberByAdding:withBehavior:"); +late final _sel_decimalNumberBySubtracting_ = + objc.registerName("decimalNumberBySubtracting:"); +late final _sel_decimalNumberBySubtracting_withBehavior_ = + objc.registerName("decimalNumberBySubtracting:withBehavior:"); +late final _sel_decimalNumberByMultiplyingBy_ = + objc.registerName("decimalNumberByMultiplyingBy:"); +late final _sel_decimalNumberByMultiplyingBy_withBehavior_ = + objc.registerName("decimalNumberByMultiplyingBy:withBehavior:"); +late final _sel_decimalNumberByDividingBy_ = + objc.registerName("decimalNumberByDividingBy:"); +late final _sel_decimalNumberByDividingBy_withBehavior_ = + objc.registerName("decimalNumberByDividingBy:withBehavior:"); +late final _sel_decimalNumberByRaisingToPower_ = + objc.registerName("decimalNumberByRaisingToPower:"); +final _objc_msgSend_ehxl2g = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_nextDateAfterDate_matchingUnit_value_options_ = - objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); -final _objc_msgSend_165 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_decimalNumberByRaisingToPower_withBehavior_ = + objc.registerName("decimalNumberByRaisingToPower:withBehavior:"); +final _objc_msgSend_m23d4r = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong, - ffi.Long, - ffi.UnsignedLong)>>() + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, int, - int)>(); -late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = - objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); -final _objc_msgSend_166 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_decimalNumberByMultiplyingByPowerOf10_ = + objc.registerName("decimalNumberByMultiplyingByPowerOf10:"); +final _objc_msgSend_15di41h = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.UnsignedLong)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - int)>(); -late final _sel_dateBySettingUnit_value_ofDate_options_ = - objc.registerName("dateBySettingUnit:value:ofDate:options:"); -late final _sel_dateBySettingHour_minute_second_ofDate_options_ = - objc.registerName("dateBySettingHour:minute:second:ofDate:options:"); -final _objc_msgSend_167 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_decimalNumberByMultiplyingByPowerOf10_withBehavior_ = + objc.registerName("decimalNumberByMultiplyingByPowerOf10:withBehavior:"); +final _objc_msgSend_1y5v0cu = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Short, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, - int, - int, - ffi.Pointer, - int)>(); -late final _sel_date_matchesComponents_ = - objc.registerName("date:matchesComponents:"); -final _objc_msgSend_168 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_decimalNumberByRoundingAccordingToBehavior_ = + objc.registerName("decimalNumberByRoundingAccordingToBehavior:"); +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_1ile2ev = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Long Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -final _objc_msgSend_169 = objc.msgSendPointer + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_defaultBehavior = objc.registerName("defaultBehavior"); +late final _sel_setDefaultBehavior_ = objc.registerName("setDefaultBehavior:"); +late final _sel_objCType = objc.registerName("objCType"); +final _objc_msgSend_1ypnhm3 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isLenient = objc.registerName("isLenient"); -late final _sel_setLenient_ = objc.registerName("setLenient:"); -late final _sel_twoDigitStartDate = objc.registerName("twoDigitStartDate"); -late final _sel_setTwoDigitStartDate_ = - objc.registerName("setTwoDigitStartDate:"); -final _objc_msgSend_170 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_doubleValue = objc.registerName("doubleValue"); +late final _sel_numberWithChar_ = objc.registerName("numberWithChar:"); +final _objc_msgSend_1pfmxrb = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_defaultDate = objc.registerName("defaultDate"); -late final _sel_setDefaultDate_ = objc.registerName("setDefaultDate:"); -late final _sel_setEraSymbols_ = objc.registerName("setEraSymbols:"); -final _objc_msgSend_171 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedChar_ = + objc.registerName("numberWithUnsignedChar:"); +final _objc_msgSend_1ar9f5m = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setMonthSymbols_ = objc.registerName("setMonthSymbols:"); -late final _sel_setShortMonthSymbols_ = - objc.registerName("setShortMonthSymbols:"); -late final _sel_setWeekdaySymbols_ = objc.registerName("setWeekdaySymbols:"); -late final _sel_setShortWeekdaySymbols_ = - objc.registerName("setShortWeekdaySymbols:"); -late final _sel_setAMSymbol_ = objc.registerName("setAMSymbol:"); -late final _sel_setPMSymbol_ = objc.registerName("setPMSymbol:"); -late final _sel_setLongEraSymbols_ = objc.registerName("setLongEraSymbols:"); -late final _sel_setVeryShortMonthSymbols_ = - objc.registerName("setVeryShortMonthSymbols:"); -late final _sel_setStandaloneMonthSymbols_ = - objc.registerName("setStandaloneMonthSymbols:"); -late final _sel_setShortStandaloneMonthSymbols_ = - objc.registerName("setShortStandaloneMonthSymbols:"); -late final _sel_setVeryShortStandaloneMonthSymbols_ = - objc.registerName("setVeryShortStandaloneMonthSymbols:"); -late final _sel_setVeryShortWeekdaySymbols_ = - objc.registerName("setVeryShortWeekdaySymbols:"); -late final _sel_setStandaloneWeekdaySymbols_ = - objc.registerName("setStandaloneWeekdaySymbols:"); -late final _sel_setShortStandaloneWeekdaySymbols_ = - objc.registerName("setShortStandaloneWeekdaySymbols:"); -late final _sel_setVeryShortStandaloneWeekdaySymbols_ = - objc.registerName("setVeryShortStandaloneWeekdaySymbols:"); -late final _sel_setQuarterSymbols_ = objc.registerName("setQuarterSymbols:"); -late final _sel_setShortQuarterSymbols_ = - objc.registerName("setShortQuarterSymbols:"); -late final _sel_setStandaloneQuarterSymbols_ = - objc.registerName("setStandaloneQuarterSymbols:"); -late final _sel_setShortStandaloneQuarterSymbols_ = - objc.registerName("setShortStandaloneQuarterSymbols:"); -late final _sel_gregorianStartDate = objc.registerName("gregorianStartDate"); -late final _sel_setGregorianStartDate_ = - objc.registerName("setGregorianStartDate:"); -late final _sel_doesRelativeDateFormatting = - objc.registerName("doesRelativeDateFormatting"); -late final _sel_setDoesRelativeDateFormatting_ = - objc.registerName("setDoesRelativeDateFormatting:"); -late final _sel_initWithDateFormat_allowNaturalLanguage_ = - objc.registerName("initWithDateFormat:allowNaturalLanguage:"); -final _objc_msgSend_172 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithShort_ = objc.registerName("numberWithShort:"); +late final _sel_numberWithUnsignedShort_ = + objc.registerName("numberWithUnsignedShort:"); +final _objc_msgSend_122gbai = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithInt_ = objc.registerName("numberWithInt:"); +final _objc_msgSend_105o5we = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedInt_ = + objc.registerName("numberWithUnsignedInt:"); +final _objc_msgSend_pxgym4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithLong_ = objc.registerName("numberWithLong:"); +late final _sel_numberWithUnsignedLong_ = + objc.registerName("numberWithUnsignedLong:"); +late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:"); +final _objc_msgSend_yjzv9z = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedLongLong_ = + objc.registerName("numberWithUnsignedLongLong:"); +final _objc_msgSend_ybbscc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:"); +final _objc_msgSend_1pmj399 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); +final _objc_msgSend_m7jc8y = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); +final _objc_msgSend_1upz917 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:"); +late final _sel_numberWithUnsignedInteger_ = + objc.registerName("numberWithUnsignedInteger:"); +late final _sel_initWithBytes_objCType_ = + objc.registerName("initWithBytes:objCType:"); +final _objc_msgSend_1sdw29g = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_allowsNaturalLanguage = - objc.registerName("allowsNaturalLanguage"); + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_valueWithBytes_objCType_ = + objc.registerName("valueWithBytes:objCType:"); +late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); +late final _sel_valueWithNonretainedObject_ = + objc.registerName("valueWithNonretainedObject:"); +late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); +final _objc_msgSend_1ph8ubj = 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_valueWithRange_ = objc.registerName("valueWithRange:"); -/// NSFormatter -class NSFormatter extends objc.NSObject { - NSFormatter._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +final class CGPoint extends ffi.Struct { + @ffi.Double() + external double x; - /// Constructs a [NSFormatter] that points to the same underlying object as [other]. - NSFormatter.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + @ffi.Double() + external double y; +} - /// Constructs a [NSFormatter] that wraps the given raw object pointer. - NSFormatter.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); +late final _sel_valueWithPoint_ = objc.registerName("valueWithPoint:"); +final _objc_msgSend_1xj0srq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGPoint)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGPoint)>(); - /// Returns whether [obj] is an instance of [NSFormatter]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFormatter); - } +final class CGSize extends ffi.Struct { + @ffi.Double() + external double width; - /// stringForObjectValue: - objc.NSString? stringForObjectValue_(objc.ObjCObjectBase? obj) { - final _ret = _objc_msgSend_173( - this.pointer, _sel_stringForObjectValue_, obj?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + @ffi.Double() + external double height; +} + +late final _sel_valueWithSize_ = objc.registerName("valueWithSize:"); +final _objc_msgSend_fnn627 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGSize)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGSize)>(); + +final class CGRect extends ffi.Struct { + external CGPoint origin; + + external CGSize size; +} + +late final _sel_valueWithRect_ = objc.registerName("valueWithRect:"); +final _objc_msgSend_14yq09w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGRect)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGRect)>(); + +final class NSEdgeInsets extends ffi.Struct { + @ffi.Double() + external double top; + + @ffi.Double() + external double left; + + @ffi.Double() + external double bottom; + + @ffi.Double() + external double right; +} + +late final _sel_valueWithEdgeInsets_ = + objc.registerName("valueWithEdgeInsets:"); +final _objc_msgSend_12s6yn4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSEdgeInsets)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSEdgeInsets)>(); + +/// NSDecimalNumber +class NSDecimalNumber extends objc.NSNumber { + NSDecimalNumber._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDecimalNumber] that points to the same underlying object as [other]. + NSDecimalNumber.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSDecimalNumber] that wraps the given raw object pointer. + NSDecimalNumber.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDecimalNumber]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDecimalNumber); } - /// attributedStringForObjectValue:withDefaultAttributes: - NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( - objc.ObjCObjectBase obj, objc.NSDictionary? attrs) { - final _ret = _objc_msgSend_174( - this.pointer, - _sel_attributedStringForObjectValue_withDefaultAttributes_, - obj.pointer, - attrs?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAttributedString.castFromPointer(_ret, retain: true, release: true); + /// initWithMantissa:exponent:isNegative: + NSDecimalNumber initWithMantissa_exponent_isNegative_( + int mantissa, int exponent, bool flag) { + final _ret = _objc_msgSend_1f2l7cc(this.ref.retainAndReturnPointer(), + _sel_initWithMantissa_exponent_isNegative_, mantissa, exponent, flag); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } - /// editingStringForObjectValue: - objc.NSString? editingStringForObjectValue_(objc.ObjCObjectBase obj) { - final _ret = _objc_msgSend_175( - this.pointer, _sel_editingStringForObjectValue_, obj.pointer); + /// initWithString: + NSDecimalNumber initWithString_(objc.NSString? numberValue) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, numberValue?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithString:locale: + NSDecimalNumber initWithString_locale_( + objc.NSString? numberValue, objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithString_locale_, + numberValue?.ref.pointer ?? ffi.nullptr, + locale?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); + } + + /// descriptionWithLocale: + objc.NSString descriptionWithLocale_(objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_descriptionWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberWithMantissa:exponent:isNegative: + static NSDecimalNumber decimalNumberWithMantissa_exponent_isNegative_( + int mantissa, int exponent, bool flag) { + final _ret = _objc_msgSend_1f2l7cc( + _class_NSDecimalNumber, + _sel_decimalNumberWithMantissa_exponent_isNegative_, + mantissa, + exponent, + flag); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberWithString: + static NSDecimalNumber decimalNumberWithString_(objc.NSString? numberValue) { + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, + _sel_decimalNumberWithString_, numberValue?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberWithString:locale: + static NSDecimalNumber decimalNumberWithString_locale_( + objc.NSString? numberValue, objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_iq11qg( + _class_NSDecimalNumber, + _sel_decimalNumberWithString_locale_, + numberValue?.ref.pointer ?? ffi.nullptr, + locale?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// zero + static NSDecimalNumber getZero() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_zero); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// one + static NSDecimalNumber getOne() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_one); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// minimumDecimalNumber + static NSDecimalNumber getMinimumDecimalNumber() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_minimumDecimalNumber); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// maximumDecimalNumber + static NSDecimalNumber getMaximumDecimalNumber() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_maximumDecimalNumber); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// notANumber + static NSDecimalNumber getNotANumber() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_notANumber); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByAdding: + NSDecimalNumber decimalNumberByAdding_(NSDecimalNumber decimalNumber) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberByAdding_, decimalNumber.ref.pointer); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByAdding:withBehavior: + NSDecimalNumber decimalNumberByAdding_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberByAdding_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberBySubtracting: + NSDecimalNumber decimalNumberBySubtracting_(NSDecimalNumber decimalNumber) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberBySubtracting_, decimalNumber.ref.pointer); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberBySubtracting:withBehavior: + NSDecimalNumber decimalNumberBySubtracting_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberBySubtracting_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByMultiplyingBy: + NSDecimalNumber decimalNumberByMultiplyingBy_(NSDecimalNumber decimalNumber) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberByMultiplyingBy_, decimalNumber.ref.pointer); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByMultiplyingBy:withBehavior: + NSDecimalNumber decimalNumberByMultiplyingBy_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberByMultiplyingBy_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByDividingBy: + NSDecimalNumber decimalNumberByDividingBy_(NSDecimalNumber decimalNumber) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberByDividingBy_, decimalNumber.ref.pointer); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByDividingBy:withBehavior: + NSDecimalNumber decimalNumberByDividingBy_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberByDividingBy_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByRaisingToPower: + NSDecimalNumber decimalNumberByRaisingToPower_(int power) { + final _ret = _objc_msgSend_ehxl2g( + this.ref.pointer, _sel_decimalNumberByRaisingToPower_, power); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByRaisingToPower:withBehavior: + NSDecimalNumber decimalNumberByRaisingToPower_withBehavior_( + int power, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_m23d4r( + this.ref.pointer, + _sel_decimalNumberByRaisingToPower_withBehavior_, + power, + behavior?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByMultiplyingByPowerOf10: + NSDecimalNumber decimalNumberByMultiplyingByPowerOf10_(int power) { + final _ret = _objc_msgSend_15di41h( + this.ref.pointer, _sel_decimalNumberByMultiplyingByPowerOf10_, power); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByMultiplyingByPowerOf10:withBehavior: + NSDecimalNumber decimalNumberByMultiplyingByPowerOf10_withBehavior_( + int power, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_1y5v0cu( + this.ref.pointer, + _sel_decimalNumberByMultiplyingByPowerOf10_withBehavior_, + power, + behavior?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// decimalNumberByRoundingAccordingToBehavior: + NSDecimalNumber decimalNumberByRoundingAccordingToBehavior_( + objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, + _sel_decimalNumberByRoundingAccordingToBehavior_, + behavior?.ref.pointer ?? ffi.nullptr); + return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// compare: + objc.NSComparisonResult compare_(objc.NSNumber decimalNumber) { + final _ret = _objc_msgSend_1ile2ev( + this.ref.pointer, _sel_compare_, decimalNumber.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// defaultBehavior + static objc.ObjCObjectBase getDefaultBehavior() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_defaultBehavior); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// setDefaultBehavior: + static void setDefaultBehavior(objc.ObjCObjectBase value) { + return _objc_msgSend_ukcdfq( + _class_NSDecimalNumber, _sel_setDefaultBehavior_, value.ref.pointer); + } + + /// objCType + ffi.Pointer get objCType { + return _objc_msgSend_1ypnhm3(this.ref.pointer, _sel_objCType); + } + + /// doubleValue + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_doubleValue) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_doubleValue); + } + + /// initWithCoder: + NSDecimalNumber? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } - /// getObjectValue:forString:errorDescription: - bool getObjectValue_forString_errorDescription_( - ffi.Pointer> obj, - objc.NSString string, - ffi.Pointer> error) { - return _objc_msgSend_176( - this.pointer, - _sel_getObjectValue_forString_errorDescription_, - obj, - string.pointer, - error); + /// numberWithChar: + static objc.NSNumber numberWithChar_(int value) { + final _ret = _objc_msgSend_1pfmxrb( + _class_NSDecimalNumber, _sel_numberWithChar_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - /// isPartialStringValid:newEditingString:errorDescription: - bool isPartialStringValid_newEditingString_errorDescription_( - objc.NSString partialString, - ffi.Pointer> newString, - ffi.Pointer> error) { - return _objc_msgSend_177( - this.pointer, - _sel_isPartialStringValid_newEditingString_errorDescription_, - partialString.pointer, - newString, - error); + /// numberWithUnsignedChar: + static objc.NSNumber numberWithUnsignedChar_(int value) { + final _ret = _objc_msgSend_1ar9f5m( + _class_NSDecimalNumber, _sel_numberWithUnsignedChar_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - /// isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription: - bool - isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( - ffi.Pointer> partialStringPtr, - ffi.Pointer<_NSRange> proposedSelRangePtr, - objc.NSString origString, - _NSRange origSelRange, - ffi.Pointer> error) { - return _objc_msgSend_178( - this.pointer, - _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, - partialStringPtr, - proposedSelRangePtr, - origString.pointer, - origSelRange, - error); + /// numberWithShort: + static objc.NSNumber numberWithShort_(int value) { + final _ret = _objc_msgSend_15di41h( + _class_NSDecimalNumber, _sel_numberWithShort_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedShort: + static objc.NSNumber numberWithUnsignedShort_(int value) { + final _ret = _objc_msgSend_122gbai( + _class_NSDecimalNumber, _sel_numberWithUnsignedShort_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithInt: + static objc.NSNumber numberWithInt_(int value) { + final _ret = _objc_msgSend_105o5we( + _class_NSDecimalNumber, _sel_numberWithInt_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedInt: + static objc.NSNumber numberWithUnsignedInt_(int value) { + final _ret = _objc_msgSend_pxgym4( + _class_NSDecimalNumber, _sel_numberWithUnsignedInt_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithLong: + static objc.NSNumber numberWithLong_(int value) { + final _ret = _objc_msgSend_crtxa9( + _class_NSDecimalNumber, _sel_numberWithLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedLong: + static objc.NSNumber numberWithUnsignedLong_(int value) { + final _ret = _objc_msgSend_ehxl2g( + _class_NSDecimalNumber, _sel_numberWithUnsignedLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithLongLong: + static objc.NSNumber numberWithLongLong_(int value) { + final _ret = _objc_msgSend_yjzv9z( + _class_NSDecimalNumber, _sel_numberWithLongLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedLongLong: + static objc.NSNumber numberWithUnsignedLongLong_(int value) { + final _ret = _objc_msgSend_ybbscc( + _class_NSDecimalNumber, _sel_numberWithUnsignedLongLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithFloat: + static objc.NSNumber numberWithFloat_(double value) { + final _ret = _objc_msgSend_1pmj399( + _class_NSDecimalNumber, _sel_numberWithFloat_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithDouble: + static objc.NSNumber numberWithDouble_(double value) { + final _ret = _objc_msgSend_m7jc8y( + _class_NSDecimalNumber, _sel_numberWithDouble_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithBool: + static objc.NSNumber numberWithBool_(bool value) { + final _ret = _objc_msgSend_1upz917( + _class_NSDecimalNumber, _sel_numberWithBool_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithInteger: + static objc.NSNumber numberWithInteger_(int value) { + final _ret = _objc_msgSend_crtxa9( + _class_NSDecimalNumber, _sel_numberWithInteger_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedInteger: + static objc.NSNumber numberWithUnsignedInteger_(int value) { + final _ret = _objc_msgSend_ehxl2g( + _class_NSDecimalNumber, _sel_numberWithUnsignedInteger_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithBytes:objCType: + NSDecimalNumber initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_1sdw29g(this.ref.retainAndReturnPointer(), + _sel_initWithBytes_objCType_, value, type); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); + } + + /// valueWithBytes:objCType: + static objc.NSValue valueWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_1sdw29g( + _class_NSDecimalNumber, _sel_valueWithBytes_objCType_, value, type); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// value:withObjCType: + static objc.NSValue value_withObjCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_1sdw29g( + _class_NSDecimalNumber, _sel_value_withObjCType_, value, type); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// valueWithNonretainedObject: + static objc.NSValue valueWithNonretainedObject_( + objc.ObjCObjectBase? anObject) { + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, + _sel_valueWithNonretainedObject_, anObject?.ref.pointer ?? ffi.nullptr); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// valueWithPointer: + static objc.NSValue valueWithPointer_(ffi.Pointer pointer) { + final _ret = _objc_msgSend_1ph8ubj( + _class_NSDecimalNumber, _sel_valueWithPointer_, pointer); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// valueWithRange: + static objc.NSValue valueWithRange_(objc.NSRange range) { + final _ret = _objc_msgSend_176f8tz( + _class_NSDecimalNumber, _sel_valueWithRange_, range); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// valueWithPoint: + static objc.NSValue valueWithPoint_(CGPoint point) { + final _ret = _objc_msgSend_1xj0srq( + _class_NSDecimalNumber, _sel_valueWithPoint_, point); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// valueWithSize: + static objc.NSValue valueWithSize_(CGSize size) { + final _ret = + _objc_msgSend_fnn627(_class_NSDecimalNumber, _sel_valueWithSize_, size); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// valueWithRect: + static objc.NSValue valueWithRect_(CGRect rect) { + final _ret = _objc_msgSend_14yq09w( + _class_NSDecimalNumber, _sel_valueWithRect_, rect); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// valueWithEdgeInsets: + static objc.NSValue valueWithEdgeInsets_(NSEdgeInsets insets) { + final _ret = _objc_msgSend_12s6yn4( + _class_NSDecimalNumber, _sel_valueWithEdgeInsets_, insets); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// init - NSFormatter init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSFormatter.castFromPointer(_ret, retain: true, release: true); + NSDecimalNumber init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// new - static NSFormatter new1() { - final _ret = _objc_msgSend_19(_class_NSFormatter, _sel_new); - return NSFormatter.castFromPointer(_ret, retain: false, release: true); + static NSDecimalNumber new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_new); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSFormatter, _sel_allocWithZone_, zone); - return NSFormatter.castFromPointer(_ret, retain: false, release: true); + static NSDecimalNumber allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDecimalNumber, _sel_allocWithZone_, zone); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSFormatter alloc() { - final _ret = _objc_msgSend_19(_class_NSFormatter, _sel_alloc); - return NSFormatter.castFromPointer(_ret, retain: false, release: true); + static NSDecimalNumber alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_alloc); + return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -7974,170 +9663,556 @@ class NSFormatter extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSFormatter, + _objc_msgSend_cqxsqq( + _class_NSDecimalNumber, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSDecimalNumber, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSFormatter, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSDecimalNumber, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSFormatter, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSDecimalNumber, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSFormatter, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSFormatter, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSDecimalNumber, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSFormatter, + _objc_msgSend_1tjlcwl( + _class_NSDecimalNumber, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSFormatter, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSDecimalNumber, _sel_supportsSecureCoding); + } } -late final _class_NSFormatter = objc.getClass("NSFormatter"); -late final _sel_stringForObjectValue_ = - objc.registerName("stringForObjectValue:"); -final _objc_msgSend_173 = objc.msgSendPointer +enum NSCalculationError { + NSCalculationNoError(0), + NSCalculationLossOfPrecision(1), + NSCalculationUnderflow(2), + NSCalculationOverflow(3), + NSCalculationDivideByZero(4); + + final int value; + const NSCalculationError(this.value); + + static NSCalculationError fromValue(int value) => switch (value) { + 0 => NSCalculationNoError, + 1 => NSCalculationLossOfPrecision, + 2 => NSCalculationUnderflow, + 3 => NSCalculationOverflow, + 4 => NSCalculationDivideByZero, + _ => + throw ArgumentError("Unknown value for NSCalculationError: $value"), + }; +} + +late final _sel_exceptionDuringOperation_error_leftOperand_rightOperand_ = objc + .registerName("exceptionDuringOperation:error:leftOperand:rightOperand:"); +final _objc_msgSend_bx1eho = 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_attributedStringForObjectValue_withDefaultAttributes_ = - objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); -final _objc_msgSend_174 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + int, ffi.Pointer, ffi.Pointer)>(); -late final _sel_editingStringForObjectValue_ = - objc.registerName("editingStringForObjectValue:"); -final _objc_msgSend_175 = objc.msgSendPointer - .cast< - ffi.NativeFunction< +ffi.Pointer _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_getObjectValue_forString_errorDescription_ = - objc.registerName("getObjectValue:forString:errorDescription:"); -final _objc_msgSend_176 = 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, + int, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer>, + int, ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_isPartialStringValid_newEditingString_errorDescription_ = objc - .registerName("isPartialStringValid:newEditingString:errorDescription:"); -final _objc_msgSend_177 = 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_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_ = + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>`. +abstract final class ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NSDecimalNumber? Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSDecimalNumber, + NSDecimalNumber?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + NSDecimalNumber? Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSDecimalNumber, + NSDecimalNumber?)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>> + ptr) => + objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>( + objc.newPointerBlock(_ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> + fromFunction(NSDecimalNumber? Function(ffi.Pointer, ffi.Pointer, NSCalculationError, NSDecimalNumber, NSDecimalNumber?) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>( + objc.newClosureBlock( + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn(arg0, arg1, NSCalculationError.fromValue(arg2), NSDecimalNumber.castFromPointer(arg3, retain: true, release: true), arg4.address == 0 ? null : NSDecimalNumber.castFromPointer(arg4, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>`. +extension ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_CallExtension + on objc.ObjCBlock< + NSDecimalNumber? Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSDecimalNumber, + NSDecimalNumber?)> { + NSDecimalNumber? call( + ffi.Pointer arg0, + ffi.Pointer arg1, + NSCalculationError arg2, + NSDecimalNumber arg3, + NSDecimalNumber? arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>() + (ref.pointer, arg0, arg1, arg2.value, arg3.ref.pointer, arg4?.ref.pointer ?? ffi.nullptr) + .address == + 0 + ? null + : NSDecimalNumber.castFromPointer(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2, ffi.Pointer arg3, ffi.Pointer arg4)>>().asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1, arg2.value, arg3.ref.pointer, arg4?.ref.pointer ?? ffi.nullptr), retain: true, release: true); +} + +late final _sel_defaultDecimalNumberHandler = + objc.registerName("defaultDecimalNumberHandler"); +late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = objc.registerName( - "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); -final _objc_msgSend_178 = objc.msgSendPointer + "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +final _objc_msgSend_1efxg5u = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>>() + ffi.UnsignedLong, + ffi.Short, + ffi.Bool, + ffi.Bool, + ffi.Bool, + ffi.Bool)>>() .asFunction< - bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>(); + int, + int, + bool, + bool, + bool, + bool)>(); +late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); + +/// NSDecimalNumberHandler +class NSDecimalNumberHandler extends objc.NSObject { + NSDecimalNumberHandler._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDecimalNumberHandler] that points to the same underlying object as [other]. + NSDecimalNumberHandler.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSDecimalNumberHandler] that wraps the given raw object pointer. + NSDecimalNumberHandler.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); + } + + /// defaultDecimalNumberHandler + static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } + + /// initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero: + NSDecimalNumberHandler + initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + NSRoundingMode roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_1efxg5u( + this.ref.retainAndReturnPointer(), + _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode.value, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } + + /// decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero: + static NSDecimalNumberHandler + decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + NSRoundingMode roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_1efxg5u( + _class_NSDecimalNumberHandler, + _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode.value, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } + + /// init + NSDecimalNumberHandler init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } + + /// new + static NSDecimalNumberHandler new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_new); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } + + /// allocWithZone: + static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } + + /// alloc + static NSDecimalNumberHandler alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_alloc); + return NSDecimalNumberHandler.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_cqxsqq( + _class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } + + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSDecimalNumberHandler, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumberHandler, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSDecimalNumberHandler, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSDecimalNumberHandler, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSDecimalNumberHandler self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSDecimalNumberHandler retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSDecimalNumberHandler autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } + + /// roundingMode + NSRoundingMode roundingMode() { + final _ret = _objc_msgSend_1iugf7h(this.ref.pointer, _sel_roundingMode); + return NSRoundingMode.fromValue(_ret); + } + + /// scale + int scale() { + return _objc_msgSend_157j54x(this.ref.pointer, _sel_scale); + } + + /// exceptionDuringOperation:error:leftOperand:rightOperand: + NSDecimalNumber? exceptionDuringOperation_error_leftOperand_rightOperand_( + ffi.Pointer operation, + NSCalculationError error, + NSDecimalNumber leftOperand, + NSDecimalNumber? rightOperand) { + final _ret = _objc_msgSend_bx1eho( + this.ref.pointer, + _sel_exceptionDuringOperation_error_leftOperand_rightOperand_, + operation, + error.value, + leftOperand.ref.pointer, + rightOperand?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSDecimalNumberHandler? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _sel_roundingBehavior = objc.registerName("roundingBehavior"); +late final _sel_setRoundingBehavior_ = + objc.registerName("setRoundingBehavior:"); /// NSNumberFormatter class NSNumberFormatter extends NSFormatter { @@ -8147,7 +10222,7 @@ class NSNumberFormatter extends NSFormatter { /// Constructs a [NSNumberFormatter] that points to the same underlying object as [other]. NSNumberFormatter.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSNumberFormatter] that wraps the given raw object pointer. NSNumberFormatter.castFromPointer(ffi.Pointer other, @@ -8156,41 +10231,42 @@ class NSNumberFormatter extends NSFormatter { /// Returns whether [obj] is an instance of [NSNumberFormatter]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); } /// formattingContext NSFormattingContext get formattingContext { - final _ret = _objc_msgSend_99(this.pointer, _sel_formattingContext); + final _ret = + _objc_msgSend_10wicfq(this.ref.pointer, _sel_formattingContext); return NSFormattingContext.fromValue(_ret); } /// setFormattingContext: set formattingContext(NSFormattingContext value) { - return _objc_msgSend_100( - this.pointer, _sel_setFormattingContext_, value.value); + return _objc_msgSend_1gtwv7x( + this.ref.pointer, _sel_setFormattingContext_, value.value); } /// getObjectValue:forString:range:error: bool getObjectValue_forString_range_error_( ffi.Pointer> obj, objc.NSString string, - ffi.Pointer<_NSRange> rangep, + ffi.Pointer rangep, ffi.Pointer> error) { - return _objc_msgSend_101( - this.pointer, + return _objc_msgSend_bl9kx( + this.ref.pointer, _sel_getObjectValue_forString_range_error_, obj, - string.pointer, + string.ref.pointer, rangep, error); } /// stringFromNumber: objc.NSString? stringFromNumber_(objc.NSNumber number) { - final _ret = - _objc_msgSend_179(this.pointer, _sel_stringFromNumber_, number.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_stringFromNumber_, number.ref.pointer); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -8198,8 +10274,8 @@ class NSNumberFormatter extends NSFormatter { /// numberFromString: objc.NSNumber? numberFromString_(objc.NSString string) { - final _ret = - _objc_msgSend_180(this.pointer, _sel_numberFromString_, string.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_numberFromString_, string.ref.pointer); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -8208,85 +10284,91 @@ class NSNumberFormatter extends NSFormatter { /// localizedStringFromNumber:numberStyle: static objc.NSString localizedStringFromNumber_numberStyle_( objc.NSNumber num, NSNumberFormatterStyle nstyle) { - final _ret = _objc_msgSend_181(_class_NSNumberFormatter, - _sel_localizedStringFromNumber_numberStyle_, num.pointer, nstyle.value); + final _ret = _objc_msgSend_1dsaaq7( + _class_NSNumberFormatter, + _sel_localizedStringFromNumber_numberStyle_, + num.ref.pointer, + nstyle.value); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// defaultFormatterBehavior static NSNumberFormatterBehavior defaultFormatterBehavior() { - final _ret = _objc_msgSend_182( + final _ret = _objc_msgSend_1nvfxwt( _class_NSNumberFormatter, _sel_defaultFormatterBehavior); return NSNumberFormatterBehavior.fromValue(_ret); } /// setDefaultFormatterBehavior: static void setDefaultFormatterBehavior_(NSNumberFormatterBehavior behavior) { - _objc_msgSend_183(_class_NSNumberFormatter, + _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior.value); } /// numberStyle NSNumberFormatterStyle get numberStyle { - final _ret = _objc_msgSend_184(this.pointer, _sel_numberStyle); + final _ret = _objc_msgSend_1we0qxe(this.ref.pointer, _sel_numberStyle); return NSNumberFormatterStyle.fromValue(_ret); } /// setNumberStyle: set numberStyle(NSNumberFormatterStyle value) { - return _objc_msgSend_185(this.pointer, _sel_setNumberStyle_, value.value); + return _objc_msgSend_qp19lh( + this.ref.pointer, _sel_setNumberStyle_, value.value); } /// locale objc.NSLocale get locale { - final _ret = _objc_msgSend_111(this.pointer, _sel_locale); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_locale); return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } /// setLocale: set locale(objc.NSLocale value) { - return _objc_msgSend_112(this.pointer, _sel_setLocale_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value.ref.pointer); } /// generatesDecimalNumbers bool get generatesDecimalNumbers { - return _objc_msgSend_13(this.pointer, _sel_generatesDecimalNumbers); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_generatesDecimalNumbers); } /// setGeneratesDecimalNumbers: set generatesDecimalNumbers(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setGeneratesDecimalNumbers_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setGeneratesDecimalNumbers_, value); } /// formatterBehavior NSNumberFormatterBehavior get formatterBehavior { - final _ret = _objc_msgSend_182(this.pointer, _sel_formatterBehavior); + final _ret = + _objc_msgSend_1nvfxwt(this.ref.pointer, _sel_formatterBehavior); return NSNumberFormatterBehavior.fromValue(_ret); } /// setFormatterBehavior: set formatterBehavior(NSNumberFormatterBehavior value) { - return _objc_msgSend_186( - this.pointer, _sel_setFormatterBehavior_, value.value); + return _objc_msgSend_1p18hg0( + this.ref.pointer, _sel_setFormatterBehavior_, value.value); } /// negativeFormat objc.NSString get negativeFormat { - final _ret = _objc_msgSend_11(this.pointer, _sel_negativeFormat); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_negativeFormat); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNegativeFormat: set negativeFormat(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setNegativeFormat_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativeFormat_, value.ref.pointer); } /// textAttributesForNegativeValues objc.NSDictionary? get textAttributesForNegativeValues { - final _ret = - _objc_msgSend_82(this.pointer, _sel_textAttributesForNegativeValues); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForNegativeValues); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -8294,28 +10376,28 @@ class NSNumberFormatter extends NSFormatter { /// setTextAttributesForNegativeValues: set textAttributesForNegativeValues(objc.NSDictionary? value) { - return _objc_msgSend_187( - this.pointer, + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTextAttributesForNegativeValues_, - value?.pointer ?? ffi.nullptr); + value?.ref.pointer ?? ffi.nullptr); } /// positiveFormat objc.NSString get positiveFormat { - final _ret = _objc_msgSend_11(this.pointer, _sel_positiveFormat); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_positiveFormat); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPositiveFormat: set positiveFormat(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setPositiveFormat_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositiveFormat_, value.ref.pointer); } /// textAttributesForPositiveValues objc.NSDictionary? get textAttributesForPositiveValues { - final _ret = - _objc_msgSend_82(this.pointer, _sel_textAttributesForPositiveValues); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForPositiveValues); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -8323,83 +10405,87 @@ class NSNumberFormatter extends NSFormatter { /// setTextAttributesForPositiveValues: set textAttributesForPositiveValues(objc.NSDictionary? value) { - return _objc_msgSend_187( - this.pointer, + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTextAttributesForPositiveValues_, - value?.pointer ?? ffi.nullptr); + value?.ref.pointer ?? ffi.nullptr); } /// allowsFloats bool get allowsFloats { - return _objc_msgSend_13(this.pointer, _sel_allowsFloats); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsFloats); } /// setAllowsFloats: set allowsFloats(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setAllowsFloats_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsFloats_, value); } /// decimalSeparator objc.NSString get decimalSeparator { - final _ret = _objc_msgSend_11(this.pointer, _sel_decimalSeparator); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_decimalSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setDecimalSeparator: set decimalSeparator(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setDecimalSeparator_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDecimalSeparator_, value.ref.pointer); } /// alwaysShowsDecimalSeparator bool get alwaysShowsDecimalSeparator { - return _objc_msgSend_13(this.pointer, _sel_alwaysShowsDecimalSeparator); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_alwaysShowsDecimalSeparator); } /// setAlwaysShowsDecimalSeparator: set alwaysShowsDecimalSeparator(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); } /// currencyDecimalSeparator objc.NSString get currencyDecimalSeparator { - final _ret = _objc_msgSend_11(this.pointer, _sel_currencyDecimalSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencyDecimalSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCurrencyDecimalSeparator: set currencyDecimalSeparator(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setCurrencyDecimalSeparator_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrencyDecimalSeparator_, value.ref.pointer); } /// usesGroupingSeparator bool get usesGroupingSeparator { - return _objc_msgSend_13(this.pointer, _sel_usesGroupingSeparator); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_usesGroupingSeparator); } /// setUsesGroupingSeparator: set usesGroupingSeparator(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setUsesGroupingSeparator_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesGroupingSeparator_, value); } /// groupingSeparator objc.NSString get groupingSeparator { - final _ret = _objc_msgSend_11(this.pointer, _sel_groupingSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_groupingSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setGroupingSeparator: set groupingSeparator(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setGroupingSeparator_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setGroupingSeparator_, value.ref.pointer); } /// zeroSymbol objc.NSString? get zeroSymbol { - final _ret = _objc_msgSend_20(this.pointer, _sel_zeroSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_zeroSymbol); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -8407,13 +10493,14 @@ class NSNumberFormatter extends NSFormatter { /// setZeroSymbol: set zeroSymbol(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setZeroSymbol_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setZeroSymbol_, + value?.ref.pointer ?? ffi.nullptr); } /// textAttributesForZero objc.NSDictionary? get textAttributesForZero { - final _ret = _objc_msgSend_82(this.pointer, _sel_textAttributesForZero); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForZero); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -8421,24 +10508,26 @@ class NSNumberFormatter extends NSFormatter { /// setTextAttributesForZero: set textAttributesForZero(objc.NSDictionary? value) { - return _objc_msgSend_187(this.pointer, _sel_setTextAttributesForZero_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setTextAttributesForZero_, value?.ref.pointer ?? ffi.nullptr); } /// nilSymbol objc.NSString get nilSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_nilSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_nilSymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNilSymbol: set nilSymbol(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setNilSymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNilSymbol_, value.ref.pointer); } /// textAttributesForNil objc.NSDictionary? get textAttributesForNil { - final _ret = _objc_msgSend_82(this.pointer, _sel_textAttributesForNil); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForNil); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -8446,26 +10535,26 @@ class NSNumberFormatter extends NSFormatter { /// setTextAttributesForNil: set textAttributesForNil(objc.NSDictionary? value) { - return _objc_msgSend_187(this.pointer, _sel_setTextAttributesForNil_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForNil_, + value?.ref.pointer ?? ffi.nullptr); } /// notANumberSymbol objc.NSString get notANumberSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_notANumberSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_notANumberSymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNotANumberSymbol: set notANumberSymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setNotANumberSymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNotANumberSymbol_, value.ref.pointer); } /// textAttributesForNotANumber objc.NSDictionary? get textAttributesForNotANumber { - final _ret = - _objc_msgSend_82(this.pointer, _sel_textAttributesForNotANumber); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForNotANumber); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -8473,26 +10562,29 @@ class NSNumberFormatter extends NSFormatter { /// setTextAttributesForNotANumber: set textAttributesForNotANumber(objc.NSDictionary? value) { - return _objc_msgSend_187(this.pointer, _sel_setTextAttributesForNotANumber_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setTextAttributesForNotANumber_, + value?.ref.pointer ?? ffi.nullptr); } /// positiveInfinitySymbol objc.NSString get positiveInfinitySymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_positiveInfinitySymbol); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_positiveInfinitySymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPositiveInfinitySymbol: set positiveInfinitySymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setPositiveInfinitySymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositiveInfinitySymbol_, value.ref.pointer); } /// textAttributesForPositiveInfinity objc.NSDictionary? get textAttributesForPositiveInfinity { - final _ret = - _objc_msgSend_82(this.pointer, _sel_textAttributesForPositiveInfinity); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForPositiveInfinity); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -8500,28 +10592,29 @@ class NSNumberFormatter extends NSFormatter { /// setTextAttributesForPositiveInfinity: set textAttributesForPositiveInfinity(objc.NSDictionary? value) { - return _objc_msgSend_187( - this.pointer, + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTextAttributesForPositiveInfinity_, - value?.pointer ?? ffi.nullptr); + value?.ref.pointer ?? ffi.nullptr); } /// negativeInfinitySymbol objc.NSString get negativeInfinitySymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_negativeInfinitySymbol); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_negativeInfinitySymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNegativeInfinitySymbol: set negativeInfinitySymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setNegativeInfinitySymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativeInfinitySymbol_, value.ref.pointer); } /// textAttributesForNegativeInfinity objc.NSDictionary? get textAttributesForNegativeInfinity { - final _ret = - _objc_msgSend_82(this.pointer, _sel_textAttributesForNegativeInfinity); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForNegativeInfinity); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -8529,178 +10622,182 @@ class NSNumberFormatter extends NSFormatter { /// setTextAttributesForNegativeInfinity: set textAttributesForNegativeInfinity(objc.NSDictionary? value) { - return _objc_msgSend_187( - this.pointer, + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTextAttributesForNegativeInfinity_, - value?.pointer ?? ffi.nullptr); + value?.ref.pointer ?? ffi.nullptr); } /// positivePrefix objc.NSString get positivePrefix { - final _ret = _objc_msgSend_11(this.pointer, _sel_positivePrefix); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_positivePrefix); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPositivePrefix: set positivePrefix(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setPositivePrefix_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositivePrefix_, value.ref.pointer); } /// positiveSuffix objc.NSString get positiveSuffix { - final _ret = _objc_msgSend_11(this.pointer, _sel_positiveSuffix); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_positiveSuffix); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPositiveSuffix: set positiveSuffix(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setPositiveSuffix_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositiveSuffix_, value.ref.pointer); } /// negativePrefix objc.NSString get negativePrefix { - final _ret = _objc_msgSend_11(this.pointer, _sel_negativePrefix); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_negativePrefix); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNegativePrefix: set negativePrefix(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setNegativePrefix_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativePrefix_, value.ref.pointer); } /// negativeSuffix objc.NSString get negativeSuffix { - final _ret = _objc_msgSend_11(this.pointer, _sel_negativeSuffix); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_negativeSuffix); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNegativeSuffix: set negativeSuffix(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setNegativeSuffix_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativeSuffix_, value.ref.pointer); } /// currencyCode objc.NSString get currencyCode { - final _ret = _objc_msgSend_11(this.pointer, _sel_currencyCode); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencyCode); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCurrencyCode: set currencyCode(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setCurrencyCode_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrencyCode_, value.ref.pointer); } /// currencySymbol objc.NSString get currencySymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_currencySymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencySymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCurrencySymbol: set currencySymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setCurrencySymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrencySymbol_, value.ref.pointer); } /// internationalCurrencySymbol objc.NSString get internationalCurrencySymbol { - final _ret = - _objc_msgSend_11(this.pointer, _sel_internationalCurrencySymbol); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_internationalCurrencySymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setInternationalCurrencySymbol: set internationalCurrencySymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setInternationalCurrencySymbol_, value.pointer); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setInternationalCurrencySymbol_, value.ref.pointer); } /// percentSymbol objc.NSString get percentSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_percentSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_percentSymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPercentSymbol: set percentSymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setPercentSymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPercentSymbol_, value.ref.pointer); } /// perMillSymbol objc.NSString get perMillSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_perMillSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_perMillSymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPerMillSymbol: set perMillSymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setPerMillSymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPerMillSymbol_, value.ref.pointer); } /// minusSign objc.NSString get minusSign { - final _ret = _objc_msgSend_11(this.pointer, _sel_minusSign); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_minusSign); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setMinusSign: set minusSign(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setMinusSign_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMinusSign_, value.ref.pointer); } /// plusSign objc.NSString get plusSign { - final _ret = _objc_msgSend_11(this.pointer, _sel_plusSign); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_plusSign); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPlusSign: set plusSign(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setPlusSign_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPlusSign_, value.ref.pointer); } /// exponentSymbol objc.NSString get exponentSymbol { - final _ret = _objc_msgSend_11(this.pointer, _sel_exponentSymbol); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_exponentSymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setExponentSymbol: set exponentSymbol(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setExponentSymbol_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setExponentSymbol_, value.ref.pointer); } /// groupingSize int get groupingSize { - return _objc_msgSend_57(this.pointer, _sel_groupingSize); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_groupingSize); } /// setGroupingSize: set groupingSize(int value) { - return _objc_msgSend_133(this.pointer, _sel_setGroupingSize_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setGroupingSize_, value); } /// secondaryGroupingSize int get secondaryGroupingSize { - return _objc_msgSend_57(this.pointer, _sel_secondaryGroupingSize); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_secondaryGroupingSize); } /// setSecondaryGroupingSize: set secondaryGroupingSize(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setSecondaryGroupingSize_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setSecondaryGroupingSize_, value); } /// multiplier objc.NSNumber? get multiplier { - final _ret = _objc_msgSend_22(this.pointer, _sel_multiplier); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_multiplier); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -8708,114 +10805,116 @@ class NSNumberFormatter extends NSFormatter { /// setMultiplier: set multiplier(objc.NSNumber? value) { - return _objc_msgSend_23( - this.pointer, _sel_setMultiplier_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMultiplier_, + value?.ref.pointer ?? ffi.nullptr); } /// formatWidth int get formatWidth { - return _objc_msgSend_57(this.pointer, _sel_formatWidth); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_formatWidth); } /// setFormatWidth: set formatWidth(int value) { - return _objc_msgSend_133(this.pointer, _sel_setFormatWidth_, value); + return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setFormatWidth_, value); } /// paddingCharacter objc.NSString get paddingCharacter { - final _ret = _objc_msgSend_11(this.pointer, _sel_paddingCharacter); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_paddingCharacter); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPaddingCharacter: set paddingCharacter(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setPaddingCharacter_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPaddingCharacter_, value.ref.pointer); } /// paddingPosition NSNumberFormatterPadPosition get paddingPosition { - final _ret = _objc_msgSend_188(this.pointer, _sel_paddingPosition); + final _ret = _objc_msgSend_1s69i33(this.ref.pointer, _sel_paddingPosition); return NSNumberFormatterPadPosition.fromValue(_ret); } /// setPaddingPosition: set paddingPosition(NSNumberFormatterPadPosition value) { - return _objc_msgSend_189( - this.pointer, _sel_setPaddingPosition_, value.value); + return _objc_msgSend_gz8txq( + this.ref.pointer, _sel_setPaddingPosition_, value.value); } /// roundingMode NSNumberFormatterRoundingMode get roundingMode { - final _ret = _objc_msgSend_190(this.pointer, _sel_roundingMode); + final _ret = _objc_msgSend_38d07q(this.ref.pointer, _sel_roundingMode); return NSNumberFormatterRoundingMode.fromValue(_ret); } /// setRoundingMode: set roundingMode(NSNumberFormatterRoundingMode value) { - return _objc_msgSend_191(this.pointer, _sel_setRoundingMode_, value.value); + return _objc_msgSend_5krs29( + this.ref.pointer, _sel_setRoundingMode_, value.value); } /// roundingIncrement objc.NSNumber get roundingIncrement { - final _ret = _objc_msgSend_192(this.pointer, _sel_roundingIncrement); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_roundingIncrement); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setRoundingIncrement: set roundingIncrement(objc.NSNumber value) { - return _objc_msgSend_193( - this.pointer, _sel_setRoundingIncrement_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setRoundingIncrement_, value.ref.pointer); } /// minimumIntegerDigits int get minimumIntegerDigits { - return _objc_msgSend_57(this.pointer, _sel_minimumIntegerDigits); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_minimumIntegerDigits); } /// setMinimumIntegerDigits: set minimumIntegerDigits(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setMinimumIntegerDigits_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumIntegerDigits_, value); } /// maximumIntegerDigits int get maximumIntegerDigits { - return _objc_msgSend_57(this.pointer, _sel_maximumIntegerDigits); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_maximumIntegerDigits); } /// setMaximumIntegerDigits: set maximumIntegerDigits(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setMaximumIntegerDigits_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMaximumIntegerDigits_, value); } /// minimumFractionDigits int get minimumFractionDigits { - return _objc_msgSend_57(this.pointer, _sel_minimumFractionDigits); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_minimumFractionDigits); } /// setMinimumFractionDigits: set minimumFractionDigits(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setMinimumFractionDigits_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumFractionDigits_, value); } /// maximumFractionDigits int get maximumFractionDigits { - return _objc_msgSend_57(this.pointer, _sel_maximumFractionDigits); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_maximumFractionDigits); } /// setMaximumFractionDigits: set maximumFractionDigits(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setMaximumFractionDigits_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMaximumFractionDigits_, value); } /// minimum objc.NSNumber? get minimum { - final _ret = _objc_msgSend_22(this.pointer, _sel_minimum); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_minimum); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -8823,13 +10922,13 @@ class NSNumberFormatter extends NSFormatter { /// setMinimum: set minimum(objc.NSNumber? value) { - return _objc_msgSend_23( - this.pointer, _sel_setMinimum_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMinimum_, value?.ref.pointer ?? ffi.nullptr); } /// maximum objc.NSNumber? get maximum { - final _ret = _objc_msgSend_22(this.pointer, _sel_maximum); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_maximum); return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -8837,198 +10936,208 @@ class NSNumberFormatter extends NSFormatter { /// setMaximum: set maximum(objc.NSNumber? value) { - return _objc_msgSend_23( - this.pointer, _sel_setMaximum_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMaximum_, value?.ref.pointer ?? ffi.nullptr); } /// currencyGroupingSeparator objc.NSString get currencyGroupingSeparator { - final _ret = _objc_msgSend_11(this.pointer, _sel_currencyGroupingSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencyGroupingSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCurrencyGroupingSeparator: set currencyGroupingSeparator(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setCurrencyGroupingSeparator_, value.pointer); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setCurrencyGroupingSeparator_, value.ref.pointer); } /// isLenient bool get lenient { - return _objc_msgSend_13(this.pointer, _sel_isLenient); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLenient); } /// setLenient: set lenient(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setLenient_, value); + return _objc_msgSend_117qins(this.ref.pointer, _sel_setLenient_, value); } /// usesSignificantDigits bool get usesSignificantDigits { - return _objc_msgSend_13(this.pointer, _sel_usesSignificantDigits); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_usesSignificantDigits); } /// setUsesSignificantDigits: set usesSignificantDigits(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setUsesSignificantDigits_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesSignificantDigits_, value); } /// minimumSignificantDigits int get minimumSignificantDigits { - return _objc_msgSend_57(this.pointer, _sel_minimumSignificantDigits); + return _objc_msgSend_eldhrq( + this.ref.pointer, _sel_minimumSignificantDigits); } /// setMinimumSignificantDigits: set minimumSignificantDigits(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setMinimumSignificantDigits_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumSignificantDigits_, value); } /// maximumSignificantDigits int get maximumSignificantDigits { - return _objc_msgSend_57(this.pointer, _sel_maximumSignificantDigits); + return _objc_msgSend_eldhrq( + this.ref.pointer, _sel_maximumSignificantDigits); } /// setMaximumSignificantDigits: set maximumSignificantDigits(int value) { - return _objc_msgSend_133( - this.pointer, _sel_setMaximumSignificantDigits_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMaximumSignificantDigits_, value); } /// isPartialStringValidationEnabled bool get partialStringValidationEnabled { - return _objc_msgSend_13( - this.pointer, _sel_isPartialStringValidationEnabled); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_isPartialStringValidationEnabled); } /// setPartialStringValidationEnabled: set partialStringValidationEnabled(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setPartialStringValidationEnabled_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setPartialStringValidationEnabled_, value); } /// hasThousandSeparators bool get hasThousandSeparators { - return _objc_msgSend_13(this.pointer, _sel_hasThousandSeparators); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_hasThousandSeparators); } /// setHasThousandSeparators: set hasThousandSeparators(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setHasThousandSeparators_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHasThousandSeparators_, value); } /// thousandSeparator objc.NSString get thousandSeparator { - final _ret = _objc_msgSend_11(this.pointer, _sel_thousandSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_thousandSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setThousandSeparator: set thousandSeparator(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setThousandSeparator_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setThousandSeparator_, value.ref.pointer); } /// localizesFormat bool get localizesFormat { - return _objc_msgSend_13(this.pointer, _sel_localizesFormat); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_localizesFormat); } /// setLocalizesFormat: set localizesFormat(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setLocalizesFormat_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setLocalizesFormat_, value); } /// format objc.NSString get format { - final _ret = _objc_msgSend_11(this.pointer, _sel_format); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_format); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setFormat: set format(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setFormat_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFormat_, value.ref.pointer); } /// attributedStringForZero NSAttributedString get attributedStringForZero { - final _ret = _objc_msgSend_80(this.pointer, _sel_attributedStringForZero); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringForZero); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// setAttributedStringForZero: set attributedStringForZero(NSAttributedString value) { - return _objc_msgSend_194( - this.pointer, _sel_setAttributedStringForZero_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAttributedStringForZero_, value.ref.pointer); } /// attributedStringForNil NSAttributedString get attributedStringForNil { - final _ret = _objc_msgSend_80(this.pointer, _sel_attributedStringForNil); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringForNil); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// setAttributedStringForNil: set attributedStringForNil(NSAttributedString value) { - return _objc_msgSend_194( - this.pointer, _sel_setAttributedStringForNil_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAttributedStringForNil_, value.ref.pointer); } /// attributedStringForNotANumber NSAttributedString get attributedStringForNotANumber { - final _ret = - _objc_msgSend_80(this.pointer, _sel_attributedStringForNotANumber); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_attributedStringForNotANumber); return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// setAttributedStringForNotANumber: set attributedStringForNotANumber(NSAttributedString value) { - return _objc_msgSend_194( - this.pointer, _sel_setAttributedStringForNotANumber_, value.pointer); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setAttributedStringForNotANumber_, value.ref.pointer); } /// roundingBehavior NSDecimalNumberHandler get roundingBehavior { - final _ret = _objc_msgSend_195(this.pointer, _sel_roundingBehavior); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_roundingBehavior); return NSDecimalNumberHandler.castFromPointer(_ret, retain: true, release: true); } /// setRoundingBehavior: set roundingBehavior(NSDecimalNumberHandler value) { - return _objc_msgSend_197( - this.pointer, _sel_setRoundingBehavior_, value.pointer); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setRoundingBehavior_, value.ref.pointer); } /// init NSNumberFormatter init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } /// new static NSNumberFormatter new1() { - final _ret = _objc_msgSend_19(_class_NSNumberFormatter, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_class_NSNumberFormatter, _sel_new); return NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSNumberFormatter, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSNumberFormatter, _sel_allocWithZone_, zone); return NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSNumberFormatter alloc() { - final _ret = _objc_msgSend_19(_class_NSNumberFormatter, _sel_alloc); + final _ret = _objc_msgSend_1unuoxw(_class_NSNumberFormatter, _sel_alloc); return NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); } @@ -9038,803 +11147,281 @@ class NSNumberFormatter extends NSFormatter { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSNumberFormatter, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSNumberFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSNumberFormatter, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSNumberFormatter, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSNumberFormatter, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSNumberFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSNumberFormatter, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSNumberFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSNumberFormatter, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( + final _ret = _objc_msgSend_1unuoxw( _class_NSNumberFormatter, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} -late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); -late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); -final _objc_msgSend_179 = 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_numberFromString_ = objc.registerName("numberFromString:"); -final _objc_msgSend_180 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + /// self + NSNumberFormatter self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); + } -enum NSNumberFormatterStyle { - NSNumberFormatterNoStyle(0), - NSNumberFormatterDecimalStyle(1), - NSNumberFormatterCurrencyStyle(2), - NSNumberFormatterPercentStyle(3), - NSNumberFormatterScientificStyle(4), - NSNumberFormatterSpellOutStyle(5), - NSNumberFormatterOrdinalStyle(6), - NSNumberFormatterCurrencyISOCodeStyle(8), - NSNumberFormatterCurrencyPluralStyle(9), - NSNumberFormatterCurrencyAccountingStyle(10); + /// retain + NSNumberFormatter retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); + } - final int value; - const NSNumberFormatterStyle(this.value); + /// autorelease + NSNumberFormatter autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); + } - static NSNumberFormatterStyle fromValue(int value) => switch (value) { - 0 => NSNumberFormatterNoStyle, - 1 => NSNumberFormatterDecimalStyle, - 2 => NSNumberFormatterCurrencyStyle, - 3 => NSNumberFormatterPercentStyle, - 4 => NSNumberFormatterScientificStyle, - 5 => NSNumberFormatterSpellOutStyle, - 6 => NSNumberFormatterOrdinalStyle, - 8 => NSNumberFormatterCurrencyISOCodeStyle, - 9 => NSNumberFormatterCurrencyPluralStyle, - 10 => NSNumberFormatterCurrencyAccountingStyle, - _ => throw ArgumentError( - "Unknown value for NSNumberFormatterStyle: $value"), - }; + /// initWithCoder: + NSNumberFormatter? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); + } } -late final _sel_localizedStringFromNumber_numberStyle_ = - objc.registerName("localizedStringFromNumber:numberStyle:"); -final _objc_msgSend_181 = 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 NSNumberFormatterBehavior { - NSNumberFormatterBehaviorDefault(0), - NSNumberFormatterBehavior10_0(1000), - NSNumberFormatterBehavior10_4(1040); +enum NSLocaleLanguageDirection { + NSLocaleLanguageDirectionUnknown(0), + NSLocaleLanguageDirectionLeftToRight(1), + NSLocaleLanguageDirectionRightToLeft(2), + NSLocaleLanguageDirectionTopToBottom(3), + NSLocaleLanguageDirectionBottomToTop(4); final int value; - const NSNumberFormatterBehavior(this.value); + const NSLocaleLanguageDirection(this.value); - static NSNumberFormatterBehavior fromValue(int value) => switch (value) { - 0 => NSNumberFormatterBehaviorDefault, - 1000 => NSNumberFormatterBehavior10_0, - 1040 => NSNumberFormatterBehavior10_4, + static NSLocaleLanguageDirection fromValue(int value) => switch (value) { + 0 => NSLocaleLanguageDirectionUnknown, + 1 => NSLocaleLanguageDirectionLeftToRight, + 2 => NSLocaleLanguageDirectionRightToLeft, + 3 => NSLocaleLanguageDirectionTopToBottom, + 4 => NSLocaleLanguageDirectionBottomToTop, _ => throw ArgumentError( - "Unknown value for NSNumberFormatterBehavior: $value"), + "Unknown value for NSLocaleLanguageDirection: $value"), }; } -final _objc_msgSend_182 = objc.msgSendPointer +final class NSDecimal extends ffi.Opaque {} + +late final _class_NSScanner = objc.getClass("NSScanner"); +late final _sel_scanLocation = objc.registerName("scanLocation"); +late final _sel_setScanLocation_ = objc.registerName("setScanLocation:"); +late final _sel_charactersToBeSkipped = + objc.registerName("charactersToBeSkipped"); +late final _sel_setCharactersToBeSkipped_ = + objc.registerName("setCharactersToBeSkipped:"); +late final _sel_caseSensitive = objc.registerName("caseSensitive"); +late final _sel_setCaseSensitive_ = objc.registerName("setCaseSensitive:"); +late final _sel_scanInt_ = objc.registerName("scanInt:"); +final _objc_msgSend_tke0i3 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_183 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanInteger_ = objc.registerName("scanInteger:"); +final _objc_msgSend_1m3j5r2 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_numberStyle = objc.registerName("numberStyle"); -final _objc_msgSend_184 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanLongLong_ = objc.registerName("scanLongLong:"); +final _objc_msgSend_litvm = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); -final _objc_msgSend_185 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanUnsignedLongLong_ = + objc.registerName("scanUnsignedLongLong:"); +final _objc_msgSend_1uz3cj3 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_generatesDecimalNumbers = - objc.registerName("generatesDecimalNumbers"); -late final _sel_setGeneratesDecimalNumbers_ = - objc.registerName("setGeneratesDecimalNumbers:"); -final _objc_msgSend_186 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_scanFloat_ = objc.registerName("scanFloat:"); +final _objc_msgSend_1qkfxp0 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_negativeFormat = objc.registerName("negativeFormat"); -late final _sel_setNegativeFormat_ = objc.registerName("setNegativeFormat:"); -late final _sel_textAttributesForNegativeValues = - objc.registerName("textAttributesForNegativeValues"); -late final _sel_setTextAttributesForNegativeValues_ = - objc.registerName("setTextAttributesForNegativeValues:"); -final _objc_msgSend_187 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanDouble_ = objc.registerName("scanDouble:"); +final _objc_msgSend_2un1vl = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + 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_5fep2j = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_positiveFormat = objc.registerName("positiveFormat"); -late final _sel_setPositiveFormat_ = objc.registerName("setPositiveFormat:"); -late final _sel_textAttributesForPositiveValues = - objc.registerName("textAttributesForPositiveValues"); -late final _sel_setTextAttributesForPositiveValues_ = - objc.registerName("setTextAttributesForPositiveValues:"); -late final _sel_allowsFloats = objc.registerName("allowsFloats"); -late final _sel_setAllowsFloats_ = objc.registerName("setAllowsFloats:"); -late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); -late final _sel_setDecimalSeparator_ = - objc.registerName("setDecimalSeparator:"); -late final _sel_alwaysShowsDecimalSeparator = - objc.registerName("alwaysShowsDecimalSeparator"); -late final _sel_setAlwaysShowsDecimalSeparator_ = - objc.registerName("setAlwaysShowsDecimalSeparator:"); -late final _sel_currencyDecimalSeparator = - objc.registerName("currencyDecimalSeparator"); -late final _sel_setCurrencyDecimalSeparator_ = - objc.registerName("setCurrencyDecimalSeparator:"); -late final _sel_usesGroupingSeparator = - objc.registerName("usesGroupingSeparator"); -late final _sel_setUsesGroupingSeparator_ = - objc.registerName("setUsesGroupingSeparator:"); -late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); -late final _sel_setGroupingSeparator_ = - objc.registerName("setGroupingSeparator:"); -late final _sel_zeroSymbol = objc.registerName("zeroSymbol"); -late final _sel_setZeroSymbol_ = objc.registerName("setZeroSymbol:"); -late final _sel_textAttributesForZero = - objc.registerName("textAttributesForZero"); -late final _sel_setTextAttributesForZero_ = - objc.registerName("setTextAttributesForZero:"); -late final _sel_nilSymbol = objc.registerName("nilSymbol"); -late final _sel_setNilSymbol_ = objc.registerName("setNilSymbol:"); -late final _sel_textAttributesForNil = - objc.registerName("textAttributesForNil"); -late final _sel_setTextAttributesForNil_ = - objc.registerName("setTextAttributesForNil:"); -late final _sel_notANumberSymbol = objc.registerName("notANumberSymbol"); -late final _sel_setNotANumberSymbol_ = - objc.registerName("setNotANumberSymbol:"); -late final _sel_textAttributesForNotANumber = - objc.registerName("textAttributesForNotANumber"); -late final _sel_setTextAttributesForNotANumber_ = - objc.registerName("setTextAttributesForNotANumber:"); -late final _sel_positiveInfinitySymbol = - objc.registerName("positiveInfinitySymbol"); -late final _sel_setPositiveInfinitySymbol_ = - objc.registerName("setPositiveInfinitySymbol:"); -late final _sel_textAttributesForPositiveInfinity = - objc.registerName("textAttributesForPositiveInfinity"); -late final _sel_setTextAttributesForPositiveInfinity_ = - objc.registerName("setTextAttributesForPositiveInfinity:"); -late final _sel_negativeInfinitySymbol = - objc.registerName("negativeInfinitySymbol"); -late final _sel_setNegativeInfinitySymbol_ = - objc.registerName("setNegativeInfinitySymbol:"); -late final _sel_textAttributesForNegativeInfinity = - objc.registerName("textAttributesForNegativeInfinity"); -late final _sel_setTextAttributesForNegativeInfinity_ = - objc.registerName("setTextAttributesForNegativeInfinity:"); -late final _sel_positivePrefix = objc.registerName("positivePrefix"); -late final _sel_setPositivePrefix_ = objc.registerName("setPositivePrefix:"); -late final _sel_positiveSuffix = objc.registerName("positiveSuffix"); -late final _sel_setPositiveSuffix_ = objc.registerName("setPositiveSuffix:"); -late final _sel_negativePrefix = objc.registerName("negativePrefix"); -late final _sel_setNegativePrefix_ = objc.registerName("setNegativePrefix:"); -late final _sel_negativeSuffix = objc.registerName("negativeSuffix"); -late final _sel_setNegativeSuffix_ = objc.registerName("setNegativeSuffix:"); -late final _sel_currencyCode = objc.registerName("currencyCode"); -late final _sel_setCurrencyCode_ = objc.registerName("setCurrencyCode:"); -late final _sel_currencySymbol = objc.registerName("currencySymbol"); -late final _sel_setCurrencySymbol_ = objc.registerName("setCurrencySymbol:"); -late final _sel_internationalCurrencySymbol = - objc.registerName("internationalCurrencySymbol"); -late final _sel_setInternationalCurrencySymbol_ = - objc.registerName("setInternationalCurrencySymbol:"); -late final _sel_percentSymbol = objc.registerName("percentSymbol"); -late final _sel_setPercentSymbol_ = objc.registerName("setPercentSymbol:"); -late final _sel_perMillSymbol = objc.registerName("perMillSymbol"); -late final _sel_setPerMillSymbol_ = objc.registerName("setPerMillSymbol:"); -late final _sel_minusSign = objc.registerName("minusSign"); -late final _sel_setMinusSign_ = objc.registerName("setMinusSign:"); -late final _sel_plusSign = objc.registerName("plusSign"); -late final _sel_setPlusSign_ = objc.registerName("setPlusSign:"); -late final _sel_exponentSymbol = objc.registerName("exponentSymbol"); -late final _sel_setExponentSymbol_ = objc.registerName("setExponentSymbol:"); -late final _sel_groupingSize = objc.registerName("groupingSize"); -late final _sel_setGroupingSize_ = objc.registerName("setGroupingSize:"); -late final _sel_secondaryGroupingSize = - objc.registerName("secondaryGroupingSize"); -late final _sel_setSecondaryGroupingSize_ = - objc.registerName("setSecondaryGroupingSize:"); -late final _sel_multiplier = objc.registerName("multiplier"); -late final _sel_setMultiplier_ = objc.registerName("setMultiplier:"); -late final _sel_formatWidth = objc.registerName("formatWidth"); -late final _sel_setFormatWidth_ = objc.registerName("setFormatWidth:"); -late final _sel_paddingCharacter = objc.registerName("paddingCharacter"); -late final _sel_setPaddingCharacter_ = - objc.registerName("setPaddingCharacter:"); - -enum NSNumberFormatterPadPosition { - NSNumberFormatterPadBeforePrefix(0), - NSNumberFormatterPadAfterPrefix(1), - NSNumberFormatterPadBeforeSuffix(2), - NSNumberFormatterPadAfterSuffix(3); - - final int value; - const NSNumberFormatterPadPosition(this.value); - - static NSNumberFormatterPadPosition fromValue(int value) => switch (value) { - 0 => NSNumberFormatterPadBeforePrefix, - 1 => NSNumberFormatterPadAfterPrefix, - 2 => NSNumberFormatterPadBeforeSuffix, - 3 => NSNumberFormatterPadAfterSuffix, - _ => throw ArgumentError( - "Unknown value for NSNumberFormatterPadPosition: $value"), - }; -} - -late final _sel_paddingPosition = objc.registerName("paddingPosition"); -final _objc_msgSend_188 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); -final _objc_msgSend_189 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -enum NSNumberFormatterRoundingMode { - NSNumberFormatterRoundCeiling(0), - NSNumberFormatterRoundFloor(1), - NSNumberFormatterRoundDown(2), - NSNumberFormatterRoundUp(3), - NSNumberFormatterRoundHalfEven(4), - NSNumberFormatterRoundHalfDown(5), - NSNumberFormatterRoundHalfUp(6); - - final int value; - const NSNumberFormatterRoundingMode(this.value); - - static NSNumberFormatterRoundingMode fromValue(int value) => switch (value) { - 0 => NSNumberFormatterRoundCeiling, - 1 => NSNumberFormatterRoundFloor, - 2 => NSNumberFormatterRoundDown, - 3 => NSNumberFormatterRoundUp, - 4 => NSNumberFormatterRoundHalfEven, - 5 => NSNumberFormatterRoundHalfDown, - 6 => NSNumberFormatterRoundHalfUp, - _ => throw ArgumentError( - "Unknown value for NSNumberFormatterRoundingMode: $value"), - }; -} - -late final _sel_roundingMode = objc.registerName("roundingMode"); -final _objc_msgSend_190 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); -final _objc_msgSend_191 = 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_roundingIncrement = objc.registerName("roundingIncrement"); -final _objc_msgSend_192 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setRoundingIncrement_ = - objc.registerName("setRoundingIncrement:"); -final _objc_msgSend_193 = objc.msgSendPointer + 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_p02k6o = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_minimumIntegerDigits = - objc.registerName("minimumIntegerDigits"); -late final _sel_setMinimumIntegerDigits_ = - objc.registerName("setMinimumIntegerDigits:"); -late final _sel_maximumIntegerDigits = - objc.registerName("maximumIntegerDigits"); -late final _sel_setMaximumIntegerDigits_ = - objc.registerName("setMaximumIntegerDigits:"); -late final _sel_minimumFractionDigits = - objc.registerName("minimumFractionDigits"); -late final _sel_setMinimumFractionDigits_ = - objc.registerName("setMinimumFractionDigits:"); -late final _sel_maximumFractionDigits = - objc.registerName("maximumFractionDigits"); -late final _sel_setMaximumFractionDigits_ = - objc.registerName("setMaximumFractionDigits:"); -late final _sel_minimum = objc.registerName("minimum"); -late final _sel_setMinimum_ = objc.registerName("setMinimum:"); -late final _sel_maximum = objc.registerName("maximum"); -late final _sel_setMaximum_ = objc.registerName("setMaximum:"); -late final _sel_currencyGroupingSeparator = - objc.registerName("currencyGroupingSeparator"); -late final _sel_setCurrencyGroupingSeparator_ = - objc.registerName("setCurrencyGroupingSeparator:"); -late final _sel_usesSignificantDigits = - objc.registerName("usesSignificantDigits"); -late final _sel_setUsesSignificantDigits_ = - objc.registerName("setUsesSignificantDigits:"); -late final _sel_minimumSignificantDigits = - objc.registerName("minimumSignificantDigits"); -late final _sel_setMinimumSignificantDigits_ = - objc.registerName("setMinimumSignificantDigits:"); -late final _sel_maximumSignificantDigits = - objc.registerName("maximumSignificantDigits"); -late final _sel_setMaximumSignificantDigits_ = - objc.registerName("setMaximumSignificantDigits:"); -late final _sel_isPartialStringValidationEnabled = - objc.registerName("isPartialStringValidationEnabled"); -late final _sel_setPartialStringValidationEnabled_ = - objc.registerName("setPartialStringValidationEnabled:"); -late final _sel_hasThousandSeparators = - objc.registerName("hasThousandSeparators"); -late final _sel_setHasThousandSeparators_ = - objc.registerName("setHasThousandSeparators:"); -late final _sel_thousandSeparator = objc.registerName("thousandSeparator"); -late final _sel_setThousandSeparator_ = - objc.registerName("setThousandSeparator:"); -late final _sel_localizesFormat = objc.registerName("localizesFormat"); -late final _sel_setLocalizesFormat_ = objc.registerName("setLocalizesFormat:"); -late final _sel_format = objc.registerName("format"); -late final _sel_setFormat_ = objc.registerName("setFormat:"); -late final _sel_attributedStringForZero = - objc.registerName("attributedStringForZero"); -late final _sel_setAttributedStringForZero_ = - objc.registerName("setAttributedStringForZero:"); -final _objc_msgSend_194 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_scanCharactersFromSet_intoString_ = + objc.registerName("scanCharactersFromSet:intoString:"); +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:"); +late final _sel_scanDecimal_ = objc.registerName("scanDecimal:"); +final _objc_msgSend_wap63g = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_attributedStringForNil = - objc.registerName("attributedStringForNil"); -late final _sel_setAttributedStringForNil_ = - objc.registerName("setAttributedStringForNil:"); -late final _sel_attributedStringForNotANumber = - objc.registerName("attributedStringForNotANumber"); -late final _sel_setAttributedStringForNotANumber_ = - objc.registerName("setAttributedStringForNotANumber:"); + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -/// NSDecimalNumberHandler -class NSDecimalNumberHandler extends objc.NSObject { - NSDecimalNumberHandler._(ffi.Pointer pointer, +/// 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 [NSDecimalNumberHandler] that points to the same underlying object as [other]. - NSDecimalNumberHandler.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSScanner] that points to the same underlying object as [other]. + NSScanner.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSDecimalNumberHandler] that wraps the given raw object pointer. - NSDecimalNumberHandler.castFromPointer(ffi.Pointer other, + /// 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 [NSDecimalNumberHandler]. + /// Returns whether [obj] is an instance of [NSScanner]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScanner); } - /// defaultDecimalNumberHandler - static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { - final _ret = _objc_msgSend_195( - _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); - return NSDecimalNumberHandler.castFromPointer(_ret, - retain: true, release: true); - } - - /// initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero: - NSDecimalNumberHandler - initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - NSRoundingMode roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _objc_msgSend_196( - this.pointer, - _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, - roundingMode.value, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler.castFromPointer(_ret, - retain: true, release: true); - } - - /// decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero: - static NSDecimalNumberHandler - decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - NSRoundingMode roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _objc_msgSend_196( - _class_NSDecimalNumberHandler, - _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, - roundingMode.value, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler.castFromPointer(_ret, - retain: true, release: true); - } - - /// init - NSDecimalNumberHandler init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSDecimalNumberHandler.castFromPointer(_ret, - retain: true, release: true); - } - - /// new - static NSDecimalNumberHandler new1() { - final _ret = _objc_msgSend_19(_class_NSDecimalNumberHandler, _sel_new); - return NSDecimalNumberHandler.castFromPointer(_ret, - retain: false, release: true); - } - - /// allocWithZone: - static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); - return NSDecimalNumberHandler.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSDecimalNumberHandler alloc() { - final _ret = _objc_msgSend_19(_class_NSDecimalNumberHandler, _sel_alloc); - return NSDecimalNumberHandler.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_NSDecimalNumberHandler, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSDecimalNumberHandler, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); - } - - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSDecimalNumberHandler, _sel_useStoredAccessor); - } - - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSDecimalNumberHandler, - _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_NSDecimalNumberHandler, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSDecimalNumberHandler, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } -} - -late final _class_NSDecimalNumberHandler = - objc.getClass("NSDecimalNumberHandler"); -late final _sel_defaultDecimalNumberHandler = - objc.registerName("defaultDecimalNumberHandler"); -final _objc_msgSend_195 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - -enum NSRoundingMode { - NSRoundPlain(0), - NSRoundDown(1), - NSRoundUp(2), - NSRoundBankers(3); - - final int value; - const NSRoundingMode(this.value); - - static NSRoundingMode fromValue(int value) => switch (value) { - 0 => NSRoundPlain, - 1 => NSRoundDown, - 2 => NSRoundUp, - 3 => NSRoundBankers, - _ => throw ArgumentError("Unknown value for NSRoundingMode: $value"), - }; -} - -late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = - objc.registerName( - "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); -final _objc_msgSend_196 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Short, - ffi.Bool, - ffi.Bool, - ffi.Bool, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - bool, - bool, - bool, - bool)>(); -late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = - objc.registerName( - "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); -late final _sel_roundingBehavior = objc.registerName("roundingBehavior"); -late final _sel_setRoundingBehavior_ = - objc.registerName("setRoundingBehavior:"); -final _objc_msgSend_197 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -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); + /// string + objc.NSString get string { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// scanLocation int get scanLocation { - return _objc_msgSend_57(this.pointer, _sel_scanLocation); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_scanLocation); } /// setScanLocation: set scanLocation(int value) { - return _objc_msgSend_133(this.pointer, _sel_setScanLocation_, value); + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setScanLocation_, value); } /// charactersToBeSkipped objc.NSCharacterSet? get charactersToBeSkipped { - final _ret = _objc_msgSend_198(this.pointer, _sel_charactersToBeSkipped); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_charactersToBeSkipped); return _ret.address == 0 ? null : objc.NSCharacterSet.castFromPointer(_ret, @@ -9843,23 +11430,24 @@ class NSScanner extends objc.NSObject { /// setCharactersToBeSkipped: set charactersToBeSkipped(objc.NSCharacterSet? value) { - return _objc_msgSend_199(this.pointer, _sel_setCharactersToBeSkipped_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setCharactersToBeSkipped_, value?.ref.pointer ?? ffi.nullptr); } /// caseSensitive bool get caseSensitive { - return _objc_msgSend_13(this.pointer, _sel_caseSensitive); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_caseSensitive); } /// setCaseSensitive: set caseSensitive(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setCaseSensitive_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setCaseSensitive_, value); } /// locale objc.ObjCObjectBase? get locale { - final _ret = _objc_msgSend_83(this.pointer, _sel_locale); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_locale); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); @@ -9867,140 +11455,144 @@ class NSScanner extends objc.NSObject { /// setLocale: set locale(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value?.ref.pointer ?? ffi.nullptr); } /// initWithString: NSScanner initWithString_(objc.NSString string) { - final _ret = - _objc_msgSend_63(this.pointer, _sel_initWithString_, string.pointer); - return NSScanner.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, string.ref.pointer); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } /// scanInt: bool scanInt_(ffi.Pointer result) { - return _objc_msgSend_201(this.pointer, _sel_scanInt_, result); + return _objc_msgSend_tke0i3(this.ref.pointer, _sel_scanInt_, result); } /// scanInteger: bool scanInteger_(ffi.Pointer result) { - return _objc_msgSend_202(this.pointer, _sel_scanInteger_, result); + return _objc_msgSend_1m3j5r2(this.ref.pointer, _sel_scanInteger_, result); } /// scanLongLong: bool scanLongLong_(ffi.Pointer result) { - return _objc_msgSend_203(this.pointer, _sel_scanLongLong_, result); + return _objc_msgSend_litvm(this.ref.pointer, _sel_scanLongLong_, result); } /// scanUnsignedLongLong: bool scanUnsignedLongLong_(ffi.Pointer result) { - return _objc_msgSend_204(this.pointer, _sel_scanUnsignedLongLong_, result); + return _objc_msgSend_1uz3cj3( + this.ref.pointer, _sel_scanUnsignedLongLong_, result); } /// scanFloat: bool scanFloat_(ffi.Pointer result) { - return _objc_msgSend_205(this.pointer, _sel_scanFloat_, result); + return _objc_msgSend_1qkfxp0(this.ref.pointer, _sel_scanFloat_, result); } /// scanDouble: bool scanDouble_(ffi.Pointer result) { - return _objc_msgSend_206(this.pointer, _sel_scanDouble_, result); + return _objc_msgSend_2un1vl(this.ref.pointer, _sel_scanDouble_, result); } /// scanHexInt: bool scanHexInt_(ffi.Pointer result) { - return _objc_msgSend_207(this.pointer, _sel_scanHexInt_, result); + return _objc_msgSend_5fep2j(this.ref.pointer, _sel_scanHexInt_, result); } /// scanHexLongLong: bool scanHexLongLong_(ffi.Pointer result) { - return _objc_msgSend_204(this.pointer, _sel_scanHexLongLong_, result); + return _objc_msgSend_1uz3cj3( + this.ref.pointer, _sel_scanHexLongLong_, result); } /// scanHexFloat: bool scanHexFloat_(ffi.Pointer result) { - return _objc_msgSend_205(this.pointer, _sel_scanHexFloat_, result); + return _objc_msgSend_1qkfxp0(this.ref.pointer, _sel_scanHexFloat_, result); } /// scanHexDouble: bool scanHexDouble_(ffi.Pointer result) { - return _objc_msgSend_206(this.pointer, _sel_scanHexDouble_, result); + return _objc_msgSend_2un1vl(this.ref.pointer, _sel_scanHexDouble_, result); } /// scanString:intoString: bool scanString_intoString_( objc.NSString string, ffi.Pointer> result) { - return _objc_msgSend_208( - this.pointer, _sel_scanString_intoString_, string.pointer, result); + return _objc_msgSend_p02k6o(this.ref.pointer, _sel_scanString_intoString_, + string.ref.pointer, result); } /// scanCharactersFromSet:intoString: bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_209(this.pointer, - _sel_scanCharactersFromSet_intoString_, set.pointer, result); + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_scanCharactersFromSet_intoString_, set.ref.pointer, result); } /// scanUpToString:intoString: bool scanUpToString_intoString_( objc.NSString string, ffi.Pointer> result) { - return _objc_msgSend_208( - this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_scanUpToString_intoString_, string.ref.pointer, result); } /// scanUpToCharactersFromSet:intoString: bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_209(this.pointer, - _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_scanUpToCharactersFromSet_intoString_, set.ref.pointer, result); } /// isAtEnd bool get atEnd { - return _objc_msgSend_13(this.pointer, _sel_isAtEnd); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isAtEnd); } /// scannerWithString: static NSScanner scannerWithString_(objc.NSString string) { - final _ret = _objc_msgSend_63( - _class_NSScanner, _sel_scannerWithString_, string.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSScanner, _sel_scannerWithString_, string.ref.pointer); return NSScanner.castFromPointer(_ret, retain: true, release: true); } /// localizedScannerWithString: static objc.ObjCObjectBase localizedScannerWithString_(objc.NSString string) { - final _ret = _objc_msgSend_63( - _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSScanner, _sel_localizedScannerWithString_, string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// scanDecimal: bool scanDecimal_(ffi.Pointer dcm) { - return _objc_msgSend_210(this.pointer, _sel_scanDecimal_, dcm); + return _objc_msgSend_wap63g(this.ref.pointer, _sel_scanDecimal_, dcm); } /// init NSScanner init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSScanner.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } /// new static NSScanner new1() { - final _ret = _objc_msgSend_19(_class_NSScanner, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_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); + final _ret = + _objc_msgSend_1b3ihd0(_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); + final _ret = _objc_msgSend_1unuoxw(_class_NSScanner, _sel_alloc); return NSScanner.castFromPointer(_ret, retain: false, release: true); } @@ -10009,232 +11601,99 @@ class NSScanner extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSScanner, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSScanner, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSScanner, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSScanner, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSScanner, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSScanner, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSScanner, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSScanner, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSScanner, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _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); + _objc_msgSend_1unuoxw(_class_NSScanner, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSScanner self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSScanner.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSScanner retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSScanner.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSScanner autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSScanner.castFromPointer(_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:"); -late final _sel_charactersToBeSkipped = - objc.registerName("charactersToBeSkipped"); -final _objc_msgSend_198 = 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_199 = 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:"); -final _objc_msgSend_200 = 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_201 = 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_202 = 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_203 = 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_204 = 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_205 = 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_206 = 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_207 = 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_208 = 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_209 = 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_210 = 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 _class_NSException = objc.getClass("NSException"); +late final _sel_exceptionWithName_reason_userInfo_ = + objc.registerName("exceptionWithName:reason:userInfo:"); +late final _sel_initWithName_reason_userInfo_ = + objc.registerName("initWithName:reason:userInfo:"); +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:"); /// NSException class NSException extends objc.NSObject { @@ -10244,7 +11703,7 @@ class NSException extends objc.NSObject { /// Constructs a [NSException] that points to the same underlying object as [other]. NSException.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSException] that wraps the given raw object pointer. NSException.castFromPointer(ffi.Pointer other, @@ -10253,43 +11712,43 @@ class NSException extends objc.NSObject { /// Returns whether [obj] is an instance of [NSException]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSException); + return _objc_msgSend_l8lotg( + obj.ref.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_211( + final _ret = _objc_msgSend_aud7dn( _class_NSException, _sel_exceptionWithName_reason_userInfo_, - name.pointer, - reason?.pointer ?? ffi.nullptr, - userInfo?.pointer ?? ffi.nullptr); + name.ref.pointer, + reason?.ref.pointer ?? ffi.nullptr, + userInfo?.ref.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_212( - this.pointer, + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), _sel_initWithName_reason_userInfo_, - aName.pointer, - aReason?.pointer ?? ffi.nullptr, - aUserInfo?.pointer ?? ffi.nullptr); - return NSException.castFromPointer(_ret, retain: true, release: true); + aName.ref.pointer, + aReason?.ref.pointer ?? ffi.nullptr, + aUserInfo?.ref.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: false, release: true); } /// name objc.NSString get name { - final _ret = _objc_msgSend_11(this.pointer, _sel_name); + final _ret = _objc_msgSend_1unuoxw(this.ref.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); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_reason); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -10297,7 +11756,7 @@ class NSException extends objc.NSObject { /// userInfo objc.NSDictionary? get userInfo { - final _ret = _objc_msgSend_82(this.pointer, _sel_userInfo); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -10305,49 +11764,51 @@ class NSException extends objc.NSObject { /// callStackReturnAddresses objc.NSArray get callStackReturnAddresses { - final _ret = _objc_msgSend_33(this.pointer, _sel_callStackReturnAddresses); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackReturnAddresses); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// callStackSymbols objc.NSArray get callStackSymbols { - final _ret = _objc_msgSend_33(this.pointer, _sel_callStackSymbols); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// raise void raise() { - _objc_msgSend_7(this.pointer, _sel_raise); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_raise); } /// raise:format: static void raise_format_(objc.NSString name, objc.NSString format) { - _objc_msgSend_213( - _class_NSException, _sel_raise_format_, name.pointer, format.pointer); + _objc_msgSend_1tjlcwl(_class_NSException, _sel_raise_format_, + name.ref.pointer, format.ref.pointer); } /// init NSException init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSException.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSException.castFromPointer(_ret, retain: false, release: true); } /// new static NSException new1() { - final _ret = _objc_msgSend_19(_class_NSException, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_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); + _objc_msgSend_1b3ihd0(_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); + final _ret = _objc_msgSend_1unuoxw(_class_NSException, _sel_alloc); return NSException.castFromPointer(_ret, retain: false, release: true); } @@ -10356,58 +11817,58 @@ class NSException extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSException, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSException, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSException, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSException, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSException, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSException, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSException, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSException, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSException, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSException, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -10415,543 +11876,713 @@ class NSException extends objc.NSObject { /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = - _objc_msgSend_19(_class_NSException, _sel_classForKeyedUnarchiver); + _objc_msgSend_1unuoxw(_class_NSException, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSException self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSException.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSException retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSException.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSException autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSException.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSException, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSException? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSException.castFromPointer(_ret, retain: false, release: true); + } } -late final _class_NSException = objc.getClass("NSException"); -late final _sel_exceptionWithName_reason_userInfo_ = - objc.registerName("exceptionWithName:reason:userInfo:"); -final _objc_msgSend_211 = objc.msgSendPointer +late final _class_NSFileHandle = objc.getClass("NSFileHandle"); +late final _sel_availableData = objc.registerName("availableData"); +late final _sel_initWithFileDescriptor_closeOnDealloc_ = + objc.registerName("initWithFileDescriptor:closeOnDealloc:"); +final _objc_msgSend_1jumayh = 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_readDataToEndOfFileAndReturnError_ = + objc.registerName("readDataToEndOfFileAndReturnError:"); +final _objc_msgSend_13z4cgc = 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)>(); -late final _sel_initWithName_reason_userInfo_ = - objc.registerName("initWithName:reason:userInfo:"); -final _objc_msgSend_212 = objc.msgSendPointer + ffi.Pointer>)>(); +late final _sel_readDataUpToLength_error_ = + objc.registerName("readDataUpToLength:error:"); +final _objc_msgSend_5h0ois = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -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_213 = objc.msgSendPointer + int, + ffi.Pointer>)>(); +late final _sel_writeData_error_ = objc.registerName("writeData:error:"); +late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); +final _objc_msgSend_gp32qh = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - void Function( + 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_57fjbb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLongLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( ffi.Pointer, - ffi.Pointer)>(); - -/// NSRunLoop -class NSRunLoop extends objc.NSObject { - NSRunLoop._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) + 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"); +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_1y425zh = 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_fileHandleForWritingToURL_error_ = + objc.registerName("fileHandleForWritingToURL:error:"); +late final _sel_fileHandleForUpdatingURL_error_ = + objc.registerName("fileHandleForUpdatingURL:error:"); +late final _sel_readInBackgroundAndNotifyForModes_ = + objc.registerName("readInBackgroundAndNotifyForModes:"); +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); +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSFileHandle_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSFileHandle_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSFileHandle_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSFileHandle { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSFileHandle_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(NSFileHandle) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSFileHandle_closureCallable, + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(NSFileHandle) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSFileHandle_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSFileHandle_CallExtension + on objc.ObjCBlock { + void call(NSFileHandle arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); +} + +late final _sel_readabilityHandler = objc.registerName("readabilityHandler"); +late final _sel_setReadabilityHandler_ = + objc.registerName("setReadabilityHandler:"); +late final _sel_writeabilityHandler = objc.registerName("writeabilityHandler"); +late final _sel_setWriteabilityHandler_ = + objc.registerName("setWriteabilityHandler:"); +late final _sel_initWithFileDescriptor_ = + objc.registerName("initWithFileDescriptor:"); +late final _sel_fileDescriptor = objc.registerName("fileDescriptor"); +final _objc_msgSend_1tf0yjs = 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:"); +late final _sel_writeData_ = objc.registerName("writeData:"); +late final _sel_offsetInFile = objc.registerName("offsetInFile"); +final _objc_msgSend_1cirwn8 = 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_10wkxl3 = 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"); + +/// 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 [NSRunLoop] that points to the same underlying object as [other]. - NSRunLoop.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSFileHandle] that points to the same underlying object as [other]. + NSFileHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSRunLoop] that wraps the given raw object pointer. - NSRunLoop.castFromPointer(ffi.Pointer other, + /// 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 [NSRunLoop]. + /// Returns whether [obj] is an instance of [NSFileHandle]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileHandle); } - /// currentRunLoop - static NSRunLoop getCurrentRunLoop() { - final _ret = _objc_msgSend_214(_class_NSRunLoop, _sel_currentRunLoop); - return NSRunLoop.castFromPointer(_ret, retain: true, release: true); + /// availableData + objc.NSData get availableData { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_availableData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// mainRunLoop - static NSRunLoop getMainRunLoop() { - final _ret = _objc_msgSend_214(_class_NSRunLoop, _sel_mainRunLoop); - return NSRunLoop.castFromPointer(_ret, retain: true, release: true); + /// initWithFileDescriptor:closeOnDealloc: + NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { + final _ret = _objc_msgSend_1jumayh(this.ref.retainAndReturnPointer(), + _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - /// currentMode - objc.NSString? get currentMode { - final _ret = _objc_msgSend_20(this.pointer, _sel_currentMode); + /// initWithCoder: + NSFileHandle? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// getCFRunLoop - ffi.Pointer<__CFRunLoop> getCFRunLoop() { - return _objc_msgSend_215(this.pointer, _sel_getCFRunLoop); - } - - /// addTimer:forMode: - void addTimer_forMode_(NSTimer timer, objc.NSString mode) { - _objc_msgSend_224( - this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); - } - - /// addPort:forMode: - void addPort_forMode_(NSPort aPort, objc.NSString mode) { - _objc_msgSend_253( - this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); + : NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - /// removePort:forMode: - void removePort_forMode_(NSPort aPort, objc.NSString mode) { - _objc_msgSend_253( - this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); + /// readDataToEndOfFileAndReturnError: + objc.NSData? readDataToEndOfFileAndReturnError_( + ffi.Pointer> error) { + final _ret = _objc_msgSend_13z4cgc( + this.ref.pointer, _sel_readDataToEndOfFileAndReturnError_, error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// limitDateForMode: - objc.NSDate? limitDateForMode_(objc.NSString mode) { - final _ret = - _objc_msgSend_103(this.pointer, _sel_limitDateForMode_, mode.pointer); + /// readDataUpToLength:error: + objc.NSData? readDataUpToLength_error_( + int length, ffi.Pointer> error) { + final _ret = _objc_msgSend_5h0ois( + this.ref.pointer, _sel_readDataUpToLength_error_, length, error); return _ret.address == 0 ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// acceptInputForMode:beforeDate: - void acceptInputForMode_beforeDate_( - objc.NSString mode, objc.NSDate limitDate) { - _objc_msgSend_254(this.pointer, _sel_acceptInputForMode_beforeDate_, - mode.pointer, limitDate.pointer); + /// writeData:error: + bool writeData_error_( + objc.NSData data, ffi.Pointer> error) { + return _objc_msgSend_p02k6o( + this.ref.pointer, _sel_writeData_error_, data.ref.pointer, error); } - /// run - void run() { - _objc_msgSend_7(this.pointer, _sel_run); + /// getOffset:error: + bool getOffset_error_(ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_gp32qh( + this.ref.pointer, _sel_getOffset_error_, offsetInFile, error); } - /// runUntilDate: - void runUntilDate_(objc.NSDate limitDate) { - _objc_msgSend_255(this.pointer, _sel_runUntilDate_, limitDate.pointer); + /// seekToEndReturningOffset:error: + bool seekToEndReturningOffset_error_( + ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_gp32qh(this.ref.pointer, + _sel_seekToEndReturningOffset_error_, offsetInFile, error); } - /// runMode:beforeDate: - bool runMode_beforeDate_(objc.NSString mode, objc.NSDate limitDate) { - return _objc_msgSend_256(this.pointer, _sel_runMode_beforeDate_, - mode.pointer, limitDate.pointer); + /// seekToOffset:error: + bool seekToOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_57fjbb( + this.ref.pointer, _sel_seekToOffset_error_, offset, error); } - /// configureAsServer - void configureAsServer() { - _objc_msgSend_7(this.pointer, _sel_configureAsServer); + /// truncateAtOffset:error: + bool truncateAtOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_57fjbb( + this.ref.pointer, _sel_truncateAtOffset_error_, offset, error); } - /// performInModes:block: - void performInModes_block_(objc.NSArray modes, ObjCBlock_ffiVoid block) { - _objc_msgSend_257( - this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); + /// synchronizeAndReturnError: + bool synchronizeAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_synchronizeAndReturnError_, error); } - /// performBlock: - void performBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_258(this.pointer, _sel_performBlock_, block.pointer); + /// closeAndReturnError: + bool closeAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_closeAndReturnError_, error); } - /// 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_259( - this.pointer, - _sel_performSelector_target_argument_order_modes_, - aSelector, - target.pointer, - arg?.pointer ?? ffi.nullptr, - order, - modes.pointer); + /// fileHandleWithStandardInput + static NSFileHandle getFileHandleWithStandardInput() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithStandardInput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// cancelPerformSelector:target:argument: - void cancelPerformSelector_target_argument_( - ffi.Pointer aSelector, - objc.ObjCObjectBase target, - objc.ObjCObjectBase? arg) { - _objc_msgSend_260(this.pointer, _sel_cancelPerformSelector_target_argument_, - aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); + /// fileHandleWithStandardOutput + static NSFileHandle getFileHandleWithStandardOutput() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithStandardOutput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// cancelPerformSelectorsWithTarget: - void cancelPerformSelectorsWithTarget_(objc.ObjCObjectBase target) { - _objc_msgSend_27( - this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); + /// fileHandleWithStandardError + static NSFileHandle getFileHandleWithStandardError() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithStandardError); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// init - NSRunLoop init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSRunLoop.castFromPointer(_ret, retain: true, release: true); + /// fileHandleWithNullDevice + static NSFileHandle getFileHandleWithNullDevice() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithNullDevice); + return NSFileHandle.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); + /// fileHandleForReadingAtPath: + static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_fileHandleForReadingAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, 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); + /// fileHandleForWritingAtPath: + static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_fileHandleForWritingAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// alloc - static NSRunLoop alloc() { - final _ret = _objc_msgSend_19(_class_NSRunLoop, _sel_alloc); - return NSRunLoop.castFromPointer(_ret, retain: false, release: true); + /// fileHandleForUpdatingAtPath: + static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_fileHandleForUpdatingAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, 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); + /// fileHandleForReadingFromURL:error: + static NSFileHandle? fileHandleForReadingFromURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(_class_NSFileHandle, + _sel_fileHandleForReadingFromURL_error_, url.ref.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// 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); + /// fileHandleForWritingToURL:error: + static NSFileHandle? fileHandleForWritingToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(_class_NSFileHandle, + _sel_fileHandleForWritingToURL_error_, url.ref.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSRunLoop, _sel_useStoredAccessor); + /// fileHandleForUpdatingURL:error: + static NSFileHandle? fileHandleForUpdatingURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(_class_NSFileHandle, + _sel_fileHandleForUpdatingURL_error_, url.ref.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// 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); + /// readInBackgroundAndNotifyForModes: + void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_readInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSRunLoop, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// readInBackgroundAndNotify + void readInBackgroundAndNotify() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_readInBackgroundAndNotify); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSRunLoop, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// readToEndOfFileInBackgroundAndNotifyForModes: + void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_readToEndOfFileInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// readToEndOfFileInBackgroundAndNotify + void readToEndOfFileInBackgroundAndNotify() { + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_readToEndOfFileInBackgroundAndNotify); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSRunLoop, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// acceptConnectionInBackgroundAndNotifyForModes: + void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_acceptConnectionInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } -} - -late final _class_NSRunLoop = objc.getClass("NSRunLoop"); -late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); -final _objc_msgSend_214 = 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_215 = 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); + /// acceptConnectionInBackgroundAndNotify + void acceptConnectionInBackgroundAndNotify() { + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_acceptConnectionInBackgroundAndNotify); } - /// timerWithTimeInterval:invocation:repeats: - static NSTimer timerWithTimeInterval_invocation_repeats_( - double ti, objc.NSInvocation invocation, bool yesOrNo) { - final _ret = _objc_msgSend_216( - _class_NSTimer, - _sel_timerWithTimeInterval_invocation_repeats_, - ti, - invocation.pointer, - yesOrNo); - return NSTimer.castFromPointer(_ret, retain: true, release: true); + /// waitForDataInBackgroundAndNotifyForModes: + void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_waitForDataInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } - /// scheduledTimerWithTimeInterval:invocation:repeats: - static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( - double ti, objc.NSInvocation invocation, bool yesOrNo) { - final _ret = _objc_msgSend_216( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_invocation_repeats_, - ti, - invocation.pointer, - yesOrNo); - return NSTimer.castFromPointer(_ret, retain: true, release: true); + /// waitForDataInBackgroundAndNotify + void waitForDataInBackgroundAndNotify() { + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_waitForDataInBackgroundAndNotify); } - /// 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_217( - _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); + /// readabilityHandler + objc.ObjCBlock? get readabilityHandler { + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_readabilityHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle.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_217( - _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); + /// setReadabilityHandler: + set readabilityHandler( + objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setReadabilityHandler_, + value?.ref.pointer ?? ffi.nullptr); } - /// timerWithTimeInterval:repeats:block: - static NSTimer timerWithTimeInterval_repeats_block_( - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_218( - _class_NSTimer, - _sel_timerWithTimeInterval_repeats_block_, - interval, - repeats, - block.pointer); - return NSTimer.castFromPointer(_ret, retain: true, release: true); + /// writeabilityHandler + objc.ObjCBlock? get writeabilityHandler { + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_writeabilityHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle.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_218( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_repeats_block_, - interval, - repeats, - block.pointer); - return NSTimer.castFromPointer(_ret, retain: true, release: true); + /// setWriteabilityHandler: + set writeabilityHandler( + objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setWriteabilityHandler_, + value?.ref.pointer ?? ffi.nullptr); } - /// initWithFireDate:interval:repeats:block: - NSTimer initWithFireDate_interval_repeats_block_(objc.NSDate date, - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_219( - this.pointer, - _sel_initWithFireDate_interval_repeats_block_, - date.pointer, - interval, - repeats, - block.pointer); - return NSTimer.castFromPointer(_ret, retain: true, release: true); + /// initWithFileDescriptor: + NSFileHandle initWithFileDescriptor_(int fd) { + final _ret = _objc_msgSend_105o5we( + this.ref.retainAndReturnPointer(), _sel_initWithFileDescriptor_, fd); + return NSFileHandle.castFromPointer(_ret, retain: false, 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_220( - 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); + /// fileDescriptor + int get fileDescriptor { + return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_fileDescriptor); } - /// fire - void fire() { - _objc_msgSend_7(this.pointer, _sel_fire); + /// readDataToEndOfFile + objc.NSData readDataToEndOfFile() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_readDataToEndOfFile); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// fireDate - objc.NSDate get fireDate { - final _ret = _objc_msgSend_221(this.pointer, _sel_fireDate); - return objc.NSDate.castFromPointer(_ret, retain: true, release: true); + /// readDataOfLength: + objc.NSData readDataOfLength_(int length) { + final _ret = + _objc_msgSend_ehxl2g(this.ref.pointer, _sel_readDataOfLength_, length); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// setFireDate: - set fireDate(objc.NSDate value) { - return _objc_msgSend_222(this.pointer, _sel_setFireDate_, value.pointer); + /// writeData: + void writeData_(objc.NSData data) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_writeData_, data.ref.pointer); } - /// timeInterval - double get timeInterval { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_timeInterval) - : _objc_msgSend_18(this.pointer, _sel_timeInterval); + /// offsetInFile + int get offsetInFile { + return _objc_msgSend_1cirwn8(this.ref.pointer, _sel_offsetInFile); } - /// tolerance - double get tolerance { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_tolerance) - : _objc_msgSend_18(this.pointer, _sel_tolerance); + /// seekToEndOfFile + int seekToEndOfFile() { + return _objc_msgSend_1cirwn8(this.ref.pointer, _sel_seekToEndOfFile); } - /// setTolerance: - set tolerance(double value) { - return _objc_msgSend_223(this.pointer, _sel_setTolerance_, value); + /// seekToFileOffset: + void seekToFileOffset_(int offset) { + _objc_msgSend_10wkxl3(this.ref.pointer, _sel_seekToFileOffset_, offset); } - /// invalidate - void invalidate() { - _objc_msgSend_7(this.pointer, _sel_invalidate); + /// truncateFileAtOffset: + void truncateFileAtOffset_(int offset) { + _objc_msgSend_10wkxl3(this.ref.pointer, _sel_truncateFileAtOffset_, offset); } - /// isValid - bool get valid { - return _objc_msgSend_13(this.pointer, _sel_isValid); + /// synchronizeFile + void synchronizeFile() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_synchronizeFile); } - /// userInfo - objc.ObjCObjectBase? get userInfo { - final _ret = _objc_msgSend_83(this.pointer, _sel_userInfo); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// closeFile + void closeFile() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeFile); } /// init - NSTimer init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSTimer.castFromPointer(_ret, retain: true, release: true); + NSFileHandle init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// new - static NSTimer new1() { - final _ret = _objc_msgSend_19(_class_NSTimer, _sel_new); - return NSTimer.castFromPointer(_ret, retain: false, release: true); + static NSFileHandle new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_new); + return NSFileHandle.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); + static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSFileHandle, _sel_allocWithZone_, zone); + return NSFileHandle.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); + static NSFileHandle alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_alloc); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -10959,175 +12590,232 @@ class NSTimer extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSTimer, + _objc_msgSend_cqxsqq( + _class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSTimer, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSFileHandle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSTimer, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSTimer, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSFileHandle, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSTimer, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSFileHandle, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSTimer, + _objc_msgSend_1tjlcwl( + _class_NSFileHandle, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _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_216 = 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_217 = objc.msgSendPointer + /// self + NSFileHandle self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSFileHandle retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSFileHandle autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSFileHandle, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } +} + +late final _class_NSFileManager = objc.getClass("NSFileManager"); +late final _sel_defaultManager = objc.registerName("defaultManager"); + +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_gyiq9w = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool)>>() + ffi.UnsignedLong)>>() .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) => + 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_NSTimer_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => +ffi.Pointer _ObjCBlock_ffiVoid_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSError_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -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); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSError_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSError { /// 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); - } + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(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; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock fromFunction( + void Function(objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSError_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -11138,958 +12826,1722 @@ class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { /// /// 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; + static objc.ObjCBlock listener( + void Function(objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSError_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - 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); +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSError? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } -late final _sel_timerWithTimeInterval_repeats_block_ = - objc.registerName("timerWithTimeInterval:repeats:block:"); -final _objc_msgSend_218 = 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_219 = objc.msgSendPointer +late final _sel_unmountVolumeAtURL_options_completionHandler_ = + objc.registerName("unmountVolumeAtURL:options:completionHandler:"); +final _objc_msgSend_yuugcv = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Double, - ffi.Bool, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - double, - bool, - ffi.Pointer)>(); -late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_ = + 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( - "initWithFireDate:interval:target:selector:userInfo:repeats:"); -final _objc_msgSend_220 = objc.msgSendPointer + "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); +final _objc_msgSend_1rn5oli = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer 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_221 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setFireDate_ = objc.registerName("setFireDate:"); -final _objc_msgSend_222 = 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_223 = 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_224 = 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_225(_class_NSPort, _sel_port); - return NSPort.castFromPointer(_ret, retain: true, release: true); - } - - /// invalidate - void invalidate() { - _objc_msgSend_7(this.pointer, _sel_invalidate); - } + ffi.Pointer, + int, + ffi.Pointer>)>(); - /// isValid - bool get valid { - return _objc_msgSend_13(this.pointer, _sel_isValid); - } - - /// setDelegate: - void setDelegate_(objc.ObjCObjectBase? anObject) { - _objc_msgSend_226( - this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); - } - - /// delegate - objc.ObjCObjectBase? delegate() { - final _ret = _objc_msgSend_83(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_227(this.pointer, _sel_scheduleInRunLoop_forMode_, - runLoop.pointer, mode.pointer); - } - - /// removeFromRunLoop:forMode: - void removeFromRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { - _objc_msgSend_227(this.pointer, _sel_removeFromRunLoop_forMode_, - runLoop.pointer, mode.pointer); - } - - /// reservedSpaceLength - int get reservedSpaceLength { - return _objc_msgSend_57(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_228( - 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_229( - this.pointer, - _sel_sendBeforeDate_msgid_components_from_reserved_, - limitDate.pointer, - msgID, - components?.pointer ?? ffi.nullptr, - receivePort?.pointer ?? ffi.nullptr, - headerSpaceReserved); - } - - /// addConnection:toRunLoop:forMode: - void addConnection_toRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { - _objc_msgSend_252(this.pointer, _sel_addConnection_toRunLoop_forMode_, - conn.pointer, runLoop.pointer, mode.pointer); - } - - /// removeConnection:fromRunLoop:forMode: - void removeConnection_fromRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { - _objc_msgSend_252(this.pointer, _sel_removeConnection_fromRunLoop_forMode_, - conn.pointer, runLoop.pointer, mode.pointer); - } - - /// 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); - } +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); - /// 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); - } + final int value; + const NSSearchPathDirectory(this.value); - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31( - _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } + 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"), + }; +} - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSPort, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } +enum NSSearchPathDomainMask { + NSUserDomainMask(1), + NSLocalDomainMask(2), + NSNetworkDomainMask(4), + NSSystemDomainMask(8), + NSAllDomainsMask(65535); - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSPort, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSSearchPathDomainMask(this.value); - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19(_class_NSPort, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } + 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 _class_NSPort = objc.getClass("NSPort"); -late final _sel_port = objc.registerName("port"); -final _objc_msgSend_225 = 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_226 = 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_227 = objc.msgSendPointer +late final _sel_URLsForDirectory_inDomains_ = + objc.registerName("URLsForDirectory:inDomains:"); +final _objc_msgSend_1llbjq7 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.UnsignedLong)>>() .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_228 = objc.msgSendPointer + 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_46p27t = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Bool, + ffi.Pointer>)>>() .asFunction< - bool Function( + 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_17s8ocw = 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, - int)>(); -late final _sel_sendBeforeDate_msgid_components_from_reserved_ = - objc.registerName("sendBeforeDate:msgid:components:from:reserved:"); -final _objc_msgSend_229 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_ = objc + .registerName("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); +final _objc_msgSend_9p3pl8 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, 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_16o5u5c = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, + bool, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = + objc.registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); +final _objc_msgSend_6toz8x = 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, - int)>(); - -/// NSConnection -class NSConnection extends objc.NSObject { - NSConnection._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +late final _sel_setAttributes_ofItemAtPath_error_ = + objc.registerName("setAttributes:ofItemAtPath:error:"); +late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); +late final _sel_contentsOfDirectoryAtPath_error_ = + objc.registerName("contentsOfDirectoryAtPath:error:"); +late final _sel_subpathsOfDirectoryAtPath_error_ = + objc.registerName("subpathsOfDirectoryAtPath:error:"); +late final _sel_attributesOfItemAtPath_error_ = + objc.registerName("attributesOfItemAtPath:error:"); +late final _sel_attributesOfFileSystemForPath_error_ = + objc.registerName("attributesOfFileSystemForPath:error:"); +late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = + objc.registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); +late final _sel_destinationOfSymbolicLinkAtPath_error_ = + objc.registerName("destinationOfSymbolicLinkAtPath:error:"); +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:"); +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:"); +late final _sel_trashItemAtURL_resultingItemURL_error_ = + objc.registerName("trashItemAtURL:resultingItemURL:error:"); +late final _sel_fileAttributesAtPath_traverseLink_ = + objc.registerName("fileAttributesAtPath:traverseLink:"); +late final _sel_changeFileAttributes_atPath_ = + objc.registerName("changeFileAttributes:atPath:"); +late final _sel_directoryContentsAtPath_ = + objc.registerName("directoryContentsAtPath:"); +late final _sel_fileSystemAttributesAtPath_ = + objc.registerName("fileSystemAttributesAtPath:"); +late final _sel_pathContentOfSymbolicLinkAtPath_ = + objc.registerName("pathContentOfSymbolicLinkAtPath:"); +late final _sel_createSymbolicLinkAtPath_pathContent_ = + objc.registerName("createSymbolicLinkAtPath:pathContent:"); +late final _sel_createDirectoryAtPath_attributes_ = + objc.registerName("createDirectoryAtPath:attributes:"); +late final _sel_linkPath_toPath_handler_ = + objc.registerName("linkPath:toPath:handler:"); +final _objc_msgSend_hukaf0 = 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_copyPath_toPath_handler_ = + objc.registerName("copyPath:toPath:handler:"); +late final _sel_movePath_toPath_handler_ = + objc.registerName("movePath:toPath:handler:"); +late final _sel_removeFileAtPath_handler_ = + objc.registerName("removeFileAtPath:handler:"); +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_rtz5p9 = 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:"); +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); +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) + .cast(); +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); +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_bool_NSURL_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - /// Constructs a [NSConnection] that points to the same underlying object as [other]. - NSConnection.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_bool_NSURL_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Constructs a [NSConnection] that wraps the given raw object pointer. - NSConnection.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// 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. + static objc.ObjCBlock fromFunction( + bool Function(objc.NSURL, objc.NSError) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_bool_NSURL_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + objc.NSURL + .castFromPointer(arg0, retain: true, release: true), + objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); +} - /// Returns whether [obj] is an instance of [NSConnection]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSConnection); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_bool_NSURL_NSError_CallExtension + on objc.ObjCBlock { + bool call(objc.NSURL arg0, objc.NSError arg1) => ref.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)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer); +} - /// statistics - objc.NSDictionary get statistics { - final _ret = _objc_msgSend_121(this.pointer, _sel_statistics); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } - - /// allConnections - static objc.NSArray allConnections() { - final _ret = _objc_msgSend_33(_class_NSConnection, _sel_allConnections); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = + objc.registerName( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); +final _objc_msgSend_40k0lk = 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:"); +late final _sel_createFileAtPath_contents_attributes_ = + objc.registerName("createFileAtPath:contents:attributes:"); +late final _sel_fileSystemRepresentationWithPath_ = + objc.registerName("fileSystemRepresentationWithPath:"); +final _objc_msgSend_t1v5su = 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_1t5rcq1 = 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)>(); - /// defaultConnection - static NSConnection defaultConnection() { - final _ret = _objc_msgSend_230(_class_NSConnection, _sel_defaultConnection); - return NSConnection.castFromPointer(_ret, retain: true, release: true); - } +enum NSFileManagerItemReplacementOptions { + NSFileManagerItemReplacementUsingNewMetadataOnly(1), + NSFileManagerItemReplacementWithoutDeletingBackupItem(2); - /// connectionWithRegisteredName:host: - static NSConnection? connectionWithRegisteredName_host_( - objc.NSString name, objc.NSString? hostName) { - final _ret = _objc_msgSend_231( - _class_NSConnection, - _sel_connectionWithRegisteredName_host_, - name.pointer, - hostName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConnection.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSFileManagerItemReplacementOptions(this.value); - /// connectionWithRegisteredName:host:usingNameServer: - static NSConnection? connectionWithRegisteredName_host_usingNameServer_( - objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { - final _ret = _objc_msgSend_236( - _class_NSConnection, - _sel_connectionWithRegisteredName_host_usingNameServer_, - name.pointer, - hostName?.pointer ?? ffi.nullptr, - server.pointer); - return _ret.address == 0 - ? null - : NSConnection.castFromPointer(_ret, retain: true, release: true); - } + static NSFileManagerItemReplacementOptions fromValue(int value) => + switch (value) { + 1 => NSFileManagerItemReplacementUsingNewMetadataOnly, + 2 => NSFileManagerItemReplacementWithoutDeletingBackupItem, + _ => throw ArgumentError( + "Unknown value for NSFileManagerItemReplacementOptions: $value"), + }; +} - /// rootProxyForConnectionWithRegisteredName:host: - static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( - objc.NSString name, objc.NSString? hostName) { - final _ret = _objc_msgSend_242( - _class_NSConnection, - _sel_rootProxyForConnectionWithRegisteredName_host_, - name.pointer, - hostName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSDistantObject.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = + objc.registerName( + "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); +final _objc_msgSend_1cu34v2 = 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_191cxmu = 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:"); +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:"); +late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc + .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); +final _objc_msgSend_1dca44n = 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); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) + .cast(); +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); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} - /// rootProxyForConnectionWithRegisteredName:host:usingNameServer: - static NSDistantObject? - rootProxyForConnectionWithRegisteredName_host_usingNameServer_( - objc.NSString name, - objc.NSString? hostName, - NSPortNameServer server) { - final _ret = _objc_msgSend_243( - _class_NSConnection, - _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, - name.pointer, - hostName?.pointer ?? ffi.nullptr, - server.pointer); - return _ret.address == 0 - ? null - : NSDistantObject.castFromPointer(_ret, retain: true, release: true); - } +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerTrampoline) + ..keepIsolateAlive = false; - /// serviceConnectionWithName:rootObject:usingNameServer: - static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( - objc.NSString name, objc.ObjCObjectBase root, NSPortNameServer server) { - final _ret = _objc_msgSend_244( - _class_NSConnection, - _sel_serviceConnectionWithName_rootObject_usingNameServer_, - name.pointer, - root.pointer, - server.pointer); - return _ret.address == 0 - ? null - : NSConnection.castFromPointer(_ret, retain: true, release: true); - } +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSDictionary_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); - /// serviceConnectionWithName:rootObject: - static NSConnection? serviceConnectionWithName_rootObject_( - objc.NSString name, objc.ObjCObjectBase root) { - final _ret = _objc_msgSend_245(_class_NSConnection, - _sel_serviceConnectionWithName_rootObject_, name.pointer, root.pointer); - return _ret.address == 0 - ? null - : NSConnection.castFromPointer(_ret, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// requestTimeout - double get requestTimeout { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_requestTimeout) - : _objc_msgSend_18(this.pointer, _sel_requestTimeout); - } + /// 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. + static objc.ObjCBlock fromFunction( + void Function(objc.NSDictionary?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureCallable, + (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))), + retain: false, + release: true); - /// setRequestTimeout: - set requestTimeout(double value) { - return _objc_msgSend_223(this.pointer, _sel_setRequestTimeout_, value); + /// 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. + static objc.ObjCBlock + listener(void Function(objc.NSDictionary?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerCallable.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))); + final wrapper = _wrapListenerBlock_1tjlcwl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); } +} - /// replyTimeout - double get replyTimeout { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_replyTimeout) - : _objc_msgSend_18(this.pointer, _sel_replyTimeout); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSDictionary_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSDictionary? arg0, objc.NSError? arg1) => + ref.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)>()(ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); +} - /// setReplyTimeout: - set replyTimeout(double value) { - return _objc_msgSend_223(this.pointer, _sel_setReplyTimeout_, value); +late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = + objc.registerName("getFileProviderServicesForItemAtURL:completionHandler:"); +ffi.Pointer + _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi + .NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_NSError_NSString_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock? Function(objc.NSError, objc.NSString)>`. +abstract final class ObjCBlock_objcObjCObject_NSError_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer? Function(objc.NSError, objc.NSString)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer? Function(objc.NSError, + objc.NSString)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock? Function(objc.NSError, objc.NSString)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock? Function(objc.NSError, objc.NSString)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_NSError_NSString_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock? Function(objc.NSError, objc.NSString)> + fromFunction( + objc.ObjCObjectBase? Function(objc.NSError, objc.NSString) fn) => + objc.ObjCBlock? Function(objc.NSError, objc.NSString)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_NSError_NSString_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(objc.NSError.castFromPointer(arg0, retain: true, release: true), objc.NSString.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock? Function(objc.NSError, objc.NSString)>`. +extension ObjCBlock_objcObjCObject_NSError_NSString_CallExtension + on objc.ObjCBlock< + ffi.Pointer? Function(objc.NSError, objc.NSString)> { + objc.ObjCObjectBase? call(objc.NSError arg0, objc.NSString arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0.ref.pointer, arg1.ref.pointer) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0.ref.pointer, arg1.ref.pointer), + retain: true, + release: true); +} + +final _objc_msgSend_cmbt6k = 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:"); + +/// 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.ref.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_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileManager); } - /// rootObject - objc.ObjCObjectBase? get rootObject { - final _ret = _objc_msgSend_83(this.pointer, _sel_rootObject); + /// defaultManager + static NSFileManager getDefaultManager() { + final _ret = + _objc_msgSend_1unuoxw(_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_gyiq9w( + this.ref.pointer, + _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, + propertyKeys?.ref.pointer ?? ffi.nullptr, + options.value); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setRootObject: - set rootObject(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setRootObject_, value?.pointer ?? ffi.nullptr); + /// unmountVolumeAtURL:options:completionHandler: + void unmountVolumeAtURL_options_completionHandler_( + objc.NSURL url, + NSFileManagerUnmountOptions mask, + objc.ObjCBlock completionHandler) { + _objc_msgSend_yuugcv( + this.ref.pointer, + _sel_unmountVolumeAtURL_options_completionHandler_, + url.ref.pointer, + mask.value, + completionHandler.ref.pointer); } - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(this.pointer, _sel_delegate); + /// 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_1rn5oli( + this.ref.pointer, + _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, + url.ref.pointer, + keys?.ref.pointer ?? ffi.nullptr, + mask.value, + error); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + /// URLsForDirectory:inDomains: + objc.NSArray URLsForDirectory_inDomains_( + NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask) { + final _ret = _objc_msgSend_1llbjq7(this.ref.pointer, + _sel_URLsForDirectory_inDomains_, directory.value, domainMask.value); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// independentConversationQueueing - bool get independentConversationQueueing { - return _objc_msgSend_13(this.pointer, _sel_independentConversationQueueing); + /// 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_46p27t( + this.ref.pointer, + _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, + directory.value, + domain.value, + url?.ref.pointer ?? ffi.nullptr, + shouldCreate, + error); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// setIndependentConversationQueueing: - set independentConversationQueueing(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setIndependentConversationQueueing_, value); + /// getRelationship:ofDirectoryAtURL:toItemAtURL:error: + bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( + ffi.Pointer outRelationship, + objc.NSURL directoryURL, + objc.NSURL otherURL, + ffi.Pointer> error) { + return _objc_msgSend_17s8ocw( + this.ref.pointer, + _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, + outRelationship, + directoryURL.ref.pointer, + otherURL.ref.pointer, + error); } - /// isValid - bool get valid { - return _objc_msgSend_13(this.pointer, _sel_isValid); + /// 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_9p3pl8( + this.ref.pointer, + _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, + outRelationship, + directory.value, + domainMask.value, + url.ref.pointer, + error); } - /// rootProxy - NSDistantObject get rootProxy { - final _ret = _objc_msgSend_246(this.pointer, _sel_rootProxy); - return NSDistantObject.castFromPointer(_ret, retain: true, release: true); + /// createDirectoryAtURL:withIntermediateDirectories:attributes:error: + bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( + objc.NSURL url, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_16o5u5c( + this.ref.pointer, + _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, + url.ref.pointer, + createIntermediates, + attributes?.ref.pointer ?? ffi.nullptr, + error); } - /// invalidate - void invalidate() { - _objc_msgSend_7(this.pointer, _sel_invalidate); + /// createSymbolicLinkAtURL:withDestinationURL:error: + bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, + objc.NSURL destURL, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_createSymbolicLinkAtURL_withDestinationURL_error_, + url.ref.pointer, + destURL.ref.pointer, + error); } - /// addRequestMode: - void addRequestMode_(objc.NSString rmode) { - _objc_msgSend_108(this.pointer, _sel_addRequestMode_, rmode.pointer); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// removeRequestMode: - void removeRequestMode_(objc.NSString rmode) { - _objc_msgSend_108(this.pointer, _sel_removeRequestMode_, rmode.pointer); + /// setDelegate: + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } - /// requestModes - objc.NSArray get requestModes { - final _ret = _objc_msgSend_33(this.pointer, _sel_requestModes); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// setAttributes:ofItemAtPath:error: + bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_setAttributes_ofItemAtPath_error_, + attributes.ref.pointer, + path.ref.pointer, + error); } - /// registerName: - bool registerName_(objc.NSString? name) { - return _objc_msgSend_247( - this.pointer, _sel_registerName_, name?.pointer ?? ffi.nullptr); + /// createDirectoryAtPath:withIntermediateDirectories:attributes:error: + bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( + objc.NSString path, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_16o5u5c( + this.ref.pointer, + _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, + path.ref.pointer, + createIntermediates, + attributes?.ref.pointer ?? ffi.nullptr, + error); } - /// registerName:withNameServer: - bool registerName_withNameServer_( - objc.NSString? name, NSPortNameServer server) { - return _objc_msgSend_248(this.pointer, _sel_registerName_withNameServer_, - name?.pointer ?? ffi.nullptr, server.pointer); + /// contentsOfDirectoryAtPath:error: + objc.NSArray? contentsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_contentsOfDirectoryAtPath_error_, path.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// connectionWithReceivePort:sendPort: - static NSConnection? connectionWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_249( - _class_NSConnection, - _sel_connectionWithReceivePort_sendPort_, - receivePort?.pointer ?? ffi.nullptr, - sendPort?.pointer ?? ffi.nullptr); + /// subpathsOfDirectoryAtPath:error: + objc.NSArray? subpathsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_subpathsOfDirectoryAtPath_error_, path.ref.pointer, error); return _ret.address == 0 ? null - : NSConnection.castFromPointer(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// currentConversation - static objc.ObjCObjectBase? currentConversation() { - final _ret = - _objc_msgSend_83(_class_NSConnection, _sel_currentConversation); + /// attributesOfItemAtPath:error: + objc.NSDictionary? attributesOfItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_attributesOfItemAtPath_error_, path.ref.pointer, error); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// initWithReceivePort:sendPort: - NSConnection? initWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_249( - this.pointer, - _sel_initWithReceivePort_sendPort_, - receivePort?.pointer ?? ffi.nullptr, - sendPort?.pointer ?? ffi.nullptr); + /// attributesOfFileSystemForPath:error: + objc.NSDictionary? attributesOfFileSystemForPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_attributesOfFileSystemForPath_error_, path.ref.pointer, error); return _ret.address == 0 ? null - : NSConnection.castFromPointer(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// sendPort - NSPort get sendPort { - final _ret = _objc_msgSend_225(this.pointer, _sel_sendPort); - return NSPort.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_6toz8x( + this.ref.pointer, + _sel_createSymbolicLinkAtPath_withDestinationPath_error_, + path.ref.pointer, + destPath.ref.pointer, + error); } - /// receivePort - NSPort get receivePort { - final _ret = _objc_msgSend_225(this.pointer, _sel_receivePort); - return NSPort.castFromPointer(_ret, retain: true, release: true); + /// destinationOfSymbolicLinkAtPath:error: + objc.NSString? destinationOfSymbolicLinkAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_destinationOfSymbolicLinkAtPath_error_, path.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// enableMultipleThreads - void enableMultipleThreads() { - _objc_msgSend_7(this.pointer, _sel_enableMultipleThreads); + /// copyItemAtPath:toPath:error: + bool copyItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_copyItemAtPath_toPath_error_, + srcPath.ref.pointer, + dstPath.ref.pointer, + error); } - /// multipleThreadsEnabled - bool get multipleThreadsEnabled { - return _objc_msgSend_13(this.pointer, _sel_multipleThreadsEnabled); + /// moveItemAtPath:toPath:error: + bool moveItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_moveItemAtPath_toPath_error_, + srcPath.ref.pointer, + dstPath.ref.pointer, + error); } - /// addRunLoop: - void addRunLoop_(NSRunLoop runloop) { - _objc_msgSend_250(this.pointer, _sel_addRunLoop_, runloop.pointer); + /// linkItemAtPath:toPath:error: + bool linkItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_linkItemAtPath_toPath_error_, + srcPath.ref.pointer, + dstPath.ref.pointer, + error); } - /// removeRunLoop: - void removeRunLoop_(NSRunLoop runloop) { - _objc_msgSend_250(this.pointer, _sel_removeRunLoop_, runloop.pointer); + /// removeItemAtPath:error: + bool removeItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_p02k6o(this.ref.pointer, _sel_removeItemAtPath_error_, + path.ref.pointer, error); } - /// runInNewThread - void runInNewThread() { - _objc_msgSend_7(this.pointer, _sel_runInNewThread); + /// copyItemAtURL:toURL:error: + bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_copyItemAtURL_toURL_error_, + srcURL.ref.pointer, + dstURL.ref.pointer, + error); } - /// remoteObjects - objc.NSArray get remoteObjects { - final _ret = _objc_msgSend_33(this.pointer, _sel_remoteObjects); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// moveItemAtURL:toURL:error: + bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_moveItemAtURL_toURL_error_, + srcURL.ref.pointer, + dstURL.ref.pointer, + error); } - /// localObjects - objc.NSArray get localObjects { - final _ret = _objc_msgSend_33(this.pointer, _sel_localObjects); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// linkItemAtURL:toURL:error: + bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_linkItemAtURL_toURL_error_, + srcURL.ref.pointer, + dstURL.ref.pointer, + error); } - /// dispatchWithComponents: - void dispatchWithComponents_(objc.NSArray components) { - _objc_msgSend_251( - this.pointer, _sel_dispatchWithComponents_, components.pointer); + /// removeItemAtURL:error: + bool removeItemAtURL_error_( + objc.NSURL URL, ffi.Pointer> error) { + return _objc_msgSend_p02k6o( + this.ref.pointer, _sel_removeItemAtURL_error_, URL.ref.pointer, error); } - /// init - NSConnection init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSConnection.castFromPointer(_ret, retain: true, release: true); + /// trashItemAtURL:resultingItemURL:error: + bool trashItemAtURL_resultingItemURL_error_( + objc.NSURL url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error) { + return _objc_msgSend_to8xlo( + this.ref.pointer, + _sel_trashItemAtURL_resultingItemURL_error_, + url.ref.pointer, + outResultingURL, + error); } - /// new - static NSConnection new1() { - final _ret = _objc_msgSend_19(_class_NSConnection, _sel_new); - return NSConnection.castFromPointer(_ret, retain: false, release: true); + /// fileAttributesAtPath:traverseLink: + objc.NSDictionary? fileAttributesAtPath_traverseLink_( + objc.NSString path, bool yorn) { + final _ret = _objc_msgSend_qqbb5y(this.ref.pointer, + _sel_fileAttributesAtPath_traverseLink_, path.ref.pointer, yorn); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// allocWithZone: - static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSConnection, _sel_allocWithZone_, zone); - return NSConnection.castFromPointer(_ret, retain: false, release: true); + /// changeFileAttributes:atPath: + bool changeFileAttributes_atPath_( + objc.NSDictionary attributes, objc.NSString path) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_changeFileAttributes_atPath_, + attributes.ref.pointer, + path.ref.pointer); } - /// alloc - static NSConnection alloc() { - final _ret = _objc_msgSend_19(_class_NSConnection, _sel_alloc); - return NSConnection.castFromPointer(_ret, retain: false, release: true); + /// directoryContentsAtPath: + objc.NSArray? directoryContentsAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_directoryContentsAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - objc.ObjCObjectBase aTarget, - ffi.Pointer aSelector, - objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSConnection, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + /// fileSystemAttributesAtPath: + objc.NSDictionary? fileSystemAttributesAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_fileSystemAttributesAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSConnection, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// pathContentOfSymbolicLinkAtPath: + objc.NSString? pathContentOfSymbolicLinkAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_pathContentOfSymbolicLinkAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSConnection, _sel_accessInstanceVariablesDirectly); + /// createSymbolicLinkAtPath:pathContent: + bool createSymbolicLinkAtPath_pathContent_( + objc.NSString path, objc.NSString otherpath) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_createSymbolicLinkAtPath_pathContent_, + path.ref.pointer, + otherpath.ref.pointer); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSConnection, _sel_useStoredAccessor); + /// createDirectoryAtPath:attributes: + bool createDirectoryAtPath_attributes_( + objc.NSString path, objc.NSDictionary attributes) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_createDirectoryAtPath_attributes_, + path.ref.pointer, + attributes.ref.pointer); } - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSConnection, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + /// linkPath:toPath:handler: + bool linkPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { + return _objc_msgSend_hukaf0(this.ref.pointer, _sel_linkPath_toPath_handler_, + src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSConnection, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// copyPath:toPath:handler: + bool copyPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { + return _objc_msgSend_hukaf0(this.ref.pointer, _sel_copyPath_toPath_handler_, + src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSConnection, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// movePath:toPath:handler: + bool movePath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { + return _objc_msgSend_hukaf0(this.ref.pointer, _sel_movePath_toPath_handler_, + src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSConnection, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// removeFileAtPath:handler: + bool removeFileAtPath_handler_( + objc.NSString path, objc.ObjCObjectBase? handler) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_removeFileAtPath_handler_, + path.ref.pointer, + handler?.ref.pointer ?? ffi.nullptr); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { + /// currentDirectoryPath + objc.NSString get currentDirectoryPath { final _ret = - _objc_msgSend_19(_class_NSConnection, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } -} - -late final _class_NSConnection = objc.getClass("NSConnection"); -late final _sel_statistics = objc.registerName("statistics"); -late final _sel_allConnections = objc.registerName("allConnections"); -late final _sel_defaultConnection = objc.registerName("defaultConnection"); -final _objc_msgSend_230 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_connectionWithRegisteredName_host_ = - objc.registerName("connectionWithRegisteredName:host:"); -final _objc_msgSend_231 = 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)>(); - -/// NSPortNameServer -class NSPortNameServer extends objc.NSObject { - NSPortNameServer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSPortNameServer] that points to the same underlying object as [other]. - NSPortNameServer.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [NSPortNameServer] that wraps the given raw object pointer. - NSPortNameServer.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSPortNameServer]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPortNameServer); + /// changeCurrentDirectoryPath: + bool changeCurrentDirectoryPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_changeCurrentDirectoryPath_, path.ref.pointer); } - /// systemDefaultPortNameServer - static NSPortNameServer systemDefaultPortNameServer() { - final _ret = _objc_msgSend_232( - _class_NSPortNameServer, _sel_systemDefaultPortNameServer); - return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); + /// fileExistsAtPath: + bool fileExistsAtPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_fileExistsAtPath_, path.ref.pointer); } - /// portForName: - NSPort? portForName_(objc.NSString name) { - final _ret = - _objc_msgSend_233(this.pointer, _sel_portForName_, name.pointer); - return _ret.address == 0 - ? null - : NSPort.castFromPointer(_ret, retain: true, release: true); + /// fileExistsAtPath:isDirectory: + bool fileExistsAtPath_isDirectory_( + objc.NSString path, ffi.Pointer isDirectory) { + return _objc_msgSend_rtz5p9(this.ref.pointer, + _sel_fileExistsAtPath_isDirectory_, path.ref.pointer, isDirectory); } - /// portForName:host: - NSPort? portForName_host_(objc.NSString name, objc.NSString? host) { - final _ret = _objc_msgSend_234(this.pointer, _sel_portForName_host_, - name.pointer, host?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSPort.castFromPointer(_ret, retain: true, release: true); + /// isReadableFileAtPath: + bool isReadableFileAtPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isReadableFileAtPath_, path.ref.pointer); } - /// registerPort:name: - bool registerPort_name_(NSPort port, objc.NSString name) { - return _objc_msgSend_235( - this.pointer, _sel_registerPort_name_, port.pointer, name.pointer); + /// isWritableFileAtPath: + bool isWritableFileAtPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isWritableFileAtPath_, path.ref.pointer); } - /// removePortForName: - bool removePortForName_(objc.NSString name) { - return _objc_msgSend_31( - this.pointer, _sel_removePortForName_, name.pointer); + /// isExecutableFileAtPath: + bool isExecutableFileAtPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isExecutableFileAtPath_, path.ref.pointer); } - /// init - NSPortNameServer init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); + /// isDeletableFileAtPath: + bool isDeletableFileAtPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDeletableFileAtPath_, path.ref.pointer); } - /// new - static NSPortNameServer new1() { - final _ret = _objc_msgSend_19(_class_NSPortNameServer, _sel_new); - return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); + /// contentsEqualAtPath:andPath: + bool contentsEqualAtPath_andPath_(objc.NSString path1, objc.NSString path2) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_contentsEqualAtPath_andPath_, + path1.ref.pointer, + path2.ref.pointer); } - /// allocWithZone: - static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSPortNameServer, _sel_allocWithZone_, zone); - return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); + /// displayNameAtPath: + objc.NSString displayNameAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_displayNameAtPath_, path.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// alloc - static NSPortNameServer alloc() { - final _ret = _objc_msgSend_19(_class_NSPortNameServer, _sel_alloc); - return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); + /// componentsToDisplayForPath: + objc.NSArray? componentsToDisplayForPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_componentsToDisplayForPath_, path.ref.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_juohf7( + this.ref.pointer, _sel_enumeratorAtPath_, path.ref.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, + objc.ObjCBlock? + handler) { + final _ret = _objc_msgSend_40k0lk( + this.ref.pointer, + _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, + url.ref.pointer, + keys?.ref.pointer ?? ffi.nullptr, + mask.value, + handler?.ref.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_juohf7( + this.ref.pointer, _sel_subpathsAtPath_, path.ref.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_juohf7( + this.ref.pointer, _sel_contentsAtPath_, path.ref.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_hukaf0( + this.ref.pointer, + _sel_createFileAtPath_contents_attributes_, + path.ref.pointer, + data?.ref.pointer ?? ffi.nullptr, + attr?.ref.pointer ?? ffi.nullptr); + } + + /// fileSystemRepresentationWithPath: + ffi.Pointer fileSystemRepresentationWithPath_(objc.NSString path) { + return _objc_msgSend_t1v5su(this.ref.pointer, + _sel_fileSystemRepresentationWithPath_, path.ref.pointer); + } + + /// stringWithFileSystemRepresentation:length: + objc.NSString stringWithFileSystemRepresentation_length_( + ffi.Pointer str, int len) { + final _ret = _objc_msgSend_1t5rcq1(this.ref.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_1cu34v2( + this.ref.pointer, + _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, + originalItemURL.ref.pointer, + newItemURL.ref.pointer, + backupItemName?.ref.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_191cxmu( + this.ref.pointer, + _sel_setUbiquitous_itemAtURL_destinationURL_error_, + flag, + url.ref.pointer, + destinationURL.ref.pointer, + error); + } + + /// isUbiquitousItemAtURL: + bool isUbiquitousItemAtURL_(objc.NSURL url) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isUbiquitousItemAtURL_, url.ref.pointer); + } + + /// startDownloadingUbiquitousItemAtURL:error: + bool startDownloadingUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_p02k6o( + this.ref.pointer, + _sel_startDownloadingUbiquitousItemAtURL_error_, + url.ref.pointer, + error); + } + + /// evictUbiquitousItemAtURL:error: + bool evictUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_evictUbiquitousItemAtURL_error_, url.ref.pointer, error); + } + + /// URLForUbiquityContainerIdentifier: + objc.NSURL? URLForUbiquityContainerIdentifier_( + objc.NSString? containerIdentifier) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, + _sel_URLForUbiquityContainerIdentifier_, + containerIdentifier?.ref.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_1dca44n( + this.ref.pointer, + _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, + url.ref.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_1unuoxw(this.ref.pointer, _sel_ubiquityIdentityToken); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// getFileProviderServicesForItemAtURL:completionHandler: + void getFileProviderServicesForItemAtURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getFileProviderServicesForItemAtURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); + } + + /// containerURLForSecurityApplicationGroupIdentifier: + objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( + objc.NSString groupIdentifier) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, + _sel_containerURLForSecurityApplicationGroupIdentifier_, + groupIdentifier.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// homeDirectoryForCurrentUser + objc.NSURL get homeDirectoryForCurrentUser { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_homeDirectoryForCurrentUser); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// temporaryDirectory + objc.NSURL get temporaryDirectory { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_temporaryDirectory); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// homeDirectoryForUser: + objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_homeDirectoryForUser_, userName.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// init + NSFileManager init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSFileManager new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFileManager, _sel_new); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSFileManager, _sel_allocWithZone_, zone); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSFileManager alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFileManager, _sel_alloc); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -12097,983 +14549,2235 @@ class NSPortNameServer extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSPortNameServer, + _objc_msgSend_cqxsqq( + _class_NSFileManager, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSPortNameServer, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSFileManager, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSPortNameServer, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSFileManager, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSPortNameServer, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSFileManager, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSPortNameServer, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSFileManager, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSPortNameServer, + _objc_msgSend_1tjlcwl( + _class_NSFileManager, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileManager, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } -late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); -late final _sel_systemDefaultPortNameServer = - objc.registerName("systemDefaultPortNameServer"); -final _objc_msgSend_232 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_portForName_ = objc.registerName("portForName:"); -final _objc_msgSend_233 = 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_portForName_host_ = objc.registerName("portForName:host:"); -final _objc_msgSend_234 = 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_registerPort_name_ = objc.registerName("registerPort:name:"); -final _objc_msgSend_235 = 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_removePortForName_ = objc.registerName("removePortForName:"); -late final _sel_connectionWithRegisteredName_host_usingNameServer_ = - objc.registerName("connectionWithRegisteredName:host:usingNameServer:"); -final _objc_msgSend_236 = 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 _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); +late final _sel_sharedHTTPCookieStorage = + objc.registerName("sharedHTTPCookieStorage"); +late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = + objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); +late final _sel_cookies = objc.registerName("cookies"); +late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); +late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); +late final _sel_cookieWithProperties_ = + objc.registerName("cookieWithProperties:"); +late final _sel_requestHeaderFieldsWithCookies_ = + objc.registerName("requestHeaderFieldsWithCookies:"); +late final _sel_cookiesWithResponseHeaderFields_forURL_ = + objc.registerName("cookiesWithResponseHeaderFields:forURL:"); +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"); +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"); -/// NSDistantObject -class NSDistantObject extends objc.NSProxy { - NSDistantObject._(ffi.Pointer pointer, +/// 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 [NSDistantObject] that points to the same underlying object as [other]. - NSDistantObject.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSHTTPCookie] that points to the same underlying object as [other]. + NSHTTPCookie.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSDistantObject] that wraps the given raw object pointer. - NSDistantObject.castFromPointer(ffi.Pointer other, + /// 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 [NSDistantObject]. + /// Returns whether [obj] is an instance of [NSHTTPCookie]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDistantObject); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); } - /// proxyWithTarget:connection: - static objc.ObjCObjectBase? proxyWithTarget_connection_( - objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_237(_class_NSDistantObject, - _sel_proxyWithTarget_connection_, target.pointer, connection.pointer); + /// initWithProperties: + NSHTTPCookie? initWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithProperties_, properties.ref.pointer); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - /// initWithTarget:connection: - NSDistantObject? initWithTarget_connection_( - objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_237(this.pointer, - _sel_initWithTarget_connection_, target.pointer, connection.pointer); + /// cookieWithProperties: + static NSHTTPCookie? cookieWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, + _sel_cookieWithProperties_, properties.ref.pointer); return _ret.address == 0 ? null - : NSDistantObject.castFromPointer(_ret, retain: true, release: true); + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - /// proxyWithLocal:connection: - static objc.ObjCObjectBase proxyWithLocal_connection_( - objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_238(_class_NSDistantObject, - _sel_proxyWithLocal_connection_, target.pointer, connection.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// requestHeaderFieldsWithCookies: + static objc.NSDictionary requestHeaderFieldsWithCookies_( + objc.NSArray cookies) { + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, + _sel_requestHeaderFieldsWithCookies_, cookies.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// initWithLocal:connection: - NSDistantObject initWithLocal_connection_( - objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_238(this.pointer, _sel_initWithLocal_connection_, - target.pointer, connection.pointer); - return NSDistantObject.castFromPointer(_ret, retain: true, release: true); + /// cookiesWithResponseHeaderFields:forURL: + static objc.NSArray cookiesWithResponseHeaderFields_forURL_( + objc.NSDictionary headerFields, objc.NSURL URL) { + final _ret = _objc_msgSend_iq11qg( + _class_NSHTTPCookie, + _sel_cookiesWithResponseHeaderFields_forURL_, + headerFields.ref.pointer, + URL.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// initWithCoder: - NSDistantObject? initWithCoder_(objc.NSCoder inCoder) { - final _ret = - _objc_msgSend_239(this.pointer, _sel_initWithCoder_, inCoder.pointer); + /// properties + objc.NSDictionary? get properties { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_properties); return _ret.address == 0 ? null - : NSDistantObject.castFromPointer(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// setProtocolForProxy: - void setProtocolForProxy_(objc.Protocol? proto) { - _objc_msgSend_240( - this.pointer, _sel_setProtocolForProxy_, proto?.pointer ?? ffi.nullptr); + /// version + int get version { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_version); } - /// connectionForProxy - NSConnection get connectionForProxy { - final _ret = _objc_msgSend_230(this.pointer, _sel_connectionForProxy); - return NSConnection.castFromPointer(_ret, retain: true, release: true); + /// name + objc.NSString get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// value + objc.NSString get value { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// expiresDate + objc.NSDate? get expiresDate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_expiresDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } + + /// isSessionOnly + bool get sessionOnly { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSessionOnly); + } + + /// domain + objc.NSString get domain { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// path + objc.NSString get path { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_path); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// isSecure + bool get secure { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSecure); + } + + /// isHTTPOnly + bool get HTTPOnly { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isHTTPOnly); + } + + /// comment + objc.NSString? get comment { + final _ret = _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.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_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_sameSitePolicy); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// init + NSHTTPCookie init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSHTTPCookie new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookie, _sel_new); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSHTTPCookie, _sel_allocWithZone_, zone); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } /// alloc - static objc.ObjCObjectBase alloc() { - final _ret = _objc_msgSend_19(_class_NSDistantObject, _sel_alloc); - return objc.ObjCObjectBase(_ret, retain: false, release: true); + static NSHTTPCookie alloc() { + final _ret = _objc_msgSend_1unuoxw(_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_cqxsqq( + _class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } + + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSHTTPCookie, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSHTTPCookie, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSHTTPCookie, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookie, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSHTTPCookie self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSHTTPCookie retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - /// respondsToSelector: - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_241( - _class_NSDistantObject, _sel_respondsToSelector_, aSelector); + /// autorelease + NSHTTPCookie autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSDistantObject = objc.getClass("NSDistantObject"); -late final _sel_proxyWithTarget_connection_ = - objc.registerName("proxyWithTarget:connection:"); -final _objc_msgSend_237 = objc.msgSendPointer +late final _sel_setCookie_ = objc.registerName("setCookie:"); +late final _sel_deleteCookie_ = objc.registerName("deleteCookie:"); +late final _sel_removeCookiesSinceDate_ = + objc.registerName("removeCookiesSinceDate:"); +late final _sel_cookiesForURL_ = objc.registerName("cookiesForURL:"); +late final _sel_setCookies_forURL_mainDocumentURL_ = + objc.registerName("setCookies:forURL:mainDocumentURL:"); +final _objc_msgSend_tenbla = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithTarget_connection_ = - objc.registerName("initWithTarget:connection:"); -late final _sel_proxyWithLocal_connection_ = - objc.registerName("proxyWithLocal:connection:"); -final _objc_msgSend_238 = 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_initWithLocal_connection_ = - objc.registerName("initWithLocal:connection:"); -late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); -final _objc_msgSend_239 = objc.msgSendPointer + +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_1jpuqgg = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setProtocolForProxy_ = - objc.registerName("setProtocolForProxy:"); -final _objc_msgSend_240 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookieAcceptPolicy_ = + objc.registerName("setCookieAcceptPolicy:"); +final _objc_msgSend_199e8fv = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); -late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); -final _objc_msgSend_241 = objc.msgSendPointer + ffi.Pointer, int)>(); +late final _sel_sortedCookiesUsingDescriptors_ = + objc.registerName("sortedCookiesUsingDescriptors:"); +late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); +late final _sel_isEqual_ = objc.registerName("isEqual:"); +bool _ObjCBlock_bool_ffiVoid_objcObjCObject_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); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer)> + fromFunction( + bool Function(ffi.Pointer, objc.ObjCObjectBase) fn) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) => + ref.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)>()( + ref.pointer, arg0, arg1.ref.pointer); +} + +late final _sel_class = objc.registerName("class"); +late final _sel_performSelector_ = objc.registerName("performSelector:"); +final _objc_msgSend_12790oz = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_rootProxyForConnectionWithRegisteredName_host_ = - objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); -final _objc_msgSend_242 = objc.msgSendPointer +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, ffi.Pointer arg1) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1), + retain: true, + release: true); +} + +late final _sel_performSelector_withObject_ = + objc.registerName("performSelector:withObject:"); +final _objc_msgSend_1g3ang8 = 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_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = - objc.registerName( - "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); -final _objc_msgSend_243 = objc.msgSendPointer +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)) + .ref + .retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0, + ffi.Pointer arg1, objc.ObjCObjectBase arg2) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1, arg2.ref.pointer), + retain: true, + release: true); +} + +late final _sel_performSelector_withObject_withObject_ = + objc.registerName("performSelector:withObject:withObject:"); +final _objc_msgSend_1f2tuqz = 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_serviceConnectionWithName_rootObject_usingNameServer_ = - objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); -final _objc_msgSend_244 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)) + .ref + .retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_serviceConnectionWithName_rootObject_ = - objc.registerName("serviceConnectionWithName:rootObject:"); -final _objc_msgSend_245 = objc.msgSendPointer + ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, + ffi.Pointer arg1, + objc.ObjCObjectBase arg2, + objc.ObjCObjectBase arg3) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), + retain: true, + release: true); +} + +late final _sel_isProxy = objc.registerName("isProxy"); +late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +bool _ObjCBlock_bool_ffiVoid_Protocol_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); +ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, objc.Protocol)>`. +abstract final class ObjCBlock_bool_ffiVoid_Protocol { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, objc.Protocol)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + objc.Protocol)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.Protocol)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.Protocol)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.Protocol)> + fromFunction(bool Function(ffi.Pointer, objc.Protocol) fn) => + objc.ObjCBlock, objc.Protocol)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + objc.Protocol.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, objc.Protocol)>`. +extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension + on objc.ObjCBlock, objc.Protocol)> { + bool call(ffi.Pointer arg0, objc.Protocol arg1) => + ref.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)>()( + ref.pointer, arg0, arg1.ref.pointer); +} + +late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); +final _objc_msgSend_8d7dvc = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_requestTimeout = objc.registerName("requestTimeout"); -late final _sel_setRequestTimeout_ = objc.registerName("setRequestTimeout:"); -late final _sel_replyTimeout = objc.registerName("replyTimeout"); -late final _sel_setReplyTimeout_ = objc.registerName("setReplyTimeout:"); -late final _sel_rootObject = objc.registerName("rootObject"); -late final _sel_setRootObject_ = objc.registerName("setRootObject:"); -late final _sel_independentConversationQueueing = - objc.registerName("independentConversationQueueing"); -late final _sel_setIndependentConversationQueueing_ = - objc.registerName("setIndependentConversationQueueing:"); -late final _sel_rootProxy = objc.registerName("rootProxy"); -final _objc_msgSend_246 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_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); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer)> + fromFunction(bool Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, ffi.Pointer arg1) => + ref.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)>()(ref.pointer, arg0, arg1); +} + +late final _sel_release = objc.registerName("release"); +void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + void Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock)> listener( + void Function(ffi.Pointer) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_hepzs(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_CallExtension + on objc.ObjCBlock)> { + void call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} + +late final _sel_retainCount = objc.registerName("retainCount"); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_closureTrampoline, 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiUnsignedLong_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(int Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiUnsignedLong_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiUnsignedLong_ffiVoid_CallExtension + on objc.ObjCBlock)> { + int call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} + +late final _sel_zone = objc.registerName("zone"); +final _objc_msgSend_j04r6g = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer<_NSZone> Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + ffi.Pointer<_NSZone> Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_addRequestMode_ = objc.registerName("addRequestMode:"); -late final _sel_removeRequestMode_ = objc.registerName("removeRequestMode:"); -late final _sel_requestModes = objc.registerName("requestModes"); -late final _sel_registerName_ = objc.registerName("registerName:"); -final _objc_msgSend_247 = objc.msgSendPointer +ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer<_NSZone> Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSZone_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSZone_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_NSZone_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock Function(ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunction(ffi.Pointer<_NSZone> Function(ffi.Pointer) fn) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newClosureBlock(_ObjCBlock_NSZone_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_NSZone_ffiVoid_CallExtension + on objc.ObjCBlock Function(ffi.Pointer)> { + ffi.Pointer<_NSZone> call(ffi.Pointer arg0) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} + +late final _sel_hash = objc.registerName("hash"); +late final _sel_superclass = objc.registerName("superclass"); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_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_NSString_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSString_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSString_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(objc.NSString Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSString_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSString_ffiVoid_CallExtension + on objc.ObjCBlock)> { + objc.NSString call(ffi.Pointer arg0) => + objc.NSString.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} + +late final _sel_debugDescription = objc.registerName("debugDescription"); +late final _sel_progress = objc.registerName("progress"); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_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_NSProgress_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(NSProgress Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSProgress_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoid_CallExtension + on objc.ObjCBlock)> { + NSProgress call(ffi.Pointer arg0) => NSProgress.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} + +late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); +late final _class_NSURLRequest = objc.getClass("NSURLRequest"); +late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); + +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_191svj = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_registerName_withNameServer_ = - objc.registerName("registerName:withNameServer:"); -final _objc_msgSend_248 = 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_connectionWithReceivePort_sendPort_ = - objc.registerName("connectionWithReceivePort:sendPort:"); -final _objc_msgSend_249 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Double)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_currentConversation = objc.registerName("currentConversation"); -late final _sel_initWithReceivePort_sendPort_ = - objc.registerName("initWithReceivePort:sendPort:"); -late final _sel_sendPort = objc.registerName("sendPort"); -late final _sel_receivePort = objc.registerName("receivePort"); -late final _sel_enableMultipleThreads = - objc.registerName("enableMultipleThreads"); -late final _sel_multipleThreadsEnabled = - objc.registerName("multipleThreadsEnabled"); -late final _sel_addRunLoop_ = objc.registerName("addRunLoop:"); -final _objc_msgSend_250 = 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_removeRunLoop_ = objc.registerName("removeRunLoop:"); -late final _sel_runInNewThread = objc.registerName("runInNewThread"); -late final _sel_remoteObjects = objc.registerName("remoteObjects"); -late final _sel_localObjects = objc.registerName("localObjects"); -late final _sel_dispatchWithComponents_ = - objc.registerName("dispatchWithComponents:"); -final _objc_msgSend_251 = 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_addConnection_toRunLoop_forMode_ = - objc.registerName("addConnection:toRunLoop:forMode:"); -final _objc_msgSend_252 = 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_removeConnection_fromRunLoop_forMode_ = - objc.registerName("removeConnection:fromRunLoop:forMode:"); -late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); -final _objc_msgSend_253 = 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:"); -late final _sel_acceptInputForMode_beforeDate_ = - objc.registerName("acceptInputForMode:beforeDate:"); -final _objc_msgSend_254 = 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_255 = 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_256 = 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_configureAsServer = objc.registerName("configureAsServer"); -late final _sel_performInModes_block_ = - objc.registerName("performInModes:block:"); -final _objc_msgSend_257 = 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_258 = objc.msgSendPointer + int, + double)>(); +late final _sel_initWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); +late final _sel_URL = objc.registerName("URL"); +late final _sel_cachePolicy = objc.registerName("cachePolicy"); +final _objc_msgSend_2xak1q = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.UnsignedLong Function(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_259 = objc.msgSendPointer + 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_ttt73t = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.UnsignedLong Function(ffi.Pointer, + 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_260 = objc.msgSendPointer + 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_t5yka9 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_cancelPerformSelectorsWithTarget_ = - objc.registerName("cancelPerformSelectorsWithTarget:"); + 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"); +late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); +late final _sel_HTTPShouldHandleCookies = + objc.registerName("HTTPShouldHandleCookies"); +late final _sel_HTTPShouldUsePipelining = + objc.registerName("HTTPShouldUsePipelining"); -/// NSFileHandle -class NSFileHandle extends objc.NSObject { - NSFileHandle._(ffi.Pointer 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 [NSFileHandle] that points to the same underlying object as [other]. - NSFileHandle.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLRequest] that points to the same underlying object as [other]. + NSURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSFileHandle] that wraps the given raw object pointer. - NSFileHandle.castFromPointer(ffi.Pointer other, + /// 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 [NSFileHandle]. + /// Returns whether [obj] is an instance of [NSURLRequest]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLRequest); } - /// availableData - objc.NSData get availableData { - final _ret = _objc_msgSend_113(this.pointer, _sel_availableData); - return objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// requestWithURL: + static NSURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + _class_NSURLRequest, _sel_requestWithURL_, URL.ref.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// initWithFileDescriptor:closeOnDealloc: - NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { - final _ret = _objc_msgSend_261(this.pointer, - _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); - return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSURLRequest, _sel_supportsSecureCoding); } - /// initWithCoder: - NSFileHandle? initWithCoder_(objc.NSCoder coder) { - final _ret = - _objc_msgSend_239(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// requestWithURL:cachePolicy:timeoutInterval: + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, + double timeoutInterval) { + final _ret = _objc_msgSend_191svj( + _class_NSURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// readDataToEndOfFileAndReturnError: - objc.NSData? readDataToEndOfFileAndReturnError_( - ffi.Pointer> error) { - final _ret = _objc_msgSend_262( - this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// initWithURL: + NSURLRequest initWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - /// readDataUpToLength:error: - objc.NSData? readDataUpToLength_error_( - int length, ffi.Pointer> error) { - final _ret = _objc_msgSend_263( - this.pointer, _sel_readDataUpToLength_error_, length, error); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// initWithURL:cachePolicy:timeoutInterval: + NSURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_191svj( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - /// writeData:error: - bool writeData_error_( - objc.NSData data, ffi.Pointer> error) { - return _objc_msgSend_264( - this.pointer, _sel_writeData_error_, data.pointer, error); + /// URL + objc.NSURL? get URL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// getOffset:error: - bool getOffset_error_(ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _objc_msgSend_265( - this.pointer, _sel_getOffset_error_, offsetInFile, error); + /// cachePolicy + NSURLRequestCachePolicy get cachePolicy { + final _ret = _objc_msgSend_2xak1q(this.ref.pointer, _sel_cachePolicy); + return NSURLRequestCachePolicy.fromValue(_ret); } - /// seekToEndReturningOffset:error: - bool seekToEndReturningOffset_error_( - ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _objc_msgSend_265(this.pointer, _sel_seekToEndReturningOffset_error_, - offsetInFile, error); + /// timeoutInterval + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutInterval) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); } - /// seekToOffset:error: - bool seekToOffset_error_( - int offset, ffi.Pointer> error) { - return _objc_msgSend_266( - this.pointer, _sel_seekToOffset_error_, offset, error); + /// mainDocumentURL + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// truncateAtOffset:error: - bool truncateAtOffset_error_( - int offset, ffi.Pointer> error) { - return _objc_msgSend_266( - this.pointer, _sel_truncateAtOffset_error_, offset, error); + /// networkServiceType + NSURLRequestNetworkServiceType get networkServiceType { + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + return NSURLRequestNetworkServiceType.fromValue(_ret); } - /// synchronizeAndReturnError: - bool synchronizeAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_39( - this.pointer, _sel_synchronizeAndReturnError_, error); + /// allowsCellularAccess + bool get allowsCellularAccess { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); } - /// closeAndReturnError: - bool closeAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_39(this.pointer, _sel_closeAndReturnError_, error); + /// allowsExpensiveNetworkAccess + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } - /// fileHandleWithStandardInput - static NSFileHandle getFileHandleWithStandardInput() { - final _ret = _objc_msgSend_267( - _class_NSFileHandle, _sel_fileHandleWithStandardInput); - return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// allowsConstrainedNetworkAccess + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } - /// fileHandleWithStandardOutput - static NSFileHandle getFileHandleWithStandardOutput() { - final _ret = _objc_msgSend_267( - _class_NSFileHandle, _sel_fileHandleWithStandardOutput); - return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// assumesHTTP3Capable + bool get assumesHTTP3Capable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); } - /// fileHandleWithStandardError - static NSFileHandle getFileHandleWithStandardError() { - final _ret = _objc_msgSend_267( - _class_NSFileHandle, _sel_fileHandleWithStandardError); - return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// attribution + NSURLRequestAttribution get attribution { + final _ret = _objc_msgSend_t5yka9(this.ref.pointer, _sel_attribution); + return NSURLRequestAttribution.fromValue(_ret); } - /// fileHandleWithNullDevice - static NSFileHandle getFileHandleWithNullDevice() { - final _ret = - _objc_msgSend_267(_class_NSFileHandle, _sel_fileHandleWithNullDevice); - return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// requiresDNSSECValidation + bool get requiresDNSSECValidation { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } - /// fileHandleForReadingAtPath: - static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_35( - _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); + /// HTTPMethod + objc.NSString? get HTTPMethod { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPMethod); return _ret.address == 0 ? null - : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// fileHandleForWritingAtPath: - static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_35( - _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); + /// allHTTPHeaderFields + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); return _ret.address == 0 ? null - : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// fileHandleForUpdatingAtPath: - static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_35( - _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); + /// valueForHTTPHeaderField: + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); return _ret.address == 0 ? null - : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// fileHandleForReadingFromURL:error: - static NSFileHandle? fileHandleForReadingFromURL_error_( - objc.NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_268(_class_NSFileHandle, - _sel_fileHandleForReadingFromURL_error_, url.pointer, error); + /// HTTPBody + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); return _ret.address == 0 ? null - : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// fileHandleForWritingToURL:error: - static NSFileHandle? fileHandleForWritingToURL_error_( - objc.NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_268(_class_NSFileHandle, - _sel_fileHandleForWritingToURL_error_, url.pointer, error); + /// HTTPBodyStream + objc.NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); return _ret.address == 0 ? null - : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); } - /// fileHandleForUpdatingURL:error: - static NSFileHandle? fileHandleForUpdatingURL_error_( - objc.NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_268(_class_NSFileHandle, - _sel_fileHandleForUpdatingURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// HTTPShouldHandleCookies + bool get HTTPShouldHandleCookies { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); } - /// readInBackgroundAndNotifyForModes: - void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { - _objc_msgSend_269(this.pointer, _sel_readInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); + /// HTTPShouldUsePipelining + bool get HTTPShouldUsePipelining { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); } - /// readInBackgroundAndNotify - void readInBackgroundAndNotify() { - _objc_msgSend_7(this.pointer, _sel_readInBackgroundAndNotify); + /// init + NSURLRequest init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - /// readToEndOfFileInBackgroundAndNotifyForModes: - void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { - _objc_msgSend_269( - this.pointer, - _sel_readToEndOfFileInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); + /// new + static NSURLRequest new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_new); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - /// readToEndOfFileInBackgroundAndNotify - void readToEndOfFileInBackgroundAndNotify() { - _objc_msgSend_7(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); + /// allocWithZone: + static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLRequest, _sel_allocWithZone_, zone); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - /// acceptConnectionInBackgroundAndNotifyForModes: - void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { - _objc_msgSend_269( - this.pointer, - _sel_acceptConnectionInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); + /// alloc + static NSURLRequest alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_alloc); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - /// acceptConnectionInBackgroundAndNotify - void acceptConnectionInBackgroundAndNotify() { - _objc_msgSend_7(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } - /// waitForDataInBackgroundAndNotifyForModes: - void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { - _objc_msgSend_269( - this.pointer, - _sel_waitForDataInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } - /// waitForDataInBackgroundAndNotify - void waitForDataInBackgroundAndNotify() { - _objc_msgSend_7(this.pointer, _sel_waitForDataInBackgroundAndNotify); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); } - /// readabilityHandler - ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { - final _ret = _objc_msgSend_270(this.pointer, _sel_readabilityHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, - retain: true, release: true); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSURLRequest, _sel_useStoredAccessor); } - /// setReadabilityHandler: - set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _objc_msgSend_271(this.pointer, _sel_setReadabilityHandler_, - value?.pointer ?? ffi.nullptr); + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// writeabilityHandler - ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { - final _ret = _objc_msgSend_270(this.pointer, _sel_writeabilityHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, - retain: true, release: true); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } - /// setWriteabilityHandler: - set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _objc_msgSend_271(this.pointer, _sel_setWriteabilityHandler_, - value?.pointer ?? ffi.nullptr); + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } - /// initWithFileDescriptor: - NSFileHandle initWithFileDescriptor_(int fd) { - final _ret = - _objc_msgSend_272(this.pointer, _sel_initWithFileDescriptor_, fd); - return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// fileDescriptor - int get fileDescriptor { - return _objc_msgSend_273(this.pointer, _sel_fileDescriptor); + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLRequest, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// readDataToEndOfFile - objc.NSData readDataToEndOfFile() { - final _ret = _objc_msgSend_113(this.pointer, _sel_readDataToEndOfFile); - return objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// self + NSURLRequest self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// readDataOfLength: - objc.NSData readDataOfLength_(int length) { - final _ret = - _objc_msgSend_274(this.pointer, _sel_readDataOfLength_, length); - return objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// retain + NSURLRequest retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// writeData: - void writeData_(objc.NSData data) { - _objc_msgSend_275(this.pointer, _sel_writeData_, data.pointer); + /// autorelease + NSURLRequest autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// offsetInFile - int get offsetInFile { - return _objc_msgSend_276(this.pointer, _sel_offsetInFile); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } - /// seekToEndOfFile - int seekToEndOfFile() { - return _objc_msgSend_276(this.pointer, _sel_seekToEndOfFile); + /// initWithCoder: + NSURLRequest? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: false, release: true); } +} - /// seekToFileOffset: - void seekToFileOffset_(int offset) { - _objc_msgSend_277(this.pointer, _sel_seekToFileOffset_, offset); +late final _sel_originalRequest = objc.registerName("originalRequest"); +late final _sel_currentRequest = objc.registerName("currentRequest"); +late final _class_NSURLResponse = objc.getClass("NSURLResponse"); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_eyseqq = 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_e94jsr = 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"); + +/// 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.ref.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_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } - /// truncateFileAtOffset: - void truncateFileAtOffset_(int offset) { - _objc_msgSend_277(this.pointer, _sel_truncateFileAtOffset_, offset); + /// initWithURL:MIMEType:expectedContentLength:textEncodingName: + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + int length, + objc.NSString? name) { + final _ret = _objc_msgSend_eyseqq( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, + URL.ref.pointer, + MIMEType?.ref.pointer ?? ffi.nullptr, + length, + name?.ref.pointer ?? ffi.nullptr); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - /// synchronizeFile - void synchronizeFile() { - _objc_msgSend_7(this.pointer, _sel_synchronizeFile); + /// URL + objc.NSURL? get URL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// closeFile - void closeFile() { - _objc_msgSend_7(this.pointer, _sel_closeFile); + /// MIMEType + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_MIMEType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// expectedContentLength + int get expectedContentLength { + return _objc_msgSend_e94jsr(this.ref.pointer, _sel_expectedContentLength); + } + + /// textEncodingName + objc.NSString? get textEncodingName { + final _ret = _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_suggestedFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init - NSFileHandle init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + NSURLResponse init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } /// new - static NSFileHandle new1() { - final _ret = _objc_msgSend_19(_class_NSFileHandle, _sel_new); - return NSFileHandle.castFromPointer(_ret, retain: false, release: true); + static NSURLResponse new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_new); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSFileHandle, _sel_allocWithZone_, zone); - return NSFileHandle.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSURLResponse, _sel_allocWithZone_, zone); + return NSURLResponse.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); + static NSURLResponse alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_alloc); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -13081,579 +16785,245 @@ class NSFileHandle extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSFileHandle, + _objc_msgSend_cqxsqq( + _class_NSURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSFileHandle, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSFileHandle, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSURLResponse, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSFileHandle, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSFileHandle, + _objc_msgSend_1tjlcwl( + _class_NSURLResponse, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLResponse, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLResponse, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLResponse self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLResponse retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLResponse autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSURLResponse, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSURLResponse? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: false, release: true); + } } -late final _class_NSFileHandle = objc.getClass("NSFileHandle"); -late final _sel_availableData = objc.registerName("availableData"); -late final _sel_initWithFileDescriptor_closeOnDealloc_ = - objc.registerName("initWithFileDescriptor:closeOnDealloc:"); -final _objc_msgSend_261 = objc.msgSendPointer +late final _sel_response = objc.registerName("response"); +late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); +late final _sel_setEarliestBeginDate_ = + objc.registerName("setEarliestBeginDate:"); +late final _sel_countOfBytesClientExpectsToSend = + objc.registerName("countOfBytesClientExpectsToSend"); +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +late final _sel_countOfBytesClientExpectsToReceive = + objc.registerName("countOfBytesClientExpectsToReceive"); +late final _sel_setCountOfBytesClientExpectsToReceive_ = + objc.registerName("setCountOfBytesClientExpectsToReceive:"); +late final _sel_countOfBytesSent = objc.registerName("countOfBytesSent"); +late final _sel_countOfBytesReceived = + objc.registerName("countOfBytesReceived"); +late final _sel_countOfBytesExpectedToSend = + objc.registerName("countOfBytesExpectedToSend"); +late final _sel_countOfBytesExpectedToReceive = + objc.registerName("countOfBytesExpectedToReceive"); +late final _sel_taskDescription = objc.registerName("taskDescription"); +late final _sel_setTaskDescription_ = objc.registerName("setTaskDescription:"); + +enum NSURLSessionTaskState { + NSURLSessionTaskStateRunning(0), + NSURLSessionTaskStateSuspended(1), + NSURLSessionTaskStateCanceling(2), + NSURLSessionTaskStateCompleted(3); + + final int value; + const NSURLSessionTaskState(this.value); + + static NSURLSessionTaskState fromValue(int value) => switch (value) { + 0 => NSURLSessionTaskStateRunning, + 1 => NSURLSessionTaskStateSuspended, + 2 => NSURLSessionTaskStateCanceling, + 3 => NSURLSessionTaskStateCompleted, + _ => throw ArgumentError( + "Unknown value for NSURLSessionTaskState: $value"), + }; +} + +late final _sel_state = objc.registerName("state"); +final _objc_msgSend_8b7yc1 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int, ffi.Bool)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int, bool)>(); -late final _sel_readDataToEndOfFileAndReturnError_ = - objc.registerName("readDataToEndOfFileAndReturnError:"); -final _objc_msgSend_262 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_error = objc.registerName("error"); +late final _sel_suspend = objc.registerName("suspend"); +late final _sel_priority = objc.registerName("priority"); +final _objc_msgSend_fcilgx = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Float Function(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_263 = objc.msgSendPointer + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_fcilgxFpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() + ffi.Float Function(ffi.Pointer, + 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_264 = 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_265 = 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_266 = 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_267 = 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_268 = 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_269 = 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_270 = 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_271 = 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_272 = 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_273 = 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_274 = 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_275 = 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_276 = 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_277 = objc.msgSendPointer + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPriority_ = objc.registerName("setPriority:"); +final _objc_msgSend_s9gjzc = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>() + ffi.Pointer, ffi.Float)>>() .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"); + ffi.Pointer, double)>(); +late final _sel_prefersIncrementalDelivery = + objc.registerName("prefersIncrementalDelivery"); +late final _sel_setPrefersIncrementalDelivery_ = + objc.registerName("setPrefersIncrementalDelivery:"); -/// NSFileManager -class NSFileManager extends objc.NSObject { - NSFileManager._(ffi.Pointer pointer, +/// NSURLSessionTask +class NSURLSessionTask extends objc.NSObject { + NSURLSessionTask._(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 [NSURLSessionTask] that points to the same underlying object as [other]. + NSURLSessionTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSFileManager] that wraps the given raw object pointer. - NSFileManager.castFromPointer(ffi.Pointer other, + /// 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 [NSFileManager]. + /// Returns whether [obj] is an instance of [NSURLSessionTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } - /// defaultManager - static NSFileManager getDefaultManager() { - final _ret = _objc_msgSend_278(_class_NSFileManager, _sel_defaultManager); - return NSFileManager.castFromPointer(_ret, retain: true, release: true); + /// taskIdentifier + int get taskIdentifier { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_taskIdentifier); } - /// mountedVolumeURLsIncludingResourceValuesForKeys:options: - objc.NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( - objc.NSArray? propertyKeys, NSVolumeEnumerationOptions options) { - final _ret = _objc_msgSend_279( - this.pointer, - _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, - propertyKeys?.pointer ?? ffi.nullptr, - options.value); - return _ret.address == 0 + /// originalRequest + NSURLRequest? get originalRequest { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_originalRequest); + 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_280( - this.pointer, - _sel_unmountVolumeAtURL_options_completionHandler_, - url.pointer, - mask.value, - completionHandler.pointer); + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// 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_281( - this.pointer, - _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, - url.pointer, - keys?.pointer ?? ffi.nullptr, - mask.value, - error); + /// currentRequest + NSURLRequest? get currentRequest { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentRequest); 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_282(this.pointer, - _sel_URLsForDirectory_inDomains_, directory.value, domainMask.value); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : NSURLRequest.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_283( - this.pointer, - _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, - directory.value, - domain.value, - url?.pointer ?? ffi.nullptr, - shouldCreate, - error); + /// response + NSURLResponse? get response { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_response); 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_284( - 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_285( - 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_286( - 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_287( - this.pointer, - _sel_createSymbolicLinkAtURL_withDestinationURL_error_, - url.pointer, - destURL.pointer, - error); + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); } /// delegate objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(this.pointer, _sel_delegate); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); @@ -13661,557 +17031,168 @@ class NSFileManager extends objc.NSObject { /// setDelegate: set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - 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_288( - 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_289( - this.pointer, - _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, - path.pointer, - createIntermediates, - attributes?.pointer ?? ffi.nullptr, - error); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } - /// contentsOfDirectoryAtPath:error: - objc.NSArray? contentsOfDirectoryAtPath_error_( - objc.NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_290(this.pointer, - _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// progress + NSProgress get progress { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_progress); + return NSProgress.castFromPointer(_ret, retain: true, release: true); } - /// subpathsOfDirectoryAtPath:error: - objc.NSArray? subpathsOfDirectoryAtPath_error_( - objc.NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_290(this.pointer, - _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); + /// earliestBeginDate + objc.NSDate? get earliestBeginDate { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_earliestBeginDate); return _ret.address == 0 ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// attributesOfItemAtPath:error: - objc.NSDictionary? attributesOfItemAtPath_error_( - objc.NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_291( - this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// setEarliestBeginDate: + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEarliestBeginDate_, + value?.ref.pointer ?? ffi.nullptr); } - /// attributesOfFileSystemForPath:error: - objc.NSDictionary? attributesOfFileSystemForPath_error_( - objc.NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_291(this.pointer, - _sel_attributesOfFileSystemForPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// countOfBytesClientExpectsToSend + int get countOfBytesClientExpectsToSend { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesClientExpectsToSend); } - /// createSymbolicLinkAtPath:withDestinationPath:error: - bool createSymbolicLinkAtPath_withDestinationPath_error_(objc.NSString path, - objc.NSString destPath, ffi.Pointer> error) { - return _objc_msgSend_292( - this.pointer, - _sel_createSymbolicLinkAtPath_withDestinationPath_error_, - path.pointer, - destPath.pointer, - error); + /// setCountOfBytesClientExpectsToSend: + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); } - /// destinationOfSymbolicLinkAtPath:error: - objc.NSString? destinationOfSymbolicLinkAtPath_error_( - objc.NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_293(this.pointer, - _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// countOfBytesClientExpectsToReceive + int get countOfBytesClientExpectsToReceive { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesClientExpectsToReceive); } - /// copyItemAtPath:toPath:error: - bool copyItemAtPath_toPath_error_(objc.NSString srcPath, - objc.NSString dstPath, ffi.Pointer> error) { - return _objc_msgSend_292(this.pointer, _sel_copyItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); + /// setCountOfBytesClientExpectsToReceive: + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); } - /// moveItemAtPath:toPath:error: - bool moveItemAtPath_toPath_error_(objc.NSString srcPath, - objc.NSString dstPath, ffi.Pointer> error) { - return _objc_msgSend_292(this.pointer, _sel_moveItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); + /// countOfBytesSent + int get countOfBytesSent { + return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesSent); } - /// linkItemAtPath:toPath:error: - bool linkItemAtPath_toPath_error_(objc.NSString srcPath, - objc.NSString dstPath, ffi.Pointer> error) { - return _objc_msgSend_292(this.pointer, _sel_linkItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); + /// countOfBytesReceived + int get countOfBytesReceived { + return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesReceived); } - /// removeItemAtPath:error: - bool removeItemAtPath_error_( - objc.NSString path, ffi.Pointer> error) { - return _objc_msgSend_294( - this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); + /// countOfBytesExpectedToSend + int get countOfBytesExpectedToSend { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesExpectedToSend); } - /// copyItemAtURL:toURL:error: - bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_287(this.pointer, _sel_copyItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); + /// countOfBytesExpectedToReceive + int get countOfBytesExpectedToReceive { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesExpectedToReceive); } - /// moveItemAtURL:toURL:error: - bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_287(this.pointer, _sel_moveItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); + /// taskDescription + objc.NSString? get taskDescription { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_taskDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// linkItemAtURL:toURL:error: - bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_287(this.pointer, _sel_linkItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); + /// setTaskDescription: + set taskDescription(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTaskDescription_, + value?.ref.pointer ?? ffi.nullptr); } - /// removeItemAtURL:error: - bool removeItemAtURL_error_( - objc.NSURL URL, ffi.Pointer> error) { - return _objc_msgSend_295( - this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); + /// cancel + void cancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } - /// trashItemAtURL:resultingItemURL:error: - bool trashItemAtURL_resultingItemURL_error_( - objc.NSURL url, - ffi.Pointer> outResultingURL, - ffi.Pointer> error) { - return _objc_msgSend_296( - this.pointer, - _sel_trashItemAtURL_resultingItemURL_error_, - url.pointer, - outResultingURL, - error); + /// state + NSURLSessionTaskState get state { + final _ret = _objc_msgSend_8b7yc1(this.ref.pointer, _sel_state); + return NSURLSessionTaskState.fromValue(_ret); } - /// fileAttributesAtPath:traverseLink: - objc.NSDictionary? fileAttributesAtPath_traverseLink_( - objc.NSString path, bool yorn) { - final _ret = _objc_msgSend_297(this.pointer, - _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); + /// error + objc.NSError? get error { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_error); return _ret.address == 0 ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - /// changeFileAttributes:atPath: - bool changeFileAttributes_atPath_( - objc.NSDictionary attributes, objc.NSString path) { - return _objc_msgSend_298(this.pointer, _sel_changeFileAttributes_atPath_, - attributes.pointer, path.pointer); + /// suspend + void suspend() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_suspend); } - /// directoryContentsAtPath: - objc.NSArray? directoryContentsAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_299( - this.pointer, _sel_directoryContentsAtPath_, path.pointer); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// resume + void resume() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); } - /// fileSystemAttributesAtPath: - objc.NSDictionary? fileSystemAttributesAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_300( - this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// priority + double get priority { + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_priority) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_priority); } - /// pathContentOfSymbolicLinkAtPath: - objc.NSString? pathContentOfSymbolicLinkAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_42( - this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setPriority: + set priority(double value) { + return _objc_msgSend_s9gjzc(this.ref.pointer, _sel_setPriority_, value); } - /// createSymbolicLinkAtPath:pathContent: - bool createSymbolicLinkAtPath_pathContent_( - objc.NSString path, objc.NSString otherpath) { - return _objc_msgSend_301( - this.pointer, - _sel_createSymbolicLinkAtPath_pathContent_, - path.pointer, - otherpath.pointer); + /// prefersIncrementalDelivery + bool get prefersIncrementalDelivery { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_prefersIncrementalDelivery); } - /// createDirectoryAtPath:attributes: - bool createDirectoryAtPath_attributes_( - objc.NSString path, objc.NSDictionary attributes) { - return _objc_msgSend_302( - this.pointer, - _sel_createDirectoryAtPath_attributes_, - path.pointer, - attributes.pointer); - } - - /// linkPath:toPath:handler: - bool linkPath_toPath_handler_( - objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { - return _objc_msgSend_303(this.pointer, _sel_linkPath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - /// copyPath:toPath:handler: - bool copyPath_toPath_handler_( - objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { - return _objc_msgSend_303(this.pointer, _sel_copyPath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - /// movePath:toPath:handler: - bool movePath_toPath_handler_( - objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { - return _objc_msgSend_303(this.pointer, _sel_movePath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - /// removeFileAtPath:handler: - bool removeFileAtPath_handler_( - objc.NSString path, objc.ObjCObjectBase? handler) { - return _objc_msgSend_304(this.pointer, _sel_removeFileAtPath_handler_, - path.pointer, handler?.pointer ?? ffi.nullptr); - } - - /// 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_305(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_301(this.pointer, _sel_contentsEqualAtPath_andPath_, - path1.pointer, path2.pointer); - } - - /// displayNameAtPath: - objc.NSString displayNameAtPath_(objc.NSString path) { - final _ret = - _objc_msgSend_306(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_299( - 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_35(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_307( - 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_299(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_308(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_309( - 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_310( - this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); - } - - /// stringWithFileSystemRepresentation:length: - objc.NSString stringWithFileSystemRepresentation_length_( - ffi.Pointer str, int len) { - final _ret = _objc_msgSend_311(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_312( - 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_313( - this.pointer, - _sel_setUbiquitous_itemAtURL_destinationURL_error_, - flag, - url.pointer, - destinationURL.pointer, - error); - } - - /// isUbiquitousItemAtURL: - bool isUbiquitousItemAtURL_(objc.NSURL url) { - return _objc_msgSend_314( - this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); - } - - /// startDownloadingUbiquitousItemAtURL:error: - bool startDownloadingUbiquitousItemAtURL_error_( - objc.NSURL url, ffi.Pointer> error) { - return _objc_msgSend_295(this.pointer, - _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); - } - - /// evictUbiquitousItemAtURL:error: - bool evictUbiquitousItemAtURL_error_( - objc.NSURL url, ffi.Pointer> error) { - return _objc_msgSend_295( - this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); - } - - /// URLForUbiquityContainerIdentifier: - objc.NSURL? URLForUbiquityContainerIdentifier_( - objc.NSString? containerIdentifier) { - final _ret = _objc_msgSend_315( - 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_316( - 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_83(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_317( - this.pointer, - _sel_getFileProviderServicesForItemAtURL_completionHandler_, - url.pointer, - completionHandler.pointer); - } - - /// containerURLForSecurityApplicationGroupIdentifier: - objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( - objc.NSString groupIdentifier) { - final _ret = _objc_msgSend_41( - 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_40(this.pointer, _sel_homeDirectoryForCurrentUser); - return objc.NSURL.castFromPointer(_ret, retain: true, release: true); - } - - /// temporaryDirectory - objc.NSURL get temporaryDirectory { - final _ret = _objc_msgSend_40(this.pointer, _sel_temporaryDirectory); - return objc.NSURL.castFromPointer(_ret, retain: true, release: true); - } - - /// homeDirectoryForUser: - objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { - final _ret = _objc_msgSend_41( - this.pointer, _sel_homeDirectoryForUser_, userName.pointer); - return _ret.address == 0 - ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + /// setPrefersIncrementalDelivery: + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setPrefersIncrementalDelivery_, value); } /// init - NSFileManager init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSFileManager.castFromPointer(_ret, retain: true, release: true); + NSURLSessionTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } /// new - static NSFileManager new1() { - final _ret = _objc_msgSend_19(_class_NSFileManager, _sel_new); - return NSFileManager.castFromPointer(_ret, retain: false, release: true); + static NSURLSessionTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_new); + return NSURLSessionTask.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); + static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionTask, _sel_allocWithZone_, zone); + return NSURLSessionTask.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); + static NSURLSessionTask alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_alloc); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -14219,190 +17200,174 @@ class NSFileManager extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSFileManager, + _objc_msgSend_cqxsqq( + _class_NSURLSessionTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSFileManager, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSFileManager, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSFileManager, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSURLSessionTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSFileManager, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLSessionTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSFileManager, + _objc_msgSend_1tjlcwl( + _class_NSURLSessionTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionTask, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionTask, _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_278 = 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_279 = 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); + /// self + NSURLSessionTask self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + } - final int value; - const NSFileManagerUnmountOptions(this.value); + /// retain + NSURLSessionTask retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + } - static NSFileManagerUnmountOptions fromValue(int value) => switch (value) { - 1 => NSFileManagerUnmountAllPartitionsAndEjectDisk, - 2 => NSFileManagerUnmountWithoutUI, - _ => throw ArgumentError( - "Unknown value for NSFileManagerUnmountOptions: $value"), - }; + /// autorelease + NSURLSessionTask autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + } } -void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +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_NSError_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -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); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSArray_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSArray { /// 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); - } + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(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; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSArray_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -14413,2599 +17378,460 @@ class ObjCBlock_ffiVoid_NSError extends objc.ObjCBlockBase { /// /// 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; + static objc.ObjCBlock listener( + void Function(objc.NSArray?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - void call(objc.NSError? arg0) => pointer.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSArray_CallExtension + on objc.ObjCBlock { + void call(objc.NSArray? arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, + ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } -late final _sel_unmountVolumeAtURL_options_completionHandler_ = - objc.registerName("unmountVolumeAtURL:options:completionHandler:"); -final _objc_msgSend_280 = 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)>(); +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); -enum NSDirectoryEnumerationOptions { - NSDirectoryEnumerationSkipsSubdirectoryDescendants(1), - NSDirectoryEnumerationSkipsPackageDescendants(2), - NSDirectoryEnumerationSkipsHiddenFiles(4), - NSDirectoryEnumerationIncludesDirectoriesPostOrder(8), - NSDirectoryEnumerationProducesRelativePathURLs(16); +/// NSHTTPCookieStorage +class NSHTTPCookieStorage extends objc.NSObject { + NSHTTPCookieStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - final int value; - const NSDirectoryEnumerationOptions(this.value); + /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSDirectoryEnumerationOptions fromValue(int value) => switch (value) { - 1 => NSDirectoryEnumerationSkipsSubdirectoryDescendants, - 2 => NSDirectoryEnumerationSkipsPackageDescendants, - 4 => NSDirectoryEnumerationSkipsHiddenFiles, - 8 => NSDirectoryEnumerationIncludesDirectoriesPostOrder, - 16 => NSDirectoryEnumerationProducesRelativePathURLs, - _ => throw ArgumentError( - "Unknown value for NSDirectoryEnumerationOptions: $value"), - }; -} + /// 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); -late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = - objc.registerName( - "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); -final _objc_msgSend_281 = 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>)>(); + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); + } -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); + /// sharedHTTPCookieStorage + static NSHTTPCookieStorage getSharedHTTPCookieStorage() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSSearchPathDirectory(this.value); + /// sharedCookieStorageForGroupContainerIdentifier: + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7( + _class_NSHTTPCookieStorage, + _sel_sharedCookieStorageForGroupContainerIdentifier_, + identifier.ref.pointer); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); + } - 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"), - }; -} + /// cookies + objc.NSArray? get cookies { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_cookies); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } -enum NSSearchPathDomainMask { - NSUserDomainMask(1), - NSLocalDomainMask(2), - NSNetworkDomainMask(4), - NSSystemDomainMask(8), - NSAllDomainsMask(65535); + /// setCookie: + void setCookie_(NSHTTPCookie cookie) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCookie_, cookie.ref.pointer); + } - final int value; - const NSSearchPathDomainMask(this.value); + /// deleteCookie: + void deleteCookie_(NSHTTPCookie cookie) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_deleteCookie_, cookie.ref.pointer); + } - static NSSearchPathDomainMask fromValue(int value) => switch (value) { - 1 => NSUserDomainMask, - 2 => NSLocalDomainMask, - 4 => NSNetworkDomainMask, - 8 => NSSystemDomainMask, - 65535 => NSAllDomainsMask, - _ => throw ArgumentError( - "Unknown value for NSSearchPathDomainMask: $value"), - }; -} + /// removeCookiesSinceDate: + void removeCookiesSinceDate_(objc.NSDate date) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeCookiesSinceDate_, date.ref.pointer); + } -late final _sel_URLsForDirectory_inDomains_ = - objc.registerName("URLsForDirectory:inDomains:"); -final _objc_msgSend_282 = 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_283 = 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>)>(); + /// cookiesForURL: + objc.NSArray? cookiesForURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_cookiesForURL_, URL.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } -enum NSURLRelationship { - NSURLRelationshipContains(0), - NSURLRelationshipSame(1), - NSURLRelationshipOther(2); + /// setCookies:forURL:mainDocumentURL: + void setCookies_forURL_mainDocumentURL_( + objc.NSArray cookies, objc.NSURL? URL, objc.NSURL? mainDocumentURL) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_setCookies_forURL_mainDocumentURL_, + cookies.ref.pointer, + URL?.ref.pointer ?? ffi.nullptr, + mainDocumentURL?.ref.pointer ?? ffi.nullptr); + } - final int value; - const NSURLRelationship(this.value); + /// cookieAcceptPolicy + NSHTTPCookieAcceptPolicy get cookieAcceptPolicy { + final _ret = + _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_cookieAcceptPolicy); + return NSHTTPCookieAcceptPolicy.fromValue(_ret); + } - static NSURLRelationship fromValue(int value) => switch (value) { - 0 => NSURLRelationshipContains, - 1 => NSURLRelationshipSame, - 2 => NSURLRelationshipOther, - _ => throw ArgumentError("Unknown value for NSURLRelationship: $value"), - }; + /// setCookieAcceptPolicy: + set cookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { + return _objc_msgSend_199e8fv( + this.ref.pointer, _sel_setCookieAcceptPolicy_, value.value); + } + + /// sortedCookiesUsingDescriptors: + objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_sortedCookiesUsingDescriptors_, sortOrder.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// storeCookies:forTask: + void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_storeCookies_forTask_, + cookies.ref.pointer, task.ref.pointer); + } + + /// getCookiesForTask:completionHandler: + void getCookiesForTask_completionHandler_(NSURLSessionTask task, + objc.ObjCBlock completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getCookiesForTask_completionHandler_, + task.ref.pointer, + completionHandler.ref.pointer); + } + + /// init + NSHTTPCookieStorage init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); + } + + /// new + static NSHTTPCookieStorage new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_new); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); + } + + /// allocWithZone: + static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); + } + + /// alloc + static NSHTTPCookieStorage alloc() { + final _ret = _objc_msgSend_1unuoxw(_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_cqxsqq( + _class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } + + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSHTTPCookieStorage, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookieStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSHTTPCookieStorage, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSHTTPCookieStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSHTTPCookieStorage self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSHTTPCookieStorage retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSHTTPCookieStorage autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); + } } -late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = - objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); -final _objc_msgSend_284 = objc.msgSendPointer +late final _class_NSIndexPath = objc.getClass("NSIndexPath"); +late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); +late final _sel_indexPathWithIndexes_length_ = + objc.registerName("indexPathWithIndexes:length:"); +final _objc_msgSend_1educny = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong)>>() .asFunction< - bool Function( + instancetype 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_285 = objc.msgSendPointer + int)>(); +late final _sel_initWithIndexes_length_ = + objc.registerName("initWithIndexes:length:"); +late final _sel_initWithIndex_ = objc.registerName("initWithIndex:"); +late final _sel_indexPathByAddingIndex_ = + objc.registerName("indexPathByAddingIndex:"); +late final _sel_indexPathByRemovingLastIndex = + objc.registerName("indexPathByRemovingLastIndex"); +late final _sel_indexAtPosition_ = objc.registerName("indexAtPosition:"); +final _objc_msgSend_1eigyr6 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .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_286 = objc.msgSendPointer + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getIndexes_range_ = objc.registerName("getIndexes:range:"); +final _objc_msgSend_oxe0mk = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer, + objc.NSRange)>>() .asFunction< - bool Function( + void 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_287 = objc.msgSendPointer + ffi.Pointer, + objc.NSRange)>(); +late final _sel_getIndexes_ = objc.registerName("getIndexes:"); +final _objc_msgSend_v7ntkj = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void 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>)>(); -late final _sel_setAttributes_ofItemAtPath_error_ = - objc.registerName("setAttributes:ofItemAtPath:error:"); -final _objc_msgSend_288 = 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_289 = 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_290 = 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_291 = 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_292 = 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_293 = 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_294 = 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_295 = 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_296 = 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_297 = 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_298 = 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_299 = 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_300 = 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_301 = 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_302 = 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_linkPath_toPath_handler_ = - objc.registerName("linkPath:toPath:handler:"); -final _objc_msgSend_303 = 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_copyPath_toPath_handler_ = - objc.registerName("copyPath:toPath:handler:"); -late final _sel_movePath_toPath_handler_ = - objc.registerName("movePath:toPath:handler:"); -late final _sel_removeFileAtPath_handler_ = - objc.registerName("removeFileAtPath:handler:"); -final _objc_msgSend_304 = 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_305 = 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_306 = 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_307 = 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_308 = 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_309 = 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_310 = 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_311 = 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_312 = 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_313 = 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_314 = 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_315 = 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_316 = 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_317 = 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_318( - _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: true, release: true); - } - - /// sharedCookieStorageForGroupContainerIdentifier: - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - objc.NSString identifier) { - final _ret = _objc_msgSend_319( - _class_NSHTTPCookieStorage, - _sel_sharedCookieStorageForGroupContainerIdentifier_, - identifier.pointer); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: true, release: true); - } - - /// cookies - objc.NSArray? get cookies { - final _ret = _objc_msgSend_86(this.pointer, _sel_cookies); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setCookie: - void setCookie_(NSHTTPCookie cookie) { - _objc_msgSend_324(this.pointer, _sel_setCookie_, cookie.pointer); - } - - /// deleteCookie: - void deleteCookie_(NSHTTPCookie cookie) { - _objc_msgSend_324(this.pointer, _sel_deleteCookie_, cookie.pointer); - } - - /// removeCookiesSinceDate: - void removeCookiesSinceDate_(objc.NSDate date) { - _objc_msgSend_255(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); - } - - /// cookiesForURL: - objc.NSArray? cookiesForURL_(objc.NSURL URL) { - final _ret = - _objc_msgSend_325(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_326( - this.pointer, - _sel_setCookies_forURL_mainDocumentURL_, - cookies.pointer, - URL?.pointer ?? ffi.nullptr, - mainDocumentURL?.pointer ?? ffi.nullptr); - } - - /// cookieAcceptPolicy - NSHTTPCookieAcceptPolicy get cookieAcceptPolicy { - final _ret = _objc_msgSend_327(this.pointer, _sel_cookieAcceptPolicy); - return NSHTTPCookieAcceptPolicy.fromValue(_ret); - } - - /// setCookieAcceptPolicy: - set cookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { - return _objc_msgSend_328( - this.pointer, _sel_setCookieAcceptPolicy_, value.value); - } - - /// sortedCookiesUsingDescriptors: - objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { - final _ret = _objc_msgSend_84( - 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_360(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, - task.pointer); - } - - /// getCookiesForTask:completionHandler: - void getCookiesForTask_completionHandler_( - NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { - _objc_msgSend_361(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); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSHTTPCookieStorage, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _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_318 = 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_319 = 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_320( - 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_321( - _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_322(_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_323( - _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_82(this.pointer, _sel_properties); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } - - /// version - int get version { - return _objc_msgSend_57(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_124(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_86(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); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSHTTPCookie, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _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_320 = 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_321 = 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_322 = 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_323 = 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"); -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_324 = 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_325 = 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_326 = 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_327 = 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_328 = 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.NSObject { - NSURLSessionTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(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); - } - - /// taskIdentifier - int get taskIdentifier { - return _objc_msgSend_57(this.pointer, _sel_taskIdentifier); - } - - /// originalRequest - NSURLRequest? get originalRequest { - final _ret = _objc_msgSend_352(this.pointer, _sel_originalRequest); - return _ret.address == 0 - ? null - : NSURLRequest.castFromPointer(_ret, retain: true, release: true); - } - - /// currentRequest - NSURLRequest? get currentRequest { - final _ret = _objc_msgSend_352(this.pointer, _sel_currentRequest); - return _ret.address == 0 - ? null - : NSURLRequest.castFromPointer(_ret, retain: true, release: true); - } - - /// response - NSURLResponse? get response { - final _ret = _objc_msgSend_355(this.pointer, _sel_response); - return _ret.address == 0 - ? null - : NSURLResponse.castFromPointer(_ret, retain: true, release: true); - } - - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(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_200( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - /// progress - NSProgress get progress { - final _ret = _objc_msgSend_356(this.pointer, _sel_progress); - return NSProgress.castFromPointer(_ret, retain: true, release: true); - } - - /// earliestBeginDate - objc.NSDate? get earliestBeginDate { - final _ret = _objc_msgSend_124(this.pointer, _sel_earliestBeginDate); - return _ret.address == 0 - ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); - } - - /// setEarliestBeginDate: - set earliestBeginDate(objc.NSDate? value) { - return _objc_msgSend_170(this.pointer, _sel_setEarliestBeginDate_, - value?.pointer ?? ffi.nullptr); - } - - /// countOfBytesClientExpectsToSend - int get countOfBytesClientExpectsToSend { - return _objc_msgSend_9(this.pointer, _sel_countOfBytesClientExpectsToSend); - } - - /// setCountOfBytesClientExpectsToSend: - set countOfBytesClientExpectsToSend(int value) { - return _objc_msgSend_10( - this.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); - } - - /// countOfBytesClientExpectsToReceive - int get countOfBytesClientExpectsToReceive { - return _objc_msgSend_9( - this.pointer, _sel_countOfBytesClientExpectsToReceive); - } - - /// setCountOfBytesClientExpectsToReceive: - set countOfBytesClientExpectsToReceive(int value) { - return _objc_msgSend_10( - this.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); - } - - /// countOfBytesSent - int get countOfBytesSent { - return _objc_msgSend_9(this.pointer, _sel_countOfBytesSent); - } - - /// countOfBytesReceived - int get countOfBytesReceived { - return _objc_msgSend_9(this.pointer, _sel_countOfBytesReceived); - } - - /// countOfBytesExpectedToSend - int get countOfBytesExpectedToSend { - return _objc_msgSend_9(this.pointer, _sel_countOfBytesExpectedToSend); - } - - /// countOfBytesExpectedToReceive - int get countOfBytesExpectedToReceive { - return _objc_msgSend_9(this.pointer, _sel_countOfBytesExpectedToReceive); - } - - /// taskDescription - objc.NSString? get taskDescription { - final _ret = _objc_msgSend_20(this.pointer, _sel_taskDescription); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// setTaskDescription: - set taskDescription(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setTaskDescription_, value?.pointer ?? ffi.nullptr); - } - - /// cancel - void cancel() { - _objc_msgSend_7(this.pointer, _sel_cancel); - } - - /// state - NSURLSessionTaskState get state { - final _ret = _objc_msgSend_357(this.pointer, _sel_state); - return NSURLSessionTaskState.fromValue(_ret); - } - - /// error - objc.NSError? get error { - final _ret = _objc_msgSend_341(this.pointer, _sel_error); - return _ret.address == 0 - ? null - : objc.NSError.castFromPointer(_ret, retain: true, release: true); - } - - /// suspend - void suspend() { - _objc_msgSend_7(this.pointer, _sel_suspend); - } - - /// resume - void resume() { - _objc_msgSend_7(this.pointer, _sel_resume); - } - - /// priority - double get priority { - return objc.useMsgSendVariants - ? _objc_msgSend_358Fpret(this.pointer, _sel_priority) - : _objc_msgSend_358(this.pointer, _sel_priority); - } - - /// setPriority: - set priority(double value) { - return _objc_msgSend_359(this.pointer, _sel_setPriority_, value); - } - - /// prefersIncrementalDelivery - bool get prefersIncrementalDelivery { - return _objc_msgSend_13(this.pointer, _sel_prefersIncrementalDelivery); - } - - /// setPrefersIncrementalDelivery: - set prefersIncrementalDelivery(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setPrefersIncrementalDelivery_, value); - } - - /// init - NSURLSessionTask init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); - } - - /// new - static NSURLSessionTask new1() { - final _ret = _objc_msgSend_19(_class_NSURLSessionTask, _sel_new); - return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); - } - - /// allocWithZone: - static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSURLSessionTask, _sel_allocWithZone_, zone); - return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); - } - - /// alloc - static NSURLSessionTask alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSessionTask, _sel_alloc); - return NSURLSessionTask.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_NSURLSessionTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); - } - - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSURLSessionTask, _sel_useStoredAccessor); - } - - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionTask, - _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_NSURLSessionTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLSessionTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } -} - -late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); -late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); - -/// 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_329( - _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_330( - _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_329(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_330( - 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_331(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_332(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_333(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_82(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_42( - 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_334(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_351(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); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLRequest, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _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_329 = 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_330 = 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_URL = objc.registerName("URL"); -late final _sel_cachePolicy = objc.registerName("cachePolicy"); -final _objc_msgSend_331 = 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_332 = 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_333 = 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_334 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -/// NSInputStream -class NSInputStream extends NSStream { - NSInputStream._(ffi.Pointer 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 [NSInputStream] that points to the same underlying object as [other]. - NSInputStream.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSIndexPath] that points to the same underlying object as [other]. + NSIndexPath.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSInputStream] that wraps the given raw object pointer. - NSInputStream.castFromPointer(ffi.Pointer other, + /// 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 [NSInputStream]. + /// Returns whether [obj] is an instance of [NSIndexPath]. 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_335(this.pointer, _sel_read_maxLength_, buffer, len); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSIndexPath); } - /// getBuffer:length: - bool getBuffer_length_(ffi.Pointer> buffer, - ffi.Pointer len) { - return _objc_msgSend_336(this.pointer, _sel_getBuffer_length_, buffer, len); + /// indexPathWithIndex: + static NSIndexPath indexPathWithIndex_(int index) { + final _ret = _objc_msgSend_ehxl2g( + _class_NSIndexPath, _sel_indexPathWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - /// hasBytesAvailable - bool get hasBytesAvailable { - return _objc_msgSend_13(this.pointer, _sel_hasBytesAvailable); + /// indexPathWithIndexes:length: + static NSIndexPath indexPathWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_1educny( + _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - /// initWithData: - NSInputStream initWithData_(objc.NSData data) { - final _ret = - _objc_msgSend_337(this.pointer, _sel_initWithData_, data.pointer); - return NSInputStream.castFromPointer(_ret, retain: true, release: true); + /// initWithIndexes:length: + NSIndexPath initWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_1educny(this.ref.retainAndReturnPointer(), + _sel_initWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - /// initWithURL: - NSInputStream? initWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_36(this.pointer, _sel_initWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSInputStream.castFromPointer(_ret, retain: true, release: true); + /// initWithIndex: + NSIndexPath initWithIndex_(int index) { + final _ret = _objc_msgSend_ehxl2g( + this.ref.retainAndReturnPointer(), _sel_initWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - /// initWithFileAtPath: - NSInputStream? initWithFileAtPath_(objc.NSString path) { - final _ret = - _objc_msgSend_35(this.pointer, _sel_initWithFileAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSInputStream.castFromPointer(_ret, retain: true, release: true); + /// indexPathByAddingIndex: + NSIndexPath indexPathByAddingIndex_(int index) { + final _ret = _objc_msgSend_ehxl2g( + this.ref.pointer, _sel_indexPathByAddingIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - /// inputStreamWithData: - static NSInputStream? inputStreamWithData_(objc.NSData data) { - final _ret = _objc_msgSend_338( - _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); - return _ret.address == 0 - ? null - : NSInputStream.castFromPointer(_ret, retain: true, release: true); + /// indexPathByRemovingLastIndex + NSIndexPath indexPathByRemovingLastIndex() { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_indexPathByRemovingLastIndex); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - /// inputStreamWithFileAtPath: - static NSInputStream? inputStreamWithFileAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_35( - _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSInputStream.castFromPointer(_ret, retain: true, release: true); + /// indexAtPosition: + int indexAtPosition_(int position) { + return _objc_msgSend_1eigyr6( + this.ref.pointer, _sel_indexAtPosition_, position); } - /// inputStreamWithURL: - static NSInputStream? inputStreamWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_36( - _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSInputStream.castFromPointer(_ret, retain: true, release: true); + /// length + int get length { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_length); } - /// getStreamsToHostWithName:port:inputStream:outputStream: - static void getStreamsToHostWithName_port_inputStream_outputStream_( - objc.NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_345( - _class_NSInputStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); + /// getIndexes:range: + void getIndexes_range_( + ffi.Pointer indexes, objc.NSRange positionRange) { + _objc_msgSend_oxe0mk( + this.ref.pointer, _sel_getIndexes_range_, indexes, positionRange); } - /// getStreamsToHost:port:inputStream:outputStream: - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_349( - _class_NSInputStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); + /// compare: + objc.NSComparisonResult compare_(NSIndexPath otherObject) { + final _ret = _objc_msgSend_1ile2ev( + this.ref.pointer, _sel_compare_, otherObject.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); } - /// getBoundStreamsWithBufferSize:inputStream:outputStream: - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_350( - _class_NSInputStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); + /// getIndexes: + void getIndexes_(ffi.Pointer indexes) { + _objc_msgSend_v7ntkj(this.ref.pointer, _sel_getIndexes_, indexes); } /// init - NSInputStream init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSInputStream.castFromPointer(_ret, retain: true, release: true); + NSIndexPath init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// new - static NSInputStream new1() { - final _ret = _objc_msgSend_19(_class_NSInputStream, _sel_new); - return NSInputStream.castFromPointer(_ret, retain: false, release: true); + static NSIndexPath new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSIndexPath, _sel_new); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSInputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSInputStream, _sel_allocWithZone_, zone); - return NSInputStream.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSIndexPath, _sel_allocWithZone_, zone); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSInputStream alloc() { - final _ret = _objc_msgSend_19(_class_NSInputStream, _sel_alloc); - return NSInputStream.castFromPointer(_ret, retain: false, release: true); + static NSIndexPath alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSIndexPath, _sel_alloc); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -17013,277 +17839,178 @@ class NSInputStream extends NSStream { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSInputStream, + _objc_msgSend_cqxsqq( + _class_NSIndexPath, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSInputStream, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSInputStream, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSInputStream, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSIndexPath, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSInputStream, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSIndexPath, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSInputStream, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSIndexPath, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSInputStream, + _objc_msgSend_1tjlcwl( + _class_NSIndexPath, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSInputStream, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = - _objc_msgSend_19(_class_NSInputStream, _sel_classForKeyedUnarchiver); + _objc_msgSend_1unuoxw(_class_NSIndexPath, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_NSInputStream = objc.getClass("NSInputStream"); -late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); -final _objc_msgSend_335 = 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_336 = 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_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_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); -late final _sel_inputStreamWithData_ = - objc.registerName("inputStreamWithData:"); -final _objc_msgSend_338 = 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:"); - -/// 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); + /// self + NSIndexPath self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - /// open - void open() { - _objc_msgSend_7(this.pointer, _sel_open); + /// retain + NSIndexPath retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - /// close - void close() { - _objc_msgSend_7(this.pointer, _sel_close); + /// autorelease + NSIndexPath autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSIndexPath, _sel_supportsSecureCoding); } - /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } - /// propertyForKey: - objc.ObjCObjectBase? propertyForKey_(objc.NSString key) { - final _ret = - _objc_msgSend_35(this.pointer, _sel_propertyForKey_, key.pointer); + /// initWithCoder: + NSIndexPath? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : NSIndexPath.castFromPointer(_ret, retain: false, release: true); } +} - /// setProperty:forKey: - bool setProperty_forKey_(objc.ObjCObjectBase? property, objc.NSString key) { - return _objc_msgSend_339(this.pointer, _sel_setProperty_forKey_, - property?.pointer ?? ffi.nullptr, key.pointer); - } +late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); +late final _sel_automaticRule = objc.registerName("automaticRule"); +late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); +late final _sel_canInflectPreferredLocalization = + objc.registerName("canInflectPreferredLocalization"); - /// scheduleInRunLoop:forMode: - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { - _objc_msgSend_227(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); - } +/// NSInflectionRule +class NSInflectionRule extends objc.NSObject { + NSInflectionRule._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// removeFromRunLoop:forMode: - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { - _objc_msgSend_227(this.pointer, _sel_removeFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); - } + /// Constructs a [NSInflectionRule] that points to the same underlying object as [other]. + NSInflectionRule.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// streamStatus - NSStreamStatus get streamStatus { - final _ret = _objc_msgSend_340(this.pointer, _sel_streamStatus); - return NSStreamStatus.fromValue(_ret); - } + /// 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); - /// streamError - objc.NSError? get streamError { - final _ret = _objc_msgSend_341(this.pointer, _sel_streamError); - return _ret.address == 0 - ? null - : objc.NSError.castFromPointer(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSInflectionRule]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); } - /// getStreamsToHostWithName:port:inputStream:outputStream: - static void getStreamsToHostWithName_port_inputStream_outputStream_( - objc.NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_345( - _class_NSStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); + /// init + NSInflectionRule init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - /// getStreamsToHost:port:inputStream:outputStream: - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_349( - _class_NSStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); + /// automaticRule + static NSInflectionRule getAutomaticRule() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSInflectionRule, _sel_automaticRule); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } - /// getBoundStreamsWithBufferSize:inputStream:outputStream: - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_350( - _class_NSStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); + /// canInflectLanguage: + static bool canInflectLanguage_(objc.NSString language) { + return _objc_msgSend_l8lotg(_class_NSInflectionRule, + _sel_canInflectLanguage_, language.ref.pointer); } - /// init - NSStream init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSStream.castFromPointer(_ret, retain: true, release: true); + /// canInflectPreferredLocalization + static bool getCanInflectPreferredLocalization() { + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_canInflectPreferredLocalization); } /// new - static NSStream new1() { - final _ret = _objc_msgSend_19(_class_NSStream, _sel_new); - return NSStream.castFromPointer(_ret, retain: false, release: true); + static NSInflectionRule new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSInflectionRule, _sel_new); + return NSInflectionRule.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); + static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSInflectionRule, _sel_allocWithZone_, zone); + return NSInflectionRule.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); + static NSInflectionRule alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSInflectionRule, _sel_alloc); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -17291,118 +18018,297 @@ class NSStream extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSStream, + _objc_msgSend_cqxsqq( + _class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSStream, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSInflectionRule, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSStream, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSStream, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSStream, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSInflectionRule, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSInflectionRule, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSStream, + _objc_msgSend_1tjlcwl( + _class_NSInflectionRule, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSStream, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSInflectionRule, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSInflectionRule, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSInflectionRule self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSInflectionRule retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSInflectionRule autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSInflectionRule? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSInflectionRule.castFromPointer(_ret, retain: false, 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_y3dgf1 = 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_12a9bks = 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_vk5e30 = 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_1k6p0ib = 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 _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_339 = objc.msgSendPointer +late final _sel_number = objc.registerName("number"); +final _objc_msgSend_1lu1qy9 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumber_ = objc.registerName("setNumber:"); +final _objc_msgSend_kwz1vc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -enum NSStreamStatus { - NSStreamStatusNotOpen(0), - NSStreamStatusOpening(1), - NSStreamStatusOpen(2), - NSStreamStatusReading(3), - NSStreamStatusWriting(4), - NSStreamStatusAtEnd(5), - NSStreamStatusClosed(6), - NSStreamStatusError(7); +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 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"), + 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_streamStatus = objc.registerName("streamStatus"); -final _objc_msgSend_340 = objc.msgSendPointer +late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); +final _objc_msgSend_1xz5l6 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, @@ -17410,352 +18316,318 @@ final _objc_msgSend_340 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_streamError = objc.registerName("streamError"); -final _objc_msgSend_341 = objc.msgSendPointer +late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); +final _objc_msgSend_erklvx = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - -/// 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_335(this.pointer, _sel_write_maxLength_, buffer, len); - } - - /// hasSpaceAvailable - bool get hasSpaceAvailable { - return _objc_msgSend_13(this.pointer, _sel_hasSpaceAvailable); - } + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// initToMemory - NSOutputStream initToMemory() { - final _ret = _objc_msgSend_19(this.pointer, _sel_initToMemory); - return NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } +enum NSGrammaticalDetermination { + NSGrammaticalDeterminationNotSet(0), + NSGrammaticalDeterminationIndependent(1), + NSGrammaticalDeterminationDependent(2); - /// initToBuffer:capacity: - NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_342( - this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); - return NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSGrammaticalDetermination(this.value); - /// initWithURL:append: - NSOutputStream? initWithURL_append_(objc.NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_343( - this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } + static NSGrammaticalDetermination fromValue(int value) => switch (value) { + 0 => NSGrammaticalDeterminationNotSet, + 1 => NSGrammaticalDeterminationIndependent, + 2 => NSGrammaticalDeterminationDependent, + _ => throw ArgumentError( + "Unknown value for NSGrammaticalDetermination: $value"), + }; +} - /// initToFileAtPath:append: - NSOutputStream? initToFileAtPath_append_( - objc.NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_344(this.pointer, _sel_initToFileAtPath_append_, - path.pointer, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_determination = objc.registerName("determination"); +final _objc_msgSend_18c2fg3 = 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_ug05wa = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// outputStreamToMemory - static NSOutputStream outputStreamToMemory() { - final _ret = - _objc_msgSend_19(_class_NSOutputStream, _sel_outputStreamToMemory); - return NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } +enum NSGrammaticalPerson { + NSGrammaticalPersonNotSet(0), + NSGrammaticalPersonFirst(1), + NSGrammaticalPersonSecond(2), + NSGrammaticalPersonThird(3); - /// outputStreamToBuffer:capacity: - static NSOutputStream outputStreamToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_342(_class_NSOutputStream, - _sel_outputStreamToBuffer_capacity_, buffer, capacity); - return NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSGrammaticalPerson(this.value); - /// outputStreamToFileAtPath:append: - static NSOutputStream outputStreamToFileAtPath_append_( - objc.NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_172(_class_NSOutputStream, - _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); - return NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } + static NSGrammaticalPerson fromValue(int value) => switch (value) { + 0 => NSGrammaticalPersonNotSet, + 1 => NSGrammaticalPersonFirst, + 2 => NSGrammaticalPersonSecond, + 3 => NSGrammaticalPersonThird, + _ => + throw ArgumentError("Unknown value for NSGrammaticalPerson: $value"), + }; +} - /// outputStreamWithURL:append: - static NSOutputStream? outputStreamWithURL_append_( - objc.NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_343(_class_NSOutputStream, - _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); +final _objc_msgSend_1ffoin9 = 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_ae3g2g = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// getStreamsToHostWithName:port:inputStream:outputStream: - static void getStreamsToHostWithName_port_inputStream_outputStream_( - objc.NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_345( - _class_NSOutputStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); - } +enum NSGrammaticalPronounType { + NSGrammaticalPronounTypeNotSet(0), + NSGrammaticalPronounTypePersonal(1), + NSGrammaticalPronounTypeReflexive(2), + NSGrammaticalPronounTypePossessive(3); - /// getStreamsToHost:port:inputStream:outputStream: - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_349( - _class_NSOutputStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); - } + final int value; + const NSGrammaticalPronounType(this.value); - /// getBoundStreamsWithBufferSize:inputStream:outputStream: - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_350( - _class_NSOutputStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); - } + static NSGrammaticalPronounType fromValue(int value) => switch (value) { + 0 => NSGrammaticalPronounTypeNotSet, + 1 => NSGrammaticalPronounTypePersonal, + 2 => NSGrammaticalPronounTypeReflexive, + 3 => NSGrammaticalPronounTypePossessive, + _ => throw ArgumentError( + "Unknown value for NSGrammaticalPronounType: $value"), + }; } -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_342 = objc.msgSendPointer +late final _sel_pronounType = objc.registerName("pronounType"); +final _objc_msgSend_17hihkj = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); -final _objc_msgSend_343 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPronounType_ = objc.registerName("setPronounType:"); +final _objc_msgSend_1trhr2m = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_initToFileAtPath_append_ = - objc.registerName("initToFileAtPath:append:"); -final _objc_msgSend_344 = objc.msgSendPointer + 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_gnbhg7 = 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:"); -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_345 = objc.msgSendPointer + 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_vbzknq = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>, - ffi.Pointer>)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _class_NSMorphologyCustomPronoun = + objc.getClass("NSMorphologyCustomPronoun"); +late final _sel_isSupportedForLanguage_ = + objc.registerName("isSupportedForLanguage:"); +late final _sel_requiredKeysForLanguage_ = + objc.registerName("requiredKeysForLanguage:"); +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:"); -/// NSHost -class NSHost extends objc.NSObject { - NSHost._(ffi.Pointer pointer, +/// 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 [NSHost] that points to the same underlying object as [other]. - NSHost.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. + NSMorphologyCustomPronoun.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSHost] that wraps the given raw object pointer. - NSHost.castFromPointer(ffi.Pointer other, + /// 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 [NSHost]. + /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSHost); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); } - /// currentHost - static NSHost currentHost() { - final _ret = _objc_msgSend_19(_class_NSHost, _sel_currentHost); - return NSHost.castFromPointer(_ret, retain: true, release: true); + /// isSupportedForLanguage: + static bool isSupportedForLanguage_(objc.NSString language) { + return _objc_msgSend_l8lotg(_class_NSMorphologyCustomPronoun, + _sel_isSupportedForLanguage_, language.ref.pointer); } - /// hostWithName: - static NSHost hostWithName_(objc.NSString? name) { - final _ret = _objc_msgSend_346( - _class_NSHost, _sel_hostWithName_, name?.pointer ?? ffi.nullptr); - return NSHost.castFromPointer(_ret, retain: true, release: true); + /// requiredKeysForLanguage: + static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_juohf7(_class_NSMorphologyCustomPronoun, + _sel_requiredKeysForLanguage_, language.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// hostWithAddress: - static NSHost hostWithAddress_(objc.NSString address) { - final _ret = - _objc_msgSend_63(_class_NSHost, _sel_hostWithAddress_, address.pointer); - return NSHost.castFromPointer(_ret, retain: true, release: true); + /// subjectForm + objc.NSString? get subjectForm { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_subjectForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// isEqualToHost: - bool isEqualToHost_(NSHost aHost) { - return _objc_msgSend_347(this.pointer, _sel_isEqualToHost_, aHost.pointer); + /// setSubjectForm: + set subjectForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSubjectForm_, + value?.ref.pointer ?? ffi.nullptr); } - /// name - objc.NSString? get name { - final _ret = _objc_msgSend_20(this.pointer, _sel_name); + /// objectForm + objc.NSString? get objectForm { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_objectForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// names - objc.NSArray get names { - final _ret = _objc_msgSend_33(this.pointer, _sel_names); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// setObjectForm: + set objectForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setObjectForm_, + value?.ref.pointer ?? ffi.nullptr); } - /// address - objc.NSString? get address { - final _ret = _objc_msgSend_20(this.pointer, _sel_address); + /// possessiveForm + objc.NSString? get possessiveForm { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_possessiveForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// addresses - objc.NSArray get addresses { - final _ret = _objc_msgSend_33(this.pointer, _sel_addresses); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// setPossessiveForm: + set possessiveForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPossessiveForm_, + value?.ref.pointer ?? ffi.nullptr); } - /// localizedName - objc.NSString? get localizedName { - final _ret = _objc_msgSend_20(this.pointer, _sel_localizedName); + /// possessiveAdjectiveForm + objc.NSString? get possessiveAdjectiveForm { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_possessiveAdjectiveForm); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setHostCacheEnabled: - static void setHostCacheEnabled_(bool flag) { - _objc_msgSend_348(_class_NSHost, _sel_setHostCacheEnabled_, flag); + /// setPossessiveAdjectiveForm: + set possessiveAdjectiveForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setPossessiveAdjectiveForm_, value?.ref.pointer ?? ffi.nullptr); } - /// isHostCacheEnabled - static bool isHostCacheEnabled() { - return _objc_msgSend_13(_class_NSHost, _sel_isHostCacheEnabled); + /// reflexiveForm + objc.NSString? get reflexiveForm { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_reflexiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// flushHostCache - static void flushHostCache() { - _objc_msgSend_7(_class_NSHost, _sel_flushHostCache); + /// setReflexiveForm: + set reflexiveForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setReflexiveForm_, + value?.ref.pointer ?? ffi.nullptr); } /// init - NSHost init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSHost.castFromPointer(_ret, retain: true, release: true); + NSMorphologyCustomPronoun init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSHost new1() { - final _ret = _objc_msgSend_19(_class_NSHost, _sel_new); - return NSHost.castFromPointer(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSMorphologyCustomPronoun, _sel_new); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: - static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28(_class_NSHost, _sel_allocWithZone_, zone); - return NSHost.castFromPointer(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } /// alloc - static NSHost alloc() { - final _ret = _objc_msgSend_19(_class_NSHost, _sel_alloc); - return NSHost.castFromPointer(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSMorphologyCustomPronoun, _sel_alloc); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -17763,269 +18635,295 @@ class NSHost extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSHost, + _objc_msgSend_cqxsqq( + _class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSHost, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSMorphologyCustomPronoun, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSHost, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSHost, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSHost, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMorphologyCustomPronoun, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31( - _class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSMorphologyCustomPronoun, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSMorphologyCustomPronoun, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSMorphologyCustomPronoun self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSMorphologyCustomPronoun retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSMorphologyCustomPronoun autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSMorphologyCustomPronoun, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSMorphologyCustomPronoun? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _sel_customPronounForLanguage_ = + objc.registerName("customPronounForLanguage:"); +late final _sel_setCustomPronoun_forLanguage_error_ = + objc.registerName("setCustomPronoun:forLanguage:error:"); +late final _sel_isUnspecified = objc.registerName("isUnspecified"); +late final _sel_userMorphology = objc.registerName("userMorphology"); + +/// 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.ref.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_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMorphology); + } + + /// grammaticalGender + NSGrammaticalGender get grammaticalGender { + final _ret = _objc_msgSend_y3dgf1(this.ref.pointer, _sel_grammaticalGender); + return NSGrammaticalGender.fromValue(_ret); + } + + /// setGrammaticalGender: + set grammaticalGender(NSGrammaticalGender value) { + return _objc_msgSend_12a9bks( + this.ref.pointer, _sel_setGrammaticalGender_, value.value); + } + + /// partOfSpeech + NSGrammaticalPartOfSpeech get partOfSpeech { + final _ret = _objc_msgSend_vk5e30(this.ref.pointer, _sel_partOfSpeech); + return NSGrammaticalPartOfSpeech.fromValue(_ret); + } + + /// setPartOfSpeech: + set partOfSpeech(NSGrammaticalPartOfSpeech value) { + return _objc_msgSend_1k6p0ib( + this.ref.pointer, _sel_setPartOfSpeech_, value.value); + } + + /// number + NSGrammaticalNumber get number { + final _ret = _objc_msgSend_1lu1qy9(this.ref.pointer, _sel_number); + return NSGrammaticalNumber.fromValue(_ret); + } + + /// setNumber: + set number(NSGrammaticalNumber value) { + return _objc_msgSend_kwz1vc(this.ref.pointer, _sel_setNumber_, value.value); + } + + /// grammaticalCase + NSGrammaticalCase get grammaticalCase { + final _ret = _objc_msgSend_1xz5l6(this.ref.pointer, _sel_grammaticalCase); + return NSGrammaticalCase.fromValue(_ret); + } + + /// setGrammaticalCase: + set grammaticalCase(NSGrammaticalCase value) { + return _objc_msgSend_erklvx( + this.ref.pointer, _sel_setGrammaticalCase_, value.value); + } + + /// determination + NSGrammaticalDetermination get determination { + final _ret = _objc_msgSend_18c2fg3(this.ref.pointer, _sel_determination); + return NSGrammaticalDetermination.fromValue(_ret); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSHost, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// setDetermination: + set determination(NSGrammaticalDetermination value) { + return _objc_msgSend_ug05wa( + this.ref.pointer, _sel_setDetermination_, value.value); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { + /// grammaticalPerson + NSGrammaticalPerson get grammaticalPerson { final _ret = - _objc_msgSend_33(_class_NSHost, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + _objc_msgSend_1ffoin9(this.ref.pointer, _sel_grammaticalPerson); + return NSGrammaticalPerson.fromValue(_ret); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19(_class_NSHost, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setGrammaticalPerson: + set grammaticalPerson(NSGrammaticalPerson value) { + return _objc_msgSend_ae3g2g( + this.ref.pointer, _sel_setGrammaticalPerson_, value.value); } -} - -late final _class_NSHost = objc.getClass("NSHost"); -late final _sel_currentHost = objc.registerName("currentHost"); -late final _sel_hostWithName_ = objc.registerName("hostWithName:"); -final _objc_msgSend_346 = 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_hostWithAddress_ = objc.registerName("hostWithAddress:"); -late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); -final _objc_msgSend_347 = 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_names = objc.registerName("names"); -late final _sel_address = objc.registerName("address"); -late final _sel_addresses = objc.registerName("addresses"); -late final _sel_localizedName = objc.registerName("localizedName"); -late final _sel_setHostCacheEnabled_ = - objc.registerName("setHostCacheEnabled:"); -final _objc_msgSend_348 = 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_isHostCacheEnabled = objc.registerName("isHostCacheEnabled"); -late final _sel_flushHostCache = objc.registerName("flushHostCache"); -late final _sel_getStreamsToHost_port_inputStream_outputStream_ = - objc.registerName("getStreamsToHost:port:inputStream:outputStream:"); -final _objc_msgSend_349 = 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_350 = 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>)>(); -late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); -final _objc_msgSend_351 = 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_originalRequest = objc.registerName("originalRequest"); -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_currentRequest = objc.registerName("currentRequest"); - -/// 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); + /// pronounType + NSGrammaticalPronounType get pronounType { + final _ret = _objc_msgSend_17hihkj(this.ref.pointer, _sel_pronounType); + return NSGrammaticalPronounType.fromValue(_ret); + } - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); + /// setPronounType: + set pronounType(NSGrammaticalPronounType value) { + return _objc_msgSend_1trhr2m( + this.ref.pointer, _sel_setPronounType_, value.value); } - /// initWithURL:MIMEType:expectedContentLength:textEncodingName: - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - objc.NSURL URL, - objc.NSString? MIMEType, - int length, - objc.NSString? name) { - final _ret = _objc_msgSend_353( - 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); + /// definiteness + NSGrammaticalDefiniteness get definiteness { + final _ret = _objc_msgSend_gnbhg7(this.ref.pointer, _sel_definiteness); + return NSGrammaticalDefiniteness.fromValue(_ret); } - /// 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); + /// setDefiniteness: + set definiteness(NSGrammaticalDefiniteness value) { + return _objc_msgSend_vbzknq( + this.ref.pointer, _sel_setDefiniteness_, value.value); } - /// MIMEType - objc.NSString? get MIMEType { - final _ret = _objc_msgSend_20(this.pointer, _sel_MIMEType); + /// customPronounForLanguage: + NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_customPronounForLanguage_, language.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - /// expectedContentLength - int get expectedContentLength { - return _objc_msgSend_354(this.pointer, _sel_expectedContentLength); + /// setCustomPronoun:forLanguage:error: + bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, + objc.NSString language, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_setCustomPronoun_forLanguage_error_, + features?.ref.pointer ?? ffi.nullptr, + language.ref.pointer, + error); } - /// 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); + /// isUnspecified + bool get unspecified { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isUnspecified); } - /// 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); + /// userMorphology + static NSMorphology getUserMorphology() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSMorphology, _sel_userMorphology); + return NSMorphology.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); + NSMorphology init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } /// new - static NSURLResponse new1() { - final _ret = _objc_msgSend_19(_class_NSURLResponse, _sel_new); - return NSURLResponse.castFromPointer(_ret, retain: false, release: true); + static NSMorphology new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSMorphology, _sel_new); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSURLResponse, _sel_allocWithZone_, zone); - return NSURLResponse.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSMorphology, _sel_allocWithZone_, zone); + return NSMorphology.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); + static NSMorphology alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSMorphology, _sel_alloc); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -18033,454 +18931,392 @@ class NSURLResponse extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLResponse, + _objc_msgSend_cqxsqq( + _class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLResponse, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSMorphology, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSMorphology, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSURLResponse, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSMorphology, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLResponse, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMorphology, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSMorphology, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLResponse, + _objc_msgSend_1tjlcwl( + _class_NSMorphology, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphology, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphology, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSMorphology self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSMorphology retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSMorphology autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSMorphology, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSMorphology? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMorphology.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); +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:"); +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 _class_NSURLResponse = objc.getClass("NSURLResponse"); -late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = - objc.registerName( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); -final _objc_msgSend_353 = 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_354 = objc.msgSendPointer +late final _sel_queuePriority = objc.registerName("queuePriority"); +final _objc_msgSend_10n15g8 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, + ffi.Long 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_response = objc.registerName("response"); -final _objc_msgSend_355 = objc.msgSendPointer +late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); +final _objc_msgSend_d8yjnr = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_progress = objc.registerName("progress"); -final _objc_msgSend_356 = objc.msgSendPointer + 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:"); +final _objc_msgSend_suh039 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); -late final _sel_setEarliestBeginDate_ = - objc.registerName("setEarliestBeginDate:"); -late final _sel_countOfBytesClientExpectsToSend = - objc.registerName("countOfBytesClientExpectsToSend"); -late final _sel_setCountOfBytesClientExpectsToSend_ = - objc.registerName("setCountOfBytesClientExpectsToSend:"); -late final _sel_countOfBytesClientExpectsToReceive = - objc.registerName("countOfBytesClientExpectsToReceive"); -late final _sel_setCountOfBytesClientExpectsToReceive_ = - objc.registerName("setCountOfBytesClientExpectsToReceive:"); -late final _sel_countOfBytesSent = objc.registerName("countOfBytesSent"); -late final _sel_countOfBytesReceived = - objc.registerName("countOfBytesReceived"); -late final _sel_countOfBytesExpectedToSend = - objc.registerName("countOfBytesExpectedToSend"); -late final _sel_countOfBytesExpectedToReceive = - objc.registerName("countOfBytesExpectedToReceive"); -late final _sel_taskDescription = objc.registerName("taskDescription"); -late final _sel_setTaskDescription_ = objc.registerName("setTaskDescription:"); + void Function(ffi.Pointer, + ffi.Pointer, double)>(); -enum NSURLSessionTaskState { - NSURLSessionTaskStateRunning(0), - NSURLSessionTaskStateSuspended(1), - NSURLSessionTaskStateCanceling(2), - NSURLSessionTaskStateCompleted(3); +enum NSQualityOfService { + NSQualityOfServiceUserInteractive(33), + NSQualityOfServiceUserInitiated(25), + NSQualityOfServiceUtility(17), + NSQualityOfServiceBackground(9), + NSQualityOfServiceDefault(-1); final int value; - const NSURLSessionTaskState(this.value); + const NSQualityOfService(this.value); - static NSURLSessionTaskState fromValue(int value) => switch (value) { - 0 => NSURLSessionTaskStateRunning, - 1 => NSURLSessionTaskStateSuspended, - 2 => NSURLSessionTaskStateCanceling, - 3 => NSURLSessionTaskStateCompleted, - _ => throw ArgumentError( - "Unknown value for NSURLSessionTaskState: $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_state = objc.registerName("state"); -final _objc_msgSend_357 = objc.msgSendPointer +late final _sel_qualityOfService = objc.registerName("qualityOfService"); +final _objc_msgSend_17dnyeh = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Long Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_error = objc.registerName("error"); -late final _sel_suspend = objc.registerName("suspend"); -late final _sel_priority = objc.registerName("priority"); -final _objc_msgSend_358 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_358Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPriority_ = objc.registerName("setPriority:"); -final _objc_msgSend_359 = objc.msgSendPointer +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_1fcr8u4 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>() + ffi.Pointer, ffi.Long)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, double)>(); -late final _sel_prefersIncrementalDelivery = - objc.registerName("prefersIncrementalDelivery"); -late final _sel_setPrefersIncrementalDelivery_ = - objc.registerName("setPrefersIncrementalDelivery:"); -late final _sel_storeCookies_forTask_ = - objc.registerName("storeCookies:forTask:"); -final _objc_msgSend_360 = 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); + ffi.Pointer, int)>(); +late final _sel_setName_ = objc.registerName("setName:"); -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); +/// NSOperation +class NSOperation extends objc.NSObject { + NSOperation._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(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); + /// Constructs a [NSOperation] that points to the same underlying object as [other]. + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperation); } - /// 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; + /// start + void start() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_start); + } - /// 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; + /// main + void main() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_main); + } - /// 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; + /// isCancelled + bool get cancelled { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); + } - 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); -} + /// cancel + void cancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); + } -late final _sel_getCookiesForTask_completionHandler_ = - objc.registerName("getCookiesForTask:completionHandler:"); -final _objc_msgSend_361 = 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)>(); + /// isExecuting + bool get executing { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isExecuting); + } -/// NSIndexPath -class NSIndexPath extends objc.NSObject { - NSIndexPath._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// isFinished + bool get finished { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); + } + + /// isConcurrent + bool get concurrent { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isConcurrent); + } + + /// isAsynchronous + bool get asynchronous { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isAsynchronous); + } - /// Constructs a [NSIndexPath] that points to the same underlying object as [other]. - NSIndexPath.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// isReady + bool get ready { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isReady); + } - /// 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); + /// addDependency: + void addDependency_(NSOperation op) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addDependency_, op.ref.pointer); + } - /// Returns whether [obj] is an instance of [NSIndexPath]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); + /// removeDependency: + void removeDependency_(NSOperation op) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeDependency_, op.ref.pointer); } - /// indexPathWithIndex: - static NSIndexPath indexPathWithIndex_(int index) { - final _ret = - _objc_msgSend_362(_class_NSIndexPath, _sel_indexPathWithIndex_, index); - return NSIndexPath.castFromPointer(_ret, retain: true, release: true); + /// dependencies + objc.NSArray get dependencies { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dependencies); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// indexPathWithIndexes:length: - static NSIndexPath indexPathWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _objc_msgSend_363( - _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); - return NSIndexPath.castFromPointer(_ret, retain: true, release: true); + /// queuePriority + NSOperationQueuePriority get queuePriority { + final _ret = _objc_msgSend_10n15g8(this.ref.pointer, _sel_queuePriority); + return NSOperationQueuePriority.fromValue(_ret); } - /// initWithIndexes:length: - NSIndexPath initWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _objc_msgSend_363( - this.pointer, _sel_initWithIndexes_length_, indexes, length); - return NSIndexPath.castFromPointer(_ret, retain: true, release: true); + /// setQueuePriority: + set queuePriority(NSOperationQueuePriority value) { + return _objc_msgSend_d8yjnr( + this.ref.pointer, _sel_setQueuePriority_, value.value); } - /// initWithIndex: - NSIndexPath initWithIndex_(int index) { - final _ret = _objc_msgSend_362(this.pointer, _sel_initWithIndex_, index); - return NSIndexPath.castFromPointer(_ret, retain: true, release: true); + /// completionBlock + objc.ObjCBlock? get completionBlock { + final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_completionBlock); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - /// indexPathByAddingIndex: - NSIndexPath indexPathByAddingIndex_(int index) { - final _ret = - _objc_msgSend_364(this.pointer, _sel_indexPathByAddingIndex_, index); - return NSIndexPath.castFromPointer(_ret, retain: true, release: true); + /// setCompletionBlock: + set completionBlock(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCompletionBlock_, + value?.ref.pointer ?? ffi.nullptr); } - /// indexPathByRemovingLastIndex - NSIndexPath indexPathByRemovingLastIndex() { - final _ret = - _objc_msgSend_365(this.pointer, _sel_indexPathByRemovingLastIndex); - return NSIndexPath.castFromPointer(_ret, retain: true, release: true); + /// waitUntilFinished + void waitUntilFinished() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); } - /// indexAtPosition: - int indexAtPosition_(int position) { - return _objc_msgSend_366(this.pointer, _sel_indexAtPosition_, position); + /// threadPriority + double get threadPriority { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_threadPriority) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_threadPriority); } - /// length - int get length { - return _objc_msgSend_57(this.pointer, _sel_length); + /// setThreadPriority: + set threadPriority(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setThreadPriority_, value); } - /// getIndexes:range: - void getIndexes_range_( - ffi.Pointer indexes, _NSRange positionRange) { - _objc_msgSend_367( - this.pointer, _sel_getIndexes_range_, indexes, positionRange); + /// qualityOfService + NSQualityOfService get qualityOfService { + final _ret = _objc_msgSend_17dnyeh(this.ref.pointer, _sel_qualityOfService); + return NSQualityOfService.fromValue(_ret); } - /// compare: - objc.NSComparisonResult compare_(NSIndexPath otherObject) { - final _ret = - _objc_msgSend_368(this.pointer, _sel_compare_, otherObject.pointer); - return objc.NSComparisonResult.fromValue(_ret); + /// setQualityOfService: + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); } - /// getIndexes: - void getIndexes_(ffi.Pointer indexes) { - _objc_msgSend_369(this.pointer, _sel_getIndexes_, indexes); + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.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_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } /// init - NSIndexPath init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSIndexPath.castFromPointer(_ret, retain: true, release: true); + NSOperation init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } /// new - static NSIndexPath new1() { - final _ret = _objc_msgSend_19(_class_NSIndexPath, _sel_new); - return NSIndexPath.castFromPointer(_ret, retain: false, release: true); + static NSOperation new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_new); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSIndexPath, _sel_allocWithZone_, zone); - return NSIndexPath.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSOperation, _sel_allocWithZone_, zone); + return NSOperation.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); + static NSOperation alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_alloc); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -18488,228 +19324,297 @@ class NSIndexPath extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSIndexPath, + _objc_msgSend_cqxsqq( + _class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSIndexPath, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSOperation, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSOperation, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSIndexPath, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSOperation, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSIndexPath, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSOperation, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSOperation, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSIndexPath, + _objc_msgSend_1tjlcwl( + _class_NSOperation, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOperation, _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); + _objc_msgSend_1unuoxw(_class_NSOperation, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSOperation self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSOperation.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSOperation retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSOperation.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSOperation autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSOperation.castFromPointer(_ret, retain: true, release: true); + } } -late final _class_NSIndexPath = objc.getClass("NSIndexPath"); -late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); -final _objc_msgSend_362 = 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_363 = 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_364 = 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_365 = 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_366 = 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_367 = objc.msgSendPointer +late final _sel_addOperation_ = objc.registerName("addOperation:"); +late final _sel_addOperations_waitUntilFinished_ = + objc.registerName("addOperations:waitUntilFinished:"); +final _objc_msgSend_1n1qwdd = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Pointer, + ffi.Bool)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_compare_ = objc.registerName("compare:"); -final _objc_msgSend_368 = 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_getIndexes_ = objc.registerName("getIndexes:"); -final _objc_msgSend_369 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - 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"); +late final _sel_setMaxConcurrentOperationCount_ = + objc.registerName("setMaxConcurrentOperationCount:"); +late final _sel_isSuspended = objc.registerName("isSuspended"); +late final _sel_setSuspended_ = objc.registerName("setSuspended:"); +late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); +late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); +late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); +late final _sel_waitUntilAllOperationsAreFinished = + objc.registerName("waitUntilAllOperationsAreFinished"); +late final _sel_currentQueue = objc.registerName("currentQueue"); +late final _sel_mainQueue = objc.registerName("mainQueue"); +late final _sel_operations = objc.registerName("operations"); +late final _sel_operationCount = objc.registerName("operationCount"); + +/// 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.ref.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_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); + } + + /// progress + NSProgress get progress { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_progress); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + /// addOperation: + void addOperation_(NSOperation op) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addOperation_, op.ref.pointer); + } + + /// addOperations:waitUntilFinished: + void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { + _objc_msgSend_1n1qwdd(this.ref.pointer, + _sel_addOperations_waitUntilFinished_, ops.ref.pointer, wait); + } + + /// addOperationWithBlock: + void addOperationWithBlock_(objc.ObjCBlock block) { + _objc_msgSend_4daxhl( + this.ref.pointer, _sel_addOperationWithBlock_, block.ref.pointer); + } -/// NSInflectionRule -class NSInflectionRule extends objc.NSObject { - NSInflectionRule._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// addBarrierBlock: + void addBarrierBlock_(objc.ObjCBlock barrier) { + _objc_msgSend_4daxhl( + this.ref.pointer, _sel_addBarrierBlock_, barrier.ref.pointer); + } - /// Constructs a [NSInflectionRule] that points to the same underlying object as [other]. - NSInflectionRule.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// maxConcurrentOperationCount + int get maxConcurrentOperationCount { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_maxConcurrentOperationCount); + } - /// 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); + /// setMaxConcurrentOperationCount: + set maxConcurrentOperationCount(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setMaxConcurrentOperationCount_, value); + } - /// Returns whether [obj] is an instance of [NSInflectionRule]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); + /// isSuspended + bool get suspended { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSuspended); } - /// init - NSInflectionRule init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); + /// setSuspended: + set suspended(bool value) { + return _objc_msgSend_117qins(this.ref.pointer, _sel_setSuspended_, value); } - /// automaticRule - static NSInflectionRule getAutomaticRule() { - final _ret = _objc_msgSend_370(_class_NSInflectionRule, _sel_automaticRule); - return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// canInflectLanguage: - static bool canInflectLanguage_(objc.NSString language) { - return _objc_msgSend_31( - _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); + /// setName: + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } - /// canInflectPreferredLocalization - static bool getCanInflectPreferredLocalization() { - return _objc_msgSend_13( - _class_NSInflectionRule, _sel_canInflectPreferredLocalization); + /// qualityOfService + NSQualityOfService get qualityOfService { + final _ret = _objc_msgSend_17dnyeh(this.ref.pointer, _sel_qualityOfService); + return NSQualityOfService.fromValue(_ret); + } + + /// setQualityOfService: + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); + } + + /// underlyingQueue + objc.NSObject? get underlyingQueue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_underlyingQueue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + /// setUnderlyingQueue: + set underlyingQueue(objc.NSObject? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setUnderlyingQueue_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// cancelAllOperations + void cancelAllOperations() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancelAllOperations); + } + + /// waitUntilAllOperationsAreFinished + void waitUntilAllOperationsAreFinished() { + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); + } + + /// currentQueue + static NSOperationQueue? getCurrentQueue() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_currentQueue); + return _ret.address == 0 + ? null + : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } + + /// mainQueue + static NSOperationQueue getMainQueue() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_mainQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } + + /// operations + objc.NSArray get operations { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_operations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// operationCount + int get operationCount { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_operationCount); + } + + /// init + NSOperationQueue init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// new - static NSInflectionRule new1() { - final _ret = _objc_msgSend_19(_class_NSInflectionRule, _sel_new); - return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); + static NSOperationQueue new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_new); + return NSOperationQueue.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); + static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSOperationQueue, _sel_allocWithZone_, zone); + return NSOperationQueue.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); + static NSOperationQueue alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_alloc); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -18717,251 +19622,236 @@ class NSInflectionRule extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSInflectionRule, + _objc_msgSend_cqxsqq( + _class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSInflectionRule, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSOperationQueue, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSInflectionRule, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSOperationQueue, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSInflectionRule, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSOperationQueue, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSOperationQueue, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSInflectionRule, + _objc_msgSend_1tjlcwl( + _class_NSOperationQueue, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOperationQueue, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOperationQueue, _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_370 = 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_371(this.pointer, _sel_grammaticalGender); - return NSGrammaticalGender.fromValue(_ret); - } - /// setGrammaticalGender: - set grammaticalGender(NSGrammaticalGender value) { - return _objc_msgSend_372( - this.pointer, _sel_setGrammaticalGender_, value.value); + /// self + NSOperationQueue self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - /// partOfSpeech - NSGrammaticalPartOfSpeech get partOfSpeech { - final _ret = _objc_msgSend_373(this.pointer, _sel_partOfSpeech); - return NSGrammaticalPartOfSpeech.fromValue(_ret); + /// retain + NSOperationQueue retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - /// setPartOfSpeech: - set partOfSpeech(NSGrammaticalPartOfSpeech value) { - return _objc_msgSend_374(this.pointer, _sel_setPartOfSpeech_, value.value); + /// autorelease + NSOperationQueue autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } +} - /// number - NSGrammaticalNumber get number { - final _ret = _objc_msgSend_375(this.pointer, _sel_number); - return NSGrammaticalNumber.fromValue(_ret); - } +late final _class_NSOrthography = objc.getClass("NSOrthography"); +late final _sel_dominantScript = objc.registerName("dominantScript"); +late final _sel_languageMap = objc.registerName("languageMap"); +late final _sel_initWithDominantScript_languageMap_ = + objc.registerName("initWithDominantScript:languageMap:"); +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:"); - /// setNumber: - set number(NSGrammaticalNumber value) { - return _objc_msgSend_376(this.pointer, _sel_setNumber_, value.value); - } +/// NSOrthography +class NSOrthography extends objc.NSObject { + NSOrthography._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// grammaticalCase - NSGrammaticalCase get grammaticalCase { - final _ret = _objc_msgSend_377(this.pointer, _sel_grammaticalCase); - return NSGrammaticalCase.fromValue(_ret); - } + /// Constructs a [NSOrthography] that points to the same underlying object as [other]. + NSOrthography.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// setGrammaticalCase: - set grammaticalCase(NSGrammaticalCase value) { - return _objc_msgSend_378( - this.pointer, _sel_setGrammaticalCase_, value.value); - } + /// 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); - /// determination - NSGrammaticalDetermination get determination { - final _ret = _objc_msgSend_379(this.pointer, _sel_determination); - return NSGrammaticalDetermination.fromValue(_ret); + /// Returns whether [obj] is an instance of [NSOrthography]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOrthography); } - /// setDetermination: - set determination(NSGrammaticalDetermination value) { - return _objc_msgSend_380(this.pointer, _sel_setDetermination_, value.value); + /// dominantScript + objc.NSString get dominantScript { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dominantScript); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// grammaticalPerson - NSGrammaticalPerson get grammaticalPerson { - final _ret = _objc_msgSend_381(this.pointer, _sel_grammaticalPerson); - return NSGrammaticalPerson.fromValue(_ret); + /// languageMap + objc.NSDictionary get languageMap { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_languageMap); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// setGrammaticalPerson: - set grammaticalPerson(NSGrammaticalPerson value) { - return _objc_msgSend_382( - this.pointer, _sel_setGrammaticalPerson_, value.value); + /// initWithDominantScript:languageMap: + NSOrthography initWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithDominantScript_languageMap_, + script.ref.pointer, + map.ref.pointer); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - /// pronounType - NSGrammaticalPronounType get pronounType { - final _ret = _objc_msgSend_383(this.pointer, _sel_pronounType); - return NSGrammaticalPronounType.fromValue(_ret); + /// initWithCoder: + NSOrthography? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: false, release: true); } - /// setPronounType: - set pronounType(NSGrammaticalPronounType value) { - return _objc_msgSend_384(this.pointer, _sel_setPronounType_, value.value); + /// languagesForScript: + objc.NSArray? languagesForScript_(objc.NSString script) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_languagesForScript_, script.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// definiteness - NSGrammaticalDefiniteness get definiteness { - final _ret = _objc_msgSend_385(this.pointer, _sel_definiteness); - return NSGrammaticalDefiniteness.fromValue(_ret); + /// dominantLanguageForScript: + objc.NSString? dominantLanguageForScript_(objc.NSString script) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dominantLanguageForScript_, script.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setDefiniteness: - set definiteness(NSGrammaticalDefiniteness value) { - return _objc_msgSend_386(this.pointer, _sel_setDefiniteness_, value.value); + /// dominantLanguage + objc.NSString get dominantLanguage { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dominantLanguage); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// customPronounForLanguage: - NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { - final _ret = _objc_msgSend_388( - this.pointer, _sel_customPronounForLanguage_, language.pointer); - return _ret.address == 0 - ? null - : NSMorphologyCustomPronoun.castFromPointer(_ret, - retain: true, release: true); + /// allScripts + objc.NSArray get allScripts { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allScripts); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setCustomPronoun:forLanguage:error: - bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, - objc.NSString language, ffi.Pointer> error) { - return _objc_msgSend_389( - this.pointer, - _sel_setCustomPronoun_forLanguage_error_, - features?.pointer ?? ffi.nullptr, - language.pointer, - error); + /// allLanguages + objc.NSArray get allLanguages { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allLanguages); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// isUnspecified - bool get unspecified { - return _objc_msgSend_13(this.pointer, _sel_isUnspecified); + /// defaultOrthographyForLanguage: + static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_juohf7(_class_NSOrthography, + _sel_defaultOrthographyForLanguage_, language.ref.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - /// userMorphology - static NSMorphology getUserMorphology() { - final _ret = _objc_msgSend_390(_class_NSMorphology, _sel_userMorphology); - return NSMorphology.castFromPointer(_ret, retain: true, release: true); + /// orthographyWithDominantScript:languageMap: + static NSOrthography orthographyWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_iq11qg( + _class_NSOrthography, + _sel_orthographyWithDominantScript_languageMap_, + script.ref.pointer, + map.ref.pointer); + return NSOrthography.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); + NSOrthography init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// new - static NSMorphology new1() { - final _ret = _objc_msgSend_19(_class_NSMorphology, _sel_new); - return NSMorphology.castFromPointer(_ret, retain: false, release: true); + static NSOrthography new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOrthography, _sel_new); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSMorphology, _sel_allocWithZone_, zone); - return NSMorphology.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSOrthography, _sel_allocWithZone_, zone); + return NSOrthography.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); + static NSOrthography alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOrthography, _sel_alloc); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -18969,553 +19859,794 @@ class NSMorphology extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSMorphology, + _objc_msgSend_cqxsqq( + _class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSMorphology, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSOrthography, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSMorphology, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSOrthography, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSMorphology, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSOrthography, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSMorphology, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSOrthography, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSOrthography, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSMorphology, + _objc_msgSend_1tjlcwl( + _class_NSOrthography, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOrthography, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOrthography, _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); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSOrthography, _sel_supportsSecureCoding); + } - static NSGrammaticalGender fromValue(int value) => switch (value) { - 0 => NSGrammaticalGenderNotSet, - 1 => NSGrammaticalGenderFeminine, - 2 => NSGrammaticalGenderMasculine, - 3 => NSGrammaticalGenderNeuter, - _ => - throw ArgumentError("Unknown value for NSGrammaticalGender: $value"), - }; + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } } -late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); -final _objc_msgSend_371 = objc.msgSendPointer +late final _class_NSPointerArray = objc.getClass("NSPointerArray"); +late final _sel_countByEnumeratingWithState_objects_count_ = + objc.registerName("countByEnumeratingWithState:objects:count:"); +final _objc_msgSend_q12f7y = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() .asFunction< int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalGender_ = - objc.registerName("setGrammaticalGender:"); -final _objc_msgSend_372 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrTrampoline, + 0) + .cast(); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + (objc.getBlockClosure(block) as int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureTrampoline, + 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>(pointer, retain: retain, release: release); -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); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> ptr) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + objc.newPointerBlock(_ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - final int value; - const NSGrammaticalPartOfSpeech(this.value); + /// 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. + static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> fromFunction(int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, int) fn) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + objc.newClosureBlock( + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + fn(arg0, arg1, arg2, arg3)), + retain: false, + release: true); +} - 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"), - }; +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. +extension ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_CallExtension + on objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> { + int call( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>()(ref.pointer, arg0, arg1, arg2, arg3); } -late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); -final _objc_msgSend_373 = 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_374 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); +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); -enum NSGrammaticalNumber { - NSGrammaticalNumberNotSet(0), - NSGrammaticalNumberSingular(1), - NSGrammaticalNumberZero(2), - NSGrammaticalNumberPlural(3), - NSGrammaticalNumberPluralTwo(4), - NSGrammaticalNumberPluralFew(5), - NSGrammaticalNumberPluralMany(6); + static const NSPointerFunctionsObjectPersonality = + NSPointerFunctionsStrongMemory; final int value; - const NSGrammaticalNumber(this.value); + const NSPointerFunctionsOptions(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"), + 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_number = objc.registerName("number"); -final _objc_msgSend_375 = objc.msgSendPointer +late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); +final _objc_msgSend_146ksfy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); +late final _sel_pointerFunctionsWithOptions_ = + objc.registerName("pointerFunctionsWithOptions:"); +late final _sel_hashFunction = objc.registerName("hashFunction"); +final _objc_msgSend_1sotwf1 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setNumber_ = objc.registerName("setNumber:"); -final _objc_msgSend_376 = objc.msgSendPointer + 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_1oonnyk = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + 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, 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_377 = objc.msgSendPointer + 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_1xqafxe = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); -final _objc_msgSend_378 = objc.msgSendPointer + 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_1i3z8j1 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + 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, 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_379 = objc.msgSendPointer + 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_1u1e56c = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDetermination_ = objc.registerName("setDetermination:"); -final _objc_msgSend_380 = objc.msgSendPointer + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setSizeFunction_ = objc.registerName("setSizeFunction:"); +final _objc_msgSend_10z8lan = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>>() .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_381 = objc.msgSendPointer + 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_1y69tkw = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalPerson_ = - objc.registerName("setGrammaticalPerson:"); -final _objc_msgSend_382 = objc.msgSendPointer + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDescriptionFunction_ = + objc.registerName("setDescriptionFunction:"); +final _objc_msgSend_1a23vur = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>)>>() .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_383 = objc.msgSendPointer + 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_15kilzc = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPronounType_ = objc.registerName("setPronounType:"); -final _objc_msgSend_384 = objc.msgSendPointer + 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_18u5cwv = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + 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, 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_385 = objc.msgSendPointer + 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_y49dq4 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); -final _objc_msgSend_386 = objc.msgSendPointer + 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_nyyll3 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + 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, int)>(); + 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:"); -/// NSMorphologyCustomPronoun -class NSMorphologyCustomPronoun extends objc.NSObject { - NSMorphologyCustomPronoun._(ffi.Pointer pointer, +/// 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 [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. - NSMorphologyCustomPronoun.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSPointerFunctions] that points to the same underlying object as [other]. + NSPointerFunctions.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. - NSMorphologyCustomPronoun.castFromPointer(ffi.Pointer other, + /// 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 [NSMorphologyCustomPronoun]. + /// Returns whether [obj] is an instance of [NSPointerFunctions]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); } - /// isSupportedForLanguage: - static bool isSupportedForLanguage_(objc.NSString language) { - return _objc_msgSend_31(_class_NSMorphologyCustomPronoun, - _sel_isSupportedForLanguage_, language.pointer); + /// initWithOptions: + NSPointerFunctions initWithOptions_(NSPointerFunctionsOptions options) { + final _ret = _objc_msgSend_146ksfy(this.ref.retainAndReturnPointer(), + _sel_initWithOptions_, options.value); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - /// requiredKeysForLanguage: - static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { - final _ret = _objc_msgSend_387(_class_NSMorphologyCustomPronoun, - _sel_requiredKeysForLanguage_, language.pointer); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// pointerFunctionsWithOptions: + static NSPointerFunctions pointerFunctionsWithOptions_( + NSPointerFunctionsOptions options) { + final _ret = _objc_msgSend_146ksfy(_class_NSPointerFunctions, + _sel_pointerFunctionsWithOptions_, options.value); + return NSPointerFunctions.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); + /// hashFunction + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get hashFunction { + return _objc_msgSend_1sotwf1(this.ref.pointer, _sel_hashFunction); } - /// setSubjectForm: - set subjectForm(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); + /// 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_1oonnyk( + this.ref.pointer, _sel_setHashFunction_, value); } - /// 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); + /// 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_1xqafxe(this.ref.pointer, _sel_isEqualFunction); } - /// setObjectForm: - set objectForm(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); + /// 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_1i3z8j1( + this.ref.pointer, _sel_setIsEqualFunction_, value); + } + + /// sizeFunction + ffi.Pointer< + ffi.NativeFunction)>> + get sizeFunction { + return _objc_msgSend_1u1e56c(this.ref.pointer, _sel_sizeFunction); + } + + /// setSizeFunction: + set sizeFunction( + ffi.Pointer< + ffi + .NativeFunction)>> + value) { + return _objc_msgSend_10z8lan( + this.ref.pointer, _sel_setSizeFunction_, value); + } + + /// descriptionFunction + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + get descriptionFunction { + return _objc_msgSend_1y69tkw(this.ref.pointer, _sel_descriptionFunction); + } + + /// setDescriptionFunction: + set descriptionFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value) { + return _objc_msgSend_1a23vur( + this.ref.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_15kilzc(this.ref.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_18u5cwv( + this.ref.pointer, _sel_setRelinquishFunction_, value); } - /// 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); + /// 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_y49dq4(this.ref.pointer, _sel_acquireFunction); } - /// setPossessiveForm: - set possessiveForm(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); + /// 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_nyyll3( + this.ref.pointer, _sel_setAcquireFunction_, value); } - /// 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); + /// usesStrongWriteBarrier + bool get usesStrongWriteBarrier { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_usesStrongWriteBarrier); } - /// setPossessiveAdjectiveForm: - set possessiveAdjectiveForm(objc.NSString? value) { - return _objc_msgSend_21(this.pointer, _sel_setPossessiveAdjectiveForm_, - value?.pointer ?? ffi.nullptr); + /// setUsesStrongWriteBarrier: + set usesStrongWriteBarrier(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesStrongWriteBarrier_, value); } - /// 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); + /// usesWeakReadAndWriteBarriers + bool get usesWeakReadAndWriteBarriers { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_usesWeakReadAndWriteBarriers); } - /// setReflexiveForm: - set reflexiveForm(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); + /// setUsesWeakReadAndWriteBarriers: + set usesWeakReadAndWriteBarriers(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); } /// init - NSMorphologyCustomPronoun init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSMorphologyCustomPronoun.castFromPointer(_ret, - retain: true, release: true); + NSPointerFunctions init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSMorphologyCustomPronoun new1() { - final _ret = _objc_msgSend_19(_class_NSMorphologyCustomPronoun, _sel_new); - return NSMorphologyCustomPronoun.castFromPointer(_ret, + static NSPointerFunctions new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPointerFunctions, _sel_new); + return NSPointerFunctions.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, + static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSPointerFunctions, _sel_allocWithZone_, zone); + return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSMorphologyCustomPronoun alloc() { - final _ret = _objc_msgSend_19(_class_NSMorphologyCustomPronoun, _sel_alloc); - return NSMorphologyCustomPronoun.castFromPointer(_ret, + static NSPointerFunctions alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPointerFunctions, _sel_alloc); + return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); } @@ -19524,307 +20655,317 @@ class NSMorphologyCustomPronoun extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSMorphologyCustomPronoun, + _objc_msgSend_cqxsqq( + _class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSMorphologyCustomPronoun, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSPointerFunctions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSPointerFunctions, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSMorphologyCustomPronoun, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSPointerFunctions, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSPointerFunctions, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSMorphologyCustomPronoun, + _objc_msgSend_1tjlcwl( + _class_NSPointerFunctions, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerFunctions, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSPointerFunctions self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSPointerFunctions retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSPointerFunctions autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSPointerFunctions.castFromPointer(_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_387 = objc.msgSendPointer +late final _sel_initWithPointerFunctions_ = + objc.registerName("initWithPointerFunctions:"); +late final _sel_pointerArrayWithOptions_ = + objc.registerName("pointerArrayWithOptions:"); +late final _sel_pointerArrayWithPointerFunctions_ = + objc.registerName("pointerArrayWithPointerFunctions:"); +late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); +late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); +final _objc_msgSend_hwxa7r = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .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_388 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_addPointer_ = objc.registerName("addPointer:"); +final _objc_msgSend_hepzs = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void 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_389 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removePointerAtIndex_ = + objc.registerName("removePointerAtIndex:"); +late final _sel_insertPointer_atIndex_ = + objc.registerName("insertPointer:atIndex:"); +final _objc_msgSend_vzqe8w = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, 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>)>(); -late final _sel_isUnspecified = objc.registerName("isUnspecified"); -late final _sel_userMorphology = objc.registerName("userMorphology"); -final _objc_msgSend_390 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_replacePointerAtIndex_withPointer_ = + objc.registerName("replacePointerAtIndex:withPointer:"); +final _objc_msgSend_19y6iy4 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + 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_pointerArrayWithStrongObjects = + objc.registerName("pointerArrayWithStrongObjects"); +late final _sel_pointerArrayWithWeakObjects = + objc.registerName("pointerArrayWithWeakObjects"); +late final _sel_strongObjectsPointerArray = + objc.registerName("strongObjectsPointerArray"); +late final _sel_weakObjectsPointerArray = + objc.registerName("weakObjectsPointerArray"); +late final _sel_allObjects = objc.registerName("allObjects"); -/// NSOperationQueue -class NSOperationQueue extends objc.NSObject { - NSOperationQueue._(ffi.Pointer pointer, +/// 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 [NSOperationQueue] that points to the same underlying object as [other]. - NSOperationQueue.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSPointerArray] that points to the same underlying object as [other]. + NSPointerArray.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSOperationQueue] that wraps the given raw object pointer. - NSOperationQueue.castFromPointer(ffi.Pointer other, + /// 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 [NSOperationQueue]. + /// Returns whether [obj] is an instance of [NSPointerArray]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); - } - - /// progress - NSProgress get progress { - final _ret = _objc_msgSend_356(this.pointer, _sel_progress); - return NSProgress.castFromPointer(_ret, retain: true, release: true); - } - - /// addOperation: - void addOperation_(NSOperation op) { - _objc_msgSend_391(this.pointer, _sel_addOperation_, op.pointer); - } - - /// addOperations:waitUntilFinished: - void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { - _objc_msgSend_396( - this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPointerArray); } - /// addOperationWithBlock: - void addOperationWithBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_258(this.pointer, _sel_addOperationWithBlock_, block.pointer); + /// initWithOptions: + NSPointerArray initWithOptions_(NSPointerFunctionsOptions options) { + final _ret = _objc_msgSend_146ksfy(this.ref.retainAndReturnPointer(), + _sel_initWithOptions_, options.value); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - /// addBarrierBlock: - void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { - _objc_msgSend_258(this.pointer, _sel_addBarrierBlock_, barrier.pointer); + /// initWithPointerFunctions: + NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithPointerFunctions_, functions.ref.pointer); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - /// maxConcurrentOperationCount - int get maxConcurrentOperationCount { - return _objc_msgSend_123(this.pointer, _sel_maxConcurrentOperationCount); + /// pointerArrayWithOptions: + static NSPointerArray pointerArrayWithOptions_( + NSPointerFunctionsOptions options) { + final _ret = _objc_msgSend_146ksfy( + _class_NSPointerArray, _sel_pointerArrayWithOptions_, options.value); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// setMaxConcurrentOperationCount: - set maxConcurrentOperationCount(int value) { - return _objc_msgSend_142( - this.pointer, _sel_setMaxConcurrentOperationCount_, value); + /// pointerArrayWithPointerFunctions: + static NSPointerArray pointerArrayWithPointerFunctions_( + NSPointerFunctions functions) { + final _ret = _objc_msgSend_juohf7(_class_NSPointerArray, + _sel_pointerArrayWithPointerFunctions_, functions.ref.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// isSuspended - bool get suspended { - return _objc_msgSend_13(this.pointer, _sel_isSuspended); + /// pointerFunctions + NSPointerFunctions get pointerFunctions { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_pointerFunctions); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - /// setSuspended: - set suspended(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setSuspended_, value); + /// pointerAtIndex: + ffi.Pointer pointerAtIndex_(int index) { + return _objc_msgSend_hwxa7r(this.ref.pointer, _sel_pointerAtIndex_, index); } - /// 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); + /// addPointer: + void addPointer_(ffi.Pointer pointer) { + _objc_msgSend_hepzs(this.ref.pointer, _sel_addPointer_, pointer); } - /// setName: - set name(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + /// removePointerAtIndex: + void removePointerAtIndex_(int index) { + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removePointerAtIndex_, index); } - /// qualityOfService - NSQualityOfService get qualityOfService { - final _ret = _objc_msgSend_394(this.pointer, _sel_qualityOfService); - return NSQualityOfService.fromValue(_ret); + /// insertPointer:atIndex: + void insertPointer_atIndex_(ffi.Pointer item, int index) { + _objc_msgSend_vzqe8w( + this.ref.pointer, _sel_insertPointer_atIndex_, item, index); } - /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_395( - this.pointer, _sel_setQualityOfService_, value.value); + /// replacePointerAtIndex:withPointer: + void replacePointerAtIndex_withPointer_( + int index, ffi.Pointer item) { + _objc_msgSend_19y6iy4( + this.ref.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); } - /// underlyingQueue - objc.NSObject? get underlyingQueue { - final _ret = _objc_msgSend_397(this.pointer, _sel_underlyingQueue); - return _ret.address == 0 - ? null - : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + /// compact + void compact() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_compact); } - /// setUnderlyingQueue: - set underlyingQueue(objc.NSObject? value) { - return _objc_msgSend_398( - this.pointer, _sel_setUnderlyingQueue_, value?.pointer ?? ffi.nullptr); + /// count + int get count { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_count); } - /// cancelAllOperations - void cancelAllOperations() { - _objc_msgSend_7(this.pointer, _sel_cancelAllOperations); + /// setCount: + set count(int value) { + return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setCount_, value); } - /// waitUntilAllOperationsAreFinished - void waitUntilAllOperationsAreFinished() { - _objc_msgSend_7(this.pointer, _sel_waitUntilAllOperationsAreFinished); + /// pointerArrayWithStrongObjects + static objc.ObjCObjectBase pointerArrayWithStrongObjects() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// currentQueue - static NSOperationQueue? getCurrentQueue() { - final _ret = _objc_msgSend_399(_class_NSOperationQueue, _sel_currentQueue); - return _ret.address == 0 - ? null - : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + /// pointerArrayWithWeakObjects + static objc.ObjCObjectBase pointerArrayWithWeakObjects() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// mainQueue - static NSOperationQueue getMainQueue() { - final _ret = _objc_msgSend_400(_class_NSOperationQueue, _sel_mainQueue); - return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + /// strongObjectsPointerArray + static NSPointerArray strongObjectsPointerArray() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_strongObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// operations - objc.NSArray get operations { - final _ret = _objc_msgSend_33(this.pointer, _sel_operations); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// weakObjectsPointerArray + static NSPointerArray weakObjectsPointerArray() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_weakObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// operationCount - int get operationCount { - return _objc_msgSend_57(this.pointer, _sel_operationCount); + /// allObjects + objc.NSArray get allObjects { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// init - NSOperationQueue init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + NSPointerArray init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// new - static NSOperationQueue new1() { - final _ret = _objc_msgSend_19(_class_NSOperationQueue, _sel_new); - return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); + static NSPointerArray new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_new); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSOperationQueue, _sel_allocWithZone_, zone); - return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSPointerArray, _sel_allocWithZone_, zone); + return NSPointerArray.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); + static NSPointerArray alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_alloc); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -19832,245 +20973,265 @@ class NSOperationQueue extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSOperationQueue, + _objc_msgSend_cqxsqq( + _class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSOperationQueue, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSPointerArray, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSOperationQueue, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSPointerArray, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSOperationQueue, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSPointerArray, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSPointerArray, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSOperationQueue, + _objc_msgSend_1tjlcwl( + _class_NSPointerArray, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); - -/// 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); + /// self + NSPointerArray self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// addDependency: - void addDependency_(NSOperation op) { - _objc_msgSend_391(this.pointer, _sel_addDependency_, op.pointer); + /// retain + NSPointerArray retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// removeDependency: - void removeDependency_(NSOperation op) { - _objc_msgSend_391(this.pointer, _sel_removeDependency_, op.pointer); + /// autorelease + NSPointerArray autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// dependencies - objc.NSArray get dependencies { - final _ret = _objc_msgSend_33(this.pointer, _sel_dependencies); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// countByEnumeratingWithState:objects:count: + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _objc_msgSend_q12f7y(this.ref.pointer, + _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); } - /// queuePriority - NSOperationQueuePriority get queuePriority { - final _ret = _objc_msgSend_392(this.pointer, _sel_queuePriority); - return NSOperationQueuePriority.fromValue(_ret); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSPointerArray, _sel_supportsSecureCoding); } - /// setQueuePriority: - set queuePriority(NSOperationQueuePriority value) { - return _objc_msgSend_393(this.pointer, _sel_setQueuePriority_, value.value); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } - /// completionBlock - ObjCBlock_ffiVoid? get completionBlock { - final _ret = _objc_msgSend_15(this.pointer, _sel_completionBlock); + /// initWithCoder: + NSPointerArray? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + : NSPointerArray.castFromPointer(_ret, retain: false, release: true); } +} - /// setCompletionBlock: - set completionBlock(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_16( - this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); - } +late final _class_NSPort = objc.getClass("NSPort"); +late final _sel_port = objc.registerName("port"); +late final _sel_invalidate = objc.registerName("invalidate"); +late final _sel_isValid = objc.registerName("isValid"); +late final _sel_scheduleInRunLoop_forMode_ = + objc.registerName("scheduleInRunLoop:forMode:"); +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_1k87i90 = 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_1sldtak = 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 _class_NSConnection = objc.getClass("NSConnection"); +late final _sel_statistics = objc.registerName("statistics"); +late final _sel_allConnections = objc.registerName("allConnections"); +late final _sel_defaultConnection = objc.registerName("defaultConnection"); +late final _sel_connectionWithRegisteredName_host_ = + objc.registerName("connectionWithRegisteredName:host:"); +late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); +late final _sel_systemDefaultPortNameServer = + objc.registerName("systemDefaultPortNameServer"); +late final _sel_portForName_ = objc.registerName("portForName:"); +late final _sel_portForName_host_ = objc.registerName("portForName:host:"); +late final _sel_registerPort_name_ = objc.registerName("registerPort:name:"); +late final _sel_removePortForName_ = objc.registerName("removePortForName:"); - /// waitUntilFinished - void waitUntilFinished() { - _objc_msgSend_7(this.pointer, _sel_waitUntilFinished); - } +/// NSPortNameServer +class NSPortNameServer extends objc.NSObject { + NSPortNameServer._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// threadPriority - double get threadPriority { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_threadPriority) - : _objc_msgSend_18(this.pointer, _sel_threadPriority); - } + /// Constructs a [NSPortNameServer] that points to the same underlying object as [other]. + NSPortNameServer.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// setThreadPriority: - set threadPriority(double value) { - return _objc_msgSend_223(this.pointer, _sel_setThreadPriority_, value); + /// Constructs a [NSPortNameServer] that wraps the given raw object pointer. + NSPortNameServer.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSPortNameServer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPortNameServer); } - /// qualityOfService - NSQualityOfService get qualityOfService { - final _ret = _objc_msgSend_394(this.pointer, _sel_qualityOfService); - return NSQualityOfService.fromValue(_ret); + /// systemDefaultPortNameServer + static NSPortNameServer systemDefaultPortNameServer() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSPortNameServer, _sel_systemDefaultPortNameServer); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_395( - this.pointer, _sel_setQualityOfService_, value.value); + /// portForName: + NSPort? portForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_portForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } - /// name - objc.NSString? get name { - final _ret = _objc_msgSend_20(this.pointer, _sel_name); + /// portForName:host: + NSPort? portForName_host_(objc.NSString name, objc.NSString? host) { + final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_portForName_host_, + name.ref.pointer, host?.ref.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSPort.castFromPointer(_ret, retain: true, release: true); } - /// setName: - set name(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + /// registerPort:name: + bool registerPort_name_(NSPort port, objc.NSString name) { + return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_registerPort_name_, + port.ref.pointer, name.ref.pointer); + } + + /// removePortForName: + bool removePortForName_(objc.NSString name) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_removePortForName_, name.ref.pointer); } /// init - NSOperation init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSOperation.castFromPointer(_ret, retain: true, release: true); + NSPortNameServer init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } /// new - static NSOperation new1() { - final _ret = _objc_msgSend_19(_class_NSOperation, _sel_new); - return NSOperation.castFromPointer(_ret, retain: false, release: true); + static NSPortNameServer new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPortNameServer, _sel_new); + return NSPortNameServer.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); + static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSPortNameServer, _sel_allocWithZone_, zone); + return NSPortNameServer.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); + static NSPortNameServer alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPortNameServer, _sel_alloc); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -20078,632 +21239,609 @@ class NSOperation extends objc.NSObject { 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); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSOperation, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _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_391 = 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_392 = 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_393 = 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_394 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setQualityOfService_ = - objc.registerName("setQualityOfService:"); -final _objc_msgSend_395 = 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_setName_ = objc.registerName("setName:"); -late final _sel_addOperation_ = objc.registerName("addOperation:"); -late final _sel_addOperations_waitUntilFinished_ = - objc.registerName("addOperations:waitUntilFinished:"); -final _objc_msgSend_396 = 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"); -late final _sel_setMaxConcurrentOperationCount_ = - objc.registerName("setMaxConcurrentOperationCount:"); -late final _sel_isSuspended = objc.registerName("isSuspended"); -late final _sel_setSuspended_ = objc.registerName("setSuspended:"); -late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); -final _objc_msgSend_397 = 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_398 = 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_399 = 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_400 = 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"); + _objc_msgSend_cqxsqq( + _class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } -/// NSOrthography -class NSOrthography extends objc.NSObject { - NSOrthography._(ffi.Pointer pointer, + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSPortNameServer, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSPortNameServer, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSPortNameServer, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSPortNameServer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSPortNameServer, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } +} + +late final _sel_connectionWithRegisteredName_host_usingNameServer_ = + objc.registerName("connectionWithRegisteredName:host:usingNameServer:"); +late final _class_NSDistantObject = objc.getClass("NSDistantObject"); +late final _sel_proxyWithTarget_connection_ = + objc.registerName("proxyWithTarget:connection:"); +late final _sel_initWithTarget_connection_ = + objc.registerName("initWithTarget:connection:"); +late final _sel_proxyWithLocal_connection_ = + objc.registerName("proxyWithLocal:connection:"); +late final _sel_initWithLocal_connection_ = + objc.registerName("initWithLocal:connection:"); +late final _sel_setProtocolForProxy_ = + objc.registerName("setProtocolForProxy:"); +late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); + +/// NSDistantObject +class NSDistantObject extends objc.NSProxy { + NSDistantObject._(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 [NSDistantObject] that points to the same underlying object as [other]. + NSDistantObject.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSOrthography] that wraps the given raw object pointer. - NSOrthography.castFromPointer(ffi.Pointer other, + /// Constructs a [NSDistantObject] that wraps the given raw object pointer. + NSDistantObject.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSOrthography]. + /// Returns whether [obj] is an instance of [NSDistantObject]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDistantObject); } - /// dominantScript - objc.NSString get dominantScript { - final _ret = _objc_msgSend_11(this.pointer, _sel_dominantScript); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// proxyWithTarget:connection: + static objc.ObjCObjectBase? proxyWithTarget_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + _class_NSDistantObject, + _sel_proxyWithTarget_connection_, + target.ref.pointer, + connection.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// languageMap - objc.NSDictionary get languageMap { - final _ret = _objc_msgSend_121(this.pointer, _sel_languageMap); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// initWithTarget:connection: + NSDistantObject? initWithTarget_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithTarget_connection_, + target.ref.pointer, + connection.ref.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: false, release: true); } - /// initWithDominantScript:languageMap: - NSOrthography initWithDominantScript_languageMap_( - objc.NSString script, objc.NSDictionary map) { - final _ret = _objc_msgSend_401(this.pointer, - _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); - return NSOrthography.castFromPointer(_ret, retain: true, release: true); + /// proxyWithLocal:connection: + static objc.ObjCObjectBase proxyWithLocal_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + _class_NSDistantObject, + _sel_proxyWithLocal_connection_, + target.ref.pointer, + connection.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// initWithLocal:connection: + NSDistantObject initWithLocal_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithLocal_connection_, + target.ref.pointer, + connection.ref.pointer); + return NSDistantObject.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: - NSOrthography? initWithCoder_(objc.NSCoder coder) { - final _ret = - _objc_msgSend_239(this.pointer, _sel_initWithCoder_, coder.pointer); + NSDistantObject? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : NSOrthography.castFromPointer(_ret, retain: true, release: true); + : NSDistantObject.castFromPointer(_ret, retain: false, release: true); } - /// languagesForScript: - objc.NSArray? languagesForScript_(objc.NSString script) { - final _ret = _objc_msgSend_299( - this.pointer, _sel_languagesForScript_, script.pointer); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// setProtocolForProxy: + void setProtocolForProxy_(objc.Protocol? proto) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolForProxy_, + proto?.ref.pointer ?? ffi.nullptr); } - /// dominantLanguageForScript: - objc.NSString? dominantLanguageForScript_(objc.NSString script) { - final _ret = _objc_msgSend_42( - this.pointer, _sel_dominantLanguageForScript_, script.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// connectionForProxy + NSConnection get connectionForProxy { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionForProxy); + return NSConnection.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); + /// alloc + static objc.ObjCObjectBase alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSDistantObject, _sel_alloc); + return objc.ObjCObjectBase(_ret, retain: false, release: true); } - /// allScripts - objc.NSArray get allScripts { - final _ret = _objc_msgSend_33(this.pointer, _sel_allScripts); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// self + NSDistantObject self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - /// allLanguages - objc.NSArray get allLanguages { - final _ret = _objc_msgSend_33(this.pointer, _sel_allLanguages); + /// retain + NSDistantObject retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSDistantObject autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } +} + +late final _sel_rootProxyForConnectionWithRegisteredName_host_ = + objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = + objc.registerName( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); +late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = + objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); +late final _sel_serviceConnectionWithName_rootObject_ = + objc.registerName("serviceConnectionWithName:rootObject:"); +late final _sel_requestTimeout = objc.registerName("requestTimeout"); +late final _sel_setRequestTimeout_ = objc.registerName("setRequestTimeout:"); +late final _sel_replyTimeout = objc.registerName("replyTimeout"); +late final _sel_setReplyTimeout_ = objc.registerName("setReplyTimeout:"); +late final _sel_rootObject = objc.registerName("rootObject"); +late final _sel_setRootObject_ = objc.registerName("setRootObject:"); +late final _sel_independentConversationQueueing = + objc.registerName("independentConversationQueueing"); +late final _sel_setIndependentConversationQueueing_ = + objc.registerName("setIndependentConversationQueueing:"); +late final _sel_rootProxy = objc.registerName("rootProxy"); +late final _sel_addRequestMode_ = objc.registerName("addRequestMode:"); +late final _sel_removeRequestMode_ = objc.registerName("removeRequestMode:"); +late final _sel_requestModes = objc.registerName("requestModes"); +late final _sel_registerName_ = objc.registerName("registerName:"); +late final _sel_registerName_withNameServer_ = + objc.registerName("registerName:withNameServer:"); +late final _sel_connectionWithReceivePort_sendPort_ = + objc.registerName("connectionWithReceivePort:sendPort:"); +late final _sel_currentConversation = objc.registerName("currentConversation"); +late final _sel_initWithReceivePort_sendPort_ = + objc.registerName("initWithReceivePort:sendPort:"); +late final _sel_sendPort = objc.registerName("sendPort"); +late final _sel_receivePort = objc.registerName("receivePort"); +late final _sel_enableMultipleThreads = + objc.registerName("enableMultipleThreads"); +late final _sel_multipleThreadsEnabled = + objc.registerName("multipleThreadsEnabled"); +late final _sel_addRunLoop_ = objc.registerName("addRunLoop:"); +late final _sel_removeRunLoop_ = objc.registerName("removeRunLoop:"); +late final _sel_runInNewThread = objc.registerName("runInNewThread"); +late final _sel_remoteObjects = objc.registerName("remoteObjects"); +late final _sel_localObjects = objc.registerName("localObjects"); +late final _sel_dispatchWithComponents_ = + objc.registerName("dispatchWithComponents:"); + +/// NSConnection +class NSConnection extends objc.NSObject { + NSConnection._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSConnection] that points to the same underlying object as [other]. + NSConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSConnection] that wraps the given raw object pointer. + NSConnection.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSConnection]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSConnection); + } + + /// statistics + objc.NSDictionary get statistics { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_statistics); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + /// allConnections + static objc.NSArray allConnections() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSConnection, _sel_allConnections); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// defaultOrthographyForLanguage: - static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { - final _ret = _objc_msgSend_63(_class_NSOrthography, - _sel_defaultOrthographyForLanguage_, language.pointer); - return NSOrthography.castFromPointer(_ret, retain: true, release: true); + /// defaultConnection + static NSConnection defaultConnection() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSConnection, _sel_defaultConnection); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - /// orthographyWithDominantScript:languageMap: - static NSOrthography orthographyWithDominantScript_languageMap_( - objc.NSString script, objc.NSDictionary map) { - final _ret = _objc_msgSend_401( - _class_NSOrthography, - _sel_orthographyWithDominantScript_languageMap_, - script.pointer, - map.pointer); - return NSOrthography.castFromPointer(_ret, retain: true, release: true); + /// connectionWithRegisteredName:host: + static NSConnection? connectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); + } + + /// connectionWithRegisteredName:host:usingNameServer: + static NSConnection? connectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { + final _ret = _objc_msgSend_aud7dn( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_usingNameServer_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr, + server.ref.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); + } + + /// rootProxyForConnectionWithRegisteredName:host: + static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSDistantObject.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); + /// rootProxyForConnectionWithRegisteredName:host:usingNameServer: + static NSDistantObject? + rootProxyForConnectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, + objc.NSString? hostName, + NSPortNameServer server) { + final _ret = _objc_msgSend_aud7dn( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr, + server.ref.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.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); + /// serviceConnectionWithName:rootObject:usingNameServer: + static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( + objc.NSString name, objc.ObjCObjectBase root, NSPortNameServer server) { + final _ret = _objc_msgSend_aud7dn( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_usingNameServer_, + name.ref.pointer, + root.ref.pointer, + server.ref.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, 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); + /// serviceConnectionWithName:rootObject: + static NSConnection? serviceConnectionWithName_rootObject_( + objc.NSString name, objc.ObjCObjectBase root) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_, + name.ref.pointer, + root.ref.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - /// alloc - static NSOrthography alloc() { - final _ret = _objc_msgSend_19(_class_NSOrthography, _sel_alloc); - return NSOrthography.castFromPointer(_ret, retain: false, release: true); + /// requestTimeout + double get requestTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_requestTimeout) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_requestTimeout); } - /// 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); + /// setRequestTimeout: + set requestTimeout(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setRequestTimeout_, value); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSOrthography, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// replyTimeout + double get replyTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_replyTimeout) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_replyTimeout); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSOrthography, _sel_accessInstanceVariablesDirectly); + /// setReplyTimeout: + set replyTimeout(double value) { + return _objc_msgSend_suh039(this.ref.pointer, _sel_setReplyTimeout_, value); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSOrthography, _sel_useStoredAccessor); + /// rootObject + objc.ObjCObjectBase? get rootObject { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_rootObject); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// 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); + /// setRootObject: + set rootObject(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setRootObject_, + value?.ref.pointer ?? ffi.nullptr); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSOrthography, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSOrthography, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// setDelegate: + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// independentConversationQueueing + bool get independentConversationQueueing { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_independentConversationQueueing); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSOrthography, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setIndependentConversationQueueing: + set independentConversationQueueing(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setIndependentConversationQueueing_, value); } -} - -late final _class_NSOrthography = objc.getClass("NSOrthography"); -late final _sel_dominantScript = objc.registerName("dominantScript"); -late final _sel_languageMap = objc.registerName("languageMap"); -late final _sel_initWithDominantScript_languageMap_ = - objc.registerName("initWithDominantScript:languageMap:"); -final _objc_msgSend_401 = 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); + /// isValid + bool get valid { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValid); + } - /// Returns whether [obj] is an instance of [NSPointerArray]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); + /// rootProxy + NSDistantObject get rootProxy { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_rootProxy); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - /// initWithOptions: - NSPointerArray initWithOptions_(NSPointerFunctionsOptions options) { - final _ret = - _objc_msgSend_402(this.pointer, _sel_initWithOptions_, options.value); - return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + /// invalidate + void invalidate() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); } - /// initWithPointerFunctions: - NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { - final _ret = _objc_msgSend_416( - this.pointer, _sel_initWithPointerFunctions_, functions.pointer); - return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + /// addRequestMode: + void addRequestMode_(objc.NSString rmode) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addRequestMode_, rmode.ref.pointer); } - /// pointerArrayWithOptions: - static NSPointerArray pointerArrayWithOptions_( - NSPointerFunctionsOptions options) { - final _ret = _objc_msgSend_417( - _class_NSPointerArray, _sel_pointerArrayWithOptions_, options.value); - return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + /// removeRequestMode: + void removeRequestMode_(objc.NSString rmode) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeRequestMode_, rmode.ref.pointer); } - /// pointerArrayWithPointerFunctions: - static NSPointerArray pointerArrayWithPointerFunctions_( - NSPointerFunctions functions) { - final _ret = _objc_msgSend_418(_class_NSPointerArray, - _sel_pointerArrayWithPointerFunctions_, functions.pointer); - return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + /// requestModes + objc.NSArray get requestModes { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_requestModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// pointerFunctions - NSPointerFunctions get pointerFunctions { - final _ret = _objc_msgSend_419(this.pointer, _sel_pointerFunctions); - return NSPointerFunctions.castFromPointer(_ret, - retain: true, release: true); + /// registerName: + bool registerName_(objc.NSString? name) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_registerName_, name?.ref.pointer ?? ffi.nullptr); } - /// pointerAtIndex: - ffi.Pointer pointerAtIndex_(int index) { - return _objc_msgSend_420(this.pointer, _sel_pointerAtIndex_, index); + /// registerName:withNameServer: + bool registerName_withNameServer_( + objc.NSString? name, NSPortNameServer server) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_registerName_withNameServer_, + name?.ref.pointer ?? ffi.nullptr, + server.ref.pointer); } - /// addPointer: - void addPointer_(ffi.Pointer pointer) { - _objc_msgSend_421(this.pointer, _sel_addPointer_, pointer); + /// connectionWithReceivePort:sendPort: + static NSConnection? connectionWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_connectionWithReceivePort_sendPort_, + receivePort?.ref.pointer ?? ffi.nullptr, + sendPort?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - /// removePointerAtIndex: - void removePointerAtIndex_(int index) { - _objc_msgSend_422(this.pointer, _sel_removePointerAtIndex_, index); + /// currentConversation + static objc.ObjCObjectBase? currentConversation() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSConnection, _sel_currentConversation); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// insertPointer:atIndex: - void insertPointer_atIndex_(ffi.Pointer item, int index) { - _objc_msgSend_423(this.pointer, _sel_insertPointer_atIndex_, item, index); + /// initWithReceivePort:sendPort: + NSConnection? initWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithReceivePort_sendPort_, + receivePort?.ref.pointer ?? ffi.nullptr, + sendPort?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: false, release: true); } - /// replacePointerAtIndex:withPointer: - void replacePointerAtIndex_withPointer_( - int index, ffi.Pointer item) { - _objc_msgSend_424( - this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); + /// sendPort + NSPort get sendPort { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sendPort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - /// compact - void compact() { - _objc_msgSend_7(this.pointer, _sel_compact); + /// receivePort + NSPort get receivePort { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_receivePort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - /// count - int get count { - return _objc_msgSend_57(this.pointer, _sel_count); + /// enableMultipleThreads + void enableMultipleThreads() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_enableMultipleThreads); } - /// setCount: - set count(int value) { - return _objc_msgSend_133(this.pointer, _sel_setCount_, value); + /// multipleThreadsEnabled + bool get multipleThreadsEnabled { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_multipleThreadsEnabled); } - /// pointerArrayWithStrongObjects - static objc.ObjCObjectBase pointerArrayWithStrongObjects() { - final _ret = _objc_msgSend_19( - _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// addRunLoop: + void addRunLoop_(objc.NSRunLoop runloop) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addRunLoop_, runloop.ref.pointer); } - /// pointerArrayWithWeakObjects - static objc.ObjCObjectBase pointerArrayWithWeakObjects() { - final _ret = _objc_msgSend_19( - _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// removeRunLoop: + void removeRunLoop_(objc.NSRunLoop runloop) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeRunLoop_, runloop.ref.pointer); } - /// strongObjectsPointerArray - static NSPointerArray strongObjectsPointerArray() { - final _ret = _objc_msgSend_425( - _class_NSPointerArray, _sel_strongObjectsPointerArray); - return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + /// runInNewThread + void runInNewThread() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_runInNewThread); } - /// weakObjectsPointerArray - static NSPointerArray weakObjectsPointerArray() { - final _ret = - _objc_msgSend_425(_class_NSPointerArray, _sel_weakObjectsPointerArray); - return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + /// remoteObjects + objc.NSArray get remoteObjects { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_remoteObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// allObjects - objc.NSArray get allObjects { - final _ret = _objc_msgSend_33(this.pointer, _sel_allObjects); + /// localObjects + objc.NSArray get localObjects { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localObjects); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } + /// dispatchWithComponents: + void dispatchWithComponents_(objc.NSArray components) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_dispatchWithComponents_, components.ref.pointer); + } + /// init - NSPointerArray init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + NSConnection init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } /// new - static NSPointerArray new1() { - final _ret = _objc_msgSend_19(_class_NSPointerArray, _sel_new); - return NSPointerArray.castFromPointer(_ret, retain: false, release: true); + static NSConnection new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSConnection, _sel_new); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSPointerArray, _sel_allocWithZone_, zone); - return NSPointerArray.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSConnection, _sel_allocWithZone_, zone); + return NSConnection.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); + static NSConnection alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSConnection, _sel_alloc); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -20711,354 +21849,221 @@ class NSPointerArray extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSPointerArray, + _objc_msgSend_cqxsqq( + _class_NSConnection, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSPointerArray, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSConnection, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSPointerArray, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSConnection, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSPointerArray, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSConnection, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSPointerArray, + _objc_msgSend_1tjlcwl( + _class_NSConnection, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSConnection, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSConnection, _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_402 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); +late final _sel_addConnection_toRunLoop_forMode_ = + objc.registerName("addConnection:toRunLoop:forMode:"); +late final _sel_removeConnection_fromRunLoop_forMode_ = + objc.registerName("removeConnection:fromRunLoop:forMode:"); -/// NSPointerFunctions -class NSPointerFunctions extends objc.NSObject { - NSPointerFunctions._(ffi.Pointer 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 [NSPointerFunctions] that points to the same underlying object as [other]. - NSPointerFunctions.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSPort] that points to the same underlying object as [other]. + NSPort.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSPointerFunctions] that wraps the given raw object pointer. - NSPointerFunctions.castFromPointer(ffi.Pointer other, + /// 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 [NSPointerFunctions]. + /// Returns whether [obj] is an instance of [NSPort]. 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_402(this.pointer, _sel_initWithOptions_, options.value); - return NSPointerFunctions.castFromPointer(_ret, - retain: true, release: true); - } - - /// pointerFunctionsWithOptions: - static NSPointerFunctions pointerFunctionsWithOptions_( - NSPointerFunctionsOptions options) { - final _ret = _objc_msgSend_403(_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_404(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_405(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_406(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_407(this.pointer, _sel_setIsEqualFunction_, value); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPort); } - /// sizeFunction - ffi.Pointer< - ffi.NativeFunction)>> - get sizeFunction { - return _objc_msgSend_408(this.pointer, _sel_sizeFunction); - } - - /// setSizeFunction: - set sizeFunction( - ffi.Pointer< - ffi - .NativeFunction)>> - value) { - return _objc_msgSend_409(this.pointer, _sel_setSizeFunction_, value); + /// port + static NSPort port() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPort, _sel_port); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - /// descriptionFunction - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - get descriptionFunction { - return _objc_msgSend_410(this.pointer, _sel_descriptionFunction); + /// invalidate + void invalidate() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); } - /// setDescriptionFunction: - set descriptionFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - value) { - return _objc_msgSend_411(this.pointer, _sel_setDescriptionFunction_, value); + /// isValid + bool get valid { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValid); } - /// relinquishFunction - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get relinquishFunction { - return _objc_msgSend_412(this.pointer, _sel_relinquishFunction); + /// setDelegate: + void setDelegate_(objc.ObjCObjectBase? anObject) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, + anObject?.ref.pointer ?? ffi.nullptr); } - /// 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_413(this.pointer, _sel_setRelinquishFunction_, value); + /// delegate + objc.ObjCObjectBase? delegate() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// 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_414(this.pointer, _sel_acquireFunction); + /// scheduleInRunLoop:forMode: + void scheduleInRunLoop_forMode_(objc.NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, + runLoop.ref.pointer, mode.ref.pointer); } - - /// 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_415(this.pointer, _sel_setAcquireFunction_, value); + + /// removeFromRunLoop:forMode: + void removeFromRunLoop_forMode_(objc.NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeFromRunLoop_forMode_, + runLoop.ref.pointer, mode.ref.pointer); } - /// usesStrongWriteBarrier - bool get usesStrongWriteBarrier { - return _objc_msgSend_13(this.pointer, _sel_usesStrongWriteBarrier); + /// reservedSpaceLength + int get reservedSpaceLength { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_reservedSpaceLength); } - /// setUsesStrongWriteBarrier: - set usesStrongWriteBarrier(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setUsesStrongWriteBarrier_, value); + /// sendBeforeDate:components:from:reserved: + bool sendBeforeDate_components_from_reserved_( + objc.NSDate limitDate, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_1k87i90( + this.ref.pointer, + _sel_sendBeforeDate_components_from_reserved_, + limitDate.ref.pointer, + components?.ref.pointer ?? ffi.nullptr, + receivePort?.ref.pointer ?? ffi.nullptr, + headerSpaceReserved); } - /// usesWeakReadAndWriteBarriers - bool get usesWeakReadAndWriteBarriers { - return _objc_msgSend_13(this.pointer, _sel_usesWeakReadAndWriteBarriers); + /// 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_1sldtak( + this.ref.pointer, + _sel_sendBeforeDate_msgid_components_from_reserved_, + limitDate.ref.pointer, + msgID, + components?.ref.pointer ?? ffi.nullptr, + receivePort?.ref.pointer ?? ffi.nullptr, + headerSpaceReserved); } - /// setUsesWeakReadAndWriteBarriers: - set usesWeakReadAndWriteBarriers(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); + /// addConnection:toRunLoop:forMode: + void addConnection_toRunLoop_forMode_( + NSConnection conn, objc.NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_addConnection_toRunLoop_forMode_, + conn.ref.pointer, + runLoop.ref.pointer, + mode.ref.pointer); + } + + /// removeConnection:fromRunLoop:forMode: + void removeConnection_fromRunLoop_forMode_( + NSConnection conn, objc.NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_removeConnection_fromRunLoop_forMode_, + conn.ref.pointer, + runLoop.ref.pointer, + mode.ref.pointer); } /// init - NSPointerFunctions init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSPointerFunctions.castFromPointer(_ret, - retain: true, release: true); + NSPort init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSPort.castFromPointer(_ret, retain: false, release: true); } /// new - static NSPointerFunctions new1() { - final _ret = _objc_msgSend_19(_class_NSPointerFunctions, _sel_new); - return NSPointerFunctions.castFromPointer(_ret, - retain: false, release: true); + static NSPort new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPort, _sel_new); + return NSPort.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSPointerFunctions, _sel_allocWithZone_, zone); - return NSPointerFunctions.castFromPointer(_ret, - retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSPort, _sel_allocWithZone_, zone); + return NSPort.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); + static NSPort alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSPort, _sel_alloc); + return NSPort.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -21066,449 +22071,363 @@ class NSPointerFunctions extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSPointerFunctions, + _objc_msgSend_cqxsqq( + _class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSPointerFunctions, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSPort, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSPort, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSPointerFunctions, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSPort, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSPointerFunctions, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSPort, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSPort, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSPointerFunctions, + _objc_msgSend_1tjlcwl( + _class_NSPort, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPort, _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); + final _ret = + _objc_msgSend_1unuoxw(_class_NSPort, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSPort? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: false, release: true); + } } -late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); -late final _sel_pointerFunctionsWithOptions_ = - objc.registerName("pointerFunctionsWithOptions:"); -final _objc_msgSend_403 = 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_404 = 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_405 = 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_406 = 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_407 = 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_408 = 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_409 = 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_410 = 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_411 = 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_412 = objc.msgSendPointer +late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); +late final _sel_processInfo = objc.registerName("processInfo"); +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_1wzlp4e = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer, ffi.Pointer)>>)>> Function( - ffi.Pointer, + NSOperatingSystemVersion 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_413 = objc.msgSendPointer + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1wzlp4eStret = objc.msgSendStretPointer .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_414 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( + ffi.Pointer, 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_415 = 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_416 = 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_417 = objc.msgSendPointer + 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_1cw7twn = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, NSOperatingSystemVersion)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_pointerArrayWithPointerFunctions_ = - objc.registerName("pointerArrayWithPointerFunctions:"); -final _objc_msgSend_418 = objc.msgSendPointer + 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:"); +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_1pavxqs = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Uint64, ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); -final _objc_msgSend_419 = 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_420 = 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_421 = 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_422 = 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_423 = objc.msgSendPointer + 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_17597p1 = 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_424 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( + ffi.Uint64, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + 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_pointerArrayWithStrongObjects = - objc.registerName("pointerArrayWithStrongObjects"); -late final _sel_pointerArrayWithWeakObjects = - objc.registerName("pointerArrayWithWeakObjects"); -late final _sel_strongObjectsPointerArray = - objc.registerName("strongObjectsPointerArray"); -final _objc_msgSend_425 = objc.msgSendPointer + 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); +ffi.Pointer _ObjCBlock_ffiVoid_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + (objc.getBlockClosure(block) as void Function(bool))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_listenerTrampoline( + ffi.Pointer block, bool arg0) { + (objc.getBlockClosure(block) as void Function(bool))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable, ffi.Bool)> + _ObjCBlock_ffiVoid_bool_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>.listener(_ObjCBlock_ffiVoid_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(bool) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_closureCallable, (bool arg0) => fn(arg0)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(bool) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_listenerCallable.nativeFunction.cast(), + (bool arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_117qins(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_bool_CallExtension + on objc.ObjCBlock { + void call(bool arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + ref.pointer, arg0); +} + +late final _sel_performExpiringActivityWithReason_usingBlock_ = + objc.registerName("performExpiringActivityWithReason:usingBlock:"); +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_1ssuop7 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_weakObjectsPointerArray = - objc.registerName("weakObjectsPointerArray"); -late final _sel_allObjects = objc.registerName("allObjects"); +late final _sel_isLowPowerModeEnabled = + objc.registerName("isLowPowerModeEnabled"); +late final _sel_isMacCatalystApp = objc.registerName("isMacCatalystApp"); +late final _sel_isiOSAppOnMac = objc.registerName("isiOSAppOnMac"); /// NSProcessInfo class NSProcessInfo extends objc.NSObject { @@ -21518,7 +22437,7 @@ class NSProcessInfo extends objc.NSObject { /// Constructs a [NSProcessInfo] that points to the same underlying object as [other]. NSProcessInfo.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSProcessInfo] that wraps the given raw object pointer. NSProcessInfo.castFromPointer(ffi.Pointer other, @@ -21527,234 +22446,247 @@ class NSProcessInfo extends objc.NSObject { /// Returns whether [obj] is an instance of [NSProcessInfo]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); } /// processInfo static NSProcessInfo getProcessInfo() { - final _ret = _objc_msgSend_426(_class_NSProcessInfo, _sel_processInfo); + final _ret = _objc_msgSend_1unuoxw(_class_NSProcessInfo, _sel_processInfo); return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } /// environment objc.NSDictionary get environment { - final _ret = _objc_msgSend_121(this.pointer, _sel_environment); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_environment); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// arguments objc.NSArray get arguments { - final _ret = _objc_msgSend_33(this.pointer, _sel_arguments); + final _ret = _objc_msgSend_1unuoxw(this.ref.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); + final _ret = _objc_msgSend_1unuoxw(this.ref.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); + final _ret = _objc_msgSend_1unuoxw(this.ref.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); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setProcessName_, value.ref.pointer); } /// processIdentifier int get processIdentifier { - return _objc_msgSend_273(this.pointer, _sel_processIdentifier); + return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_processIdentifier); } /// globallyUniqueString objc.NSString get globallyUniqueString { - final _ret = _objc_msgSend_11(this.pointer, _sel_globallyUniqueString); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_globallyUniqueString); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystem int operatingSystem() { - return _objc_msgSend_57(this.pointer, _sel_operatingSystem); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_operatingSystem); } /// operatingSystemName objc.NSString operatingSystemName() { - final _ret = _objc_msgSend_11(this.pointer, _sel_operatingSystemName); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_operatingSystemVersionString); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystemVersion - void getOperatingSystemVersion(ffi.Pointer stret) { + NSOperatingSystemVersion get operatingSystemVersion { + final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_427Stret( - stret, this.pointer, _sel_operatingSystemVersion) - : stret.ref = - _objc_msgSend_427(this.pointer, _sel_operatingSystemVersion); + ? _objc_msgSend_1wzlp4eStret( + _ptr, this.ref.pointer, _sel_operatingSystemVersion) + : _ptr.ref = _objc_msgSend_1wzlp4e( + this.ref.pointer, _sel_operatingSystemVersion); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); } /// processorCount int get processorCount { - return _objc_msgSend_57(this.pointer, _sel_processorCount); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_processorCount); } /// activeProcessorCount int get activeProcessorCount { - return _objc_msgSend_57(this.pointer, _sel_activeProcessorCount); + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_activeProcessorCount); } /// physicalMemory int get physicalMemory { - return _objc_msgSend_276(this.pointer, _sel_physicalMemory); + return _objc_msgSend_1cirwn8(this.ref.pointer, _sel_physicalMemory); } /// isOperatingSystemAtLeastVersion: bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { - return _objc_msgSend_428( - this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); + return _objc_msgSend_1cw7twn( + this.ref.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); + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_systemUptime) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_systemUptime); } /// disableSuddenTermination void disableSuddenTermination() { - _objc_msgSend_7(this.pointer, _sel_disableSuddenTermination); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_disableSuddenTermination); } /// enableSuddenTermination void enableSuddenTermination() { - _objc_msgSend_7(this.pointer, _sel_enableSuddenTermination); + _objc_msgSend_ksby9f(this.ref.pointer, _sel_enableSuddenTermination); } /// disableAutomaticTermination: void disableAutomaticTermination_(objc.NSString reason) { - _objc_msgSend_108( - this.pointer, _sel_disableAutomaticTermination_, reason.pointer); + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_disableAutomaticTermination_, + reason.ref.pointer); } /// enableAutomaticTermination: void enableAutomaticTermination_(objc.NSString reason) { - _objc_msgSend_108( - this.pointer, _sel_enableAutomaticTermination_, reason.pointer); + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_enableAutomaticTermination_, reason.ref.pointer); } /// automaticTerminationSupportEnabled bool get automaticTerminationSupportEnabled { - return _objc_msgSend_13( - this.pointer, _sel_automaticTerminationSupportEnabled); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_automaticTerminationSupportEnabled); } /// setAutomaticTerminationSupportEnabled: set automaticTerminationSupportEnabled(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); } /// beginActivityWithOptions:reason: objc.ObjCObjectBase beginActivityWithOptions_reason_( NSActivityOptions options, objc.NSString reason) { - final _ret = _objc_msgSend_429(this.pointer, - _sel_beginActivityWithOptions_reason_, options.value, reason.pointer); + final _ret = _objc_msgSend_1pavxqs( + this.ref.pointer, + _sel_beginActivityWithOptions_reason_, + options.value, + reason.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// endActivity: void endActivity_(objc.ObjCObjectBase activity) { - _objc_msgSend_27(this.pointer, _sel_endActivity_, activity.pointer); + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_endActivity_, activity.ref.pointer); } /// performActivityWithOptions:reason:usingBlock: void performActivityWithOptions_reason_usingBlock_(NSActivityOptions options, - objc.NSString reason, ObjCBlock_ffiVoid block) { - _objc_msgSend_430( - this.pointer, + objc.NSString reason, objc.ObjCBlock block) { + _objc_msgSend_17597p1( + this.ref.pointer, _sel_performActivityWithOptions_reason_usingBlock_, options.value, - reason.pointer, - block.pointer); + reason.ref.pointer, + block.ref.pointer); } /// performExpiringActivityWithReason:usingBlock: void performExpiringActivityWithReason_usingBlock_( - objc.NSString reason, ObjCBlock_ffiVoid_bool block) { - _objc_msgSend_431( - this.pointer, + objc.NSString reason, objc.ObjCBlock block) { + _objc_msgSend_cmbt6k( + this.ref.pointer, _sel_performExpiringActivityWithReason_usingBlock_, - reason.pointer, - block.pointer); + reason.ref.pointer, + block.ref.pointer); } /// userName objc.NSString get userName { - final _ret = _objc_msgSend_11(this.pointer, _sel_userName); + final _ret = _objc_msgSend_1unuoxw(this.ref.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); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fullUserName); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// thermalState NSProcessInfoThermalState get thermalState { - final _ret = _objc_msgSend_432(this.pointer, _sel_thermalState); + final _ret = _objc_msgSend_1ssuop7(this.ref.pointer, _sel_thermalState); return NSProcessInfoThermalState.fromValue(_ret); } /// isLowPowerModeEnabled bool get lowPowerModeEnabled { - return _objc_msgSend_13(this.pointer, _sel_isLowPowerModeEnabled); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLowPowerModeEnabled); } /// isMacCatalystApp bool get macCatalystApp { - return _objc_msgSend_13(this.pointer, _sel_isMacCatalystApp); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isMacCatalystApp); } /// isiOSAppOnMac bool get iOSAppOnMac { - return _objc_msgSend_13(this.pointer, _sel_isiOSAppOnMac); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isiOSAppOnMac); } /// init NSProcessInfo init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } /// new static NSProcessInfo new1() { - final _ret = _objc_msgSend_19(_class_NSProcessInfo, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_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); + _objc_msgSend_1b3ihd0(_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); + final _ret = _objc_msgSend_1unuoxw(_class_NSProcessInfo, _sel_alloc); return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } @@ -21763,269 +22695,382 @@ class NSProcessInfo extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSProcessInfo, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSProcessInfo, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSProcessInfo, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSProcessInfo, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSProcessInfo, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSProcessInfo, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSProcessInfo, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSProcessInfo, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSProcessInfo, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSProcessInfo self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSProcessInfo retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSProcessInfo autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); + } } -late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); -late final _sel_processInfo = objc.registerName("processInfo"); -final _objc_msgSend_426 = 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"); +late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); -final class NSOperatingSystemVersion extends ffi.Struct { - @ffi.Long() - external int majorVersion; +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); - @ffi.Long() - external int minorVersion; + final int value; + const NSTextCheckingType(this.value); - @ffi.Long() - external int patchVersion; + 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_operatingSystemVersion = - objc.registerName("operatingSystemVersion"); -final _objc_msgSend_427 = objc.msgSendPointer +late final _sel_resultType = objc.registerName("resultType"); +final _objc_msgSend_1d8v3ql = objc.msgSendPointer .cast< ffi.NativeFunction< - NSOperatingSystemVersion Function(ffi.Pointer, + ffi.Uint64 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - NSOperatingSystemVersion Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_427Stret = objc.msgSendStretPointer +late final _sel_range = objc.registerName("range"); +final _objc_msgSend_vi3lef = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, + objc.NSRange Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + objc.NSRange Function( 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_428 = objc.msgSendPointer +final _objc_msgSend_vi3lefStret = objc.msgSendStretPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, NSOperatingSystemVersion)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .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:"); -late final _sel_enableAutomaticTermination_ = - objc.registerName("enableAutomaticTermination:"); -late final _sel_automaticTerminationSupportEnabled = - objc.registerName("automaticTerminationSupportEnabled"); -late final _sel_setAutomaticTerminationSupportEnabled_ = - objc.registerName("setAutomaticTerminationSupportEnabled:"); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); +late final _sel_orthography = objc.registerName("orthography"); +late final _sel_grammarDetails = objc.registerName("grammarDetails"); +late final _sel_duration = objc.registerName("duration"); +late final _sel_components = objc.registerName("components"); +late final _sel_replacementString = objc.registerName("replacementString"); +late final _sel_alternativeStrings = objc.registerName("alternativeStrings"); +late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); -enum NSActivityOptions { - NSActivityIdleDisplaySleepDisabled(1099511627776), - NSActivityIdleSystemSleepDisabled(1048576), - NSActivitySuddenTerminationDisabled(16384), - NSActivityAutomaticTerminationDisabled(32768), - NSActivityAnimationTrackingEnabled(35184372088832), - NSActivityTrackingEnabled(70368744177664), - NSActivityUserInitiated(16777215), - NSActivityUserInitiatedAllowingIdleSystemSleep(15728639), - NSActivityBackground(255), - NSActivityLatencyCritical(1095216660480), - NSActivityUserInteractive(1095233437695); +enum NSRegularExpressionOptions { + NSRegularExpressionCaseInsensitive(1), + NSRegularExpressionAllowCommentsAndWhitespace(2), + NSRegularExpressionIgnoreMetacharacters(4), + NSRegularExpressionDotMatchesLineSeparators(8), + NSRegularExpressionAnchorsMatchLines(16), + NSRegularExpressionUseUnixLineSeparators(32), + NSRegularExpressionUseUnicodeWordBoundaries(64); final int value; - const NSActivityOptions(this.value); + const NSRegularExpressionOptions(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"), + 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_beginActivityWithOptions_reason_ = - objc.registerName("beginActivityWithOptions:reason:"); -final _objc_msgSend_429 = 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_430 = objc.msgSendPointer +} + +late final _sel_regularExpressionWithPattern_options_error_ = + objc.registerName("regularExpressionWithPattern:options:error:"); +final _objc_msgSend_mq25jr = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Uint64, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, + ffi.Pointer>)>(); +late final _sel_initWithPattern_options_error_ = + objc.registerName("initWithPattern:options:error:"); +late final _sel_pattern = objc.registerName("pattern"); +late final _sel_options = objc.registerName("options"); +final _objc_msgSend_jt3cu0 = 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"), + }; +} + +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"), + }; +} + +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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) + .cast(); +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, - 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); + int, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerTrampoline( + 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); + objc.objectRelease(block.cast()); +} -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); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool { /// 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); - } + static objc.ObjCBlock< + ffi.Void Function( + NSTextCheckingResult?, ffi.UnsignedLong, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)>(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; + static objc + .ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock)> + fromFunction(void Function(NSTextCheckingResult?, NSMatchingFlags, ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureCallable, + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), + NSMatchingFlags.fromValue(arg1), + arg2)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -22036,447 +23081,438 @@ class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { /// /// 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); + static objc.ObjCBlock< + ffi.Void Function( + NSTextCheckingResult?, ffi.UnsignedLong, ffi.Pointer)> + listener( + void Function( + NSTextCheckingResult?, NSMatchingFlags, ffi.Pointer) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerCallable + .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)); + final wrapper = _wrapListenerBlock_9w6y6n(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)>(wrapper, retain: false, release: true); + } } -late final _sel_performExpiringActivityWithReason_usingBlock_ = - objc.registerName("performExpiringActivityWithReason:usingBlock:"); -final _objc_msgSend_431 = objc.msgSendPointer +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + NSTextCheckingResult?, ffi.UnsignedLong, ffi.Pointer)> { + void call(NSTextCheckingResult? arg0, NSMatchingFlags arg1, + ffi.Pointer arg2) => + ref.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)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.value, arg2); +} + +late final _sel_enumerateMatchesInString_options_range_usingBlock_ = + objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); +final _objc_msgSend_1c1lm06 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + objc.NSRange, + 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_432 = objc.msgSendPointer + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_matchesInString_options_range_ = + objc.registerName("matchesInString:options:range:"); +final _objc_msgSend_1ntyxzp = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_numberOfMatchesInString_options_range_ = + objc.registerName("numberOfMatchesInString:options:range:"); +final _objc_msgSend_1y9v6af = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() .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"); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_firstMatchInString_options_range_ = + objc.registerName("firstMatchInString:options:range:"); +late final _sel_rangeOfFirstMatchInString_options_range_ = + objc.registerName("rangeOfFirstMatchInString:options:range:"); +final _objc_msgSend_6yg79o = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +final _objc_msgSend_6yg79oStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = + objc.registerName( + "stringByReplacingMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_zsgini = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_replaceMatchesInString_options_range_withTemplate_ = + objc.registerName("replaceMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_19w8ucc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_replacementStringForResult_inString_offset_template_ = + objc.registerName("replacementStringForResult:inString:offset:template:"); +late final _sel_escapedTemplateForString_ = + objc.registerName("escapedTemplateForString:"); -/// NSTextCheckingResult -class NSTextCheckingResult extends objc.NSObject { - NSTextCheckingResult._(ffi.Pointer pointer, +/// 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 [NSTextCheckingResult] that points to the same underlying object as [other]. - NSTextCheckingResult.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSRegularExpression] that points to the same underlying object as [other]. + NSRegularExpression.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSTextCheckingResult] that wraps the given raw object pointer. - NSTextCheckingResult.castFromPointer(ffi.Pointer other, + /// 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 [NSTextCheckingResult]. + /// Returns whether [obj] is an instance of [NSRegularExpression]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); - } - - /// resultType - NSTextCheckingType get resultType { - final _ret = _objc_msgSend_433(this.pointer, _sel_resultType); - return NSTextCheckingType.fromValue(_ret); - } - - /// range - void getRange(ffi.Pointer<_NSRange> stret) { - objc.useMsgSendVariants - ? _objc_msgSend_434Stret(stret, this.pointer, _sel_range) - : stret.ref = _objc_msgSend_434(this.pointer, _sel_range); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); } - /// orthography - NSOrthography? get orthography { - final _ret = _objc_msgSend_435(this.pointer, _sel_orthography); + /// regularExpressionWithPattern:options:error: + static NSRegularExpression? regularExpressionWithPattern_options_error_( + objc.NSString pattern, + NSRegularExpressionOptions options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_mq25jr( + _class_NSRegularExpression, + _sel_regularExpressionWithPattern_options_error_, + pattern.ref.pointer, + options.value, + error); return _ret.address == 0 ? null - : NSOrthography.castFromPointer(_ret, retain: true, release: true); + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - /// grammarDetails - objc.NSArray? get grammarDetails { - final _ret = _objc_msgSend_86(this.pointer, _sel_grammarDetails); + /// initWithPattern:options:error: + NSRegularExpression? initWithPattern_options_error_( + objc.NSString pattern, + NSRegularExpressionOptions options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_mq25jr( + this.ref.retainAndReturnPointer(), + _sel_initWithPattern_options_error_, + pattern.ref.pointer, + options.value, + error); return _ret.address == 0 ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - /// date - objc.NSDate? get date { - final _ret = _objc_msgSend_124(this.pointer, _sel_date); - return _ret.address == 0 - ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + /// pattern + objc.NSString get pattern { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_pattern); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// timeZone - NSTimeZone? get timeZone { - final _ret = _objc_msgSend_140(this.pointer, _sel_timeZone); - return _ret.address == 0 - ? null - : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + /// options + NSRegularExpressionOptions get options { + final _ret = _objc_msgSend_jt3cu0(this.ref.pointer, _sel_options); + return NSRegularExpressionOptions.fromValue(_ret); } - /// duration - double get duration { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_duration) - : _objc_msgSend_18(this.pointer, _sel_duration); + /// numberOfCaptureGroups + int get numberOfCaptureGroups { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_numberOfCaptureGroups); } - /// components - objc.NSDictionary? get components { - final _ret = _objc_msgSend_82(this.pointer, _sel_components); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// escapedPatternForString: + static objc.NSString escapedPatternForString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, + _sel_escapedPatternForString_, string.ref.pointer); + return objc.NSString.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); + /// enumerateMatchesInString:options:range:usingBlock: + void enumerateMatchesInString_options_range_usingBlock_( + objc.NSString string, + NSMatchingOptions options, + objc.NSRange range, + objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)> + block) { + _objc_msgSend_1c1lm06( + this.ref.pointer, + _sel_enumerateMatchesInString_options_range_usingBlock_, + string.ref.pointer, + options.value, + range, + block.ref.pointer); } - /// 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); + /// matchesInString:options:range: + objc.NSArray matchesInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + final _ret = _objc_msgSend_1ntyxzp( + this.ref.pointer, + _sel_matchesInString_options_range_, + string.ref.pointer, + options.value, + range); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// alternativeStrings - objc.NSArray? get alternativeStrings { - final _ret = _objc_msgSend_86(this.pointer, _sel_alternativeStrings); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// numberOfMatchesInString:options:range: + int numberOfMatchesInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + return _objc_msgSend_1y9v6af( + this.ref.pointer, + _sel_numberOfMatchesInString_options_range_, + string.ref.pointer, + options.value, + range); } - /// regularExpression - NSRegularExpression? get regularExpression { - final _ret = _objc_msgSend_447(this.pointer, _sel_regularExpression); + /// firstMatchInString:options:range: + NSTextCheckingResult? firstMatchInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + final _ret = _objc_msgSend_1ntyxzp( + this.ref.pointer, + _sel_firstMatchInString_options_range_, + string.ref.pointer, + options.value, + range); return _ret.address == 0 ? null - : NSRegularExpression.castFromPointer(_ret, + : NSTextCheckingResult.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_57(this.pointer, _sel_numberOfRanges); - } - - /// rangeAtIndex: - void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { - objc.useMsgSendVariants - ? _objc_msgSend_448Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) - : stret.ref = _objc_msgSend_448(this.pointer, _sel_rangeAtIndex_, idx); - } - - /// rangeWithName: - void rangeWithName_(ffi.Pointer<_NSRange> stret, objc.NSString name) { + /// rangeOfFirstMatchInString:options:range: + objc.NSRange rangeOfFirstMatchInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_449Stret( - stret, this.pointer, _sel_rangeWithName_, name.pointer) - : stret.ref = - _objc_msgSend_449(this.pointer, _sel_rangeWithName_, name.pointer); - } - - /// resultByAdjustingRangesWithOffset: - NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { - final _ret = _objc_msgSend_450( - this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); - return NSTextCheckingResult.castFromPointer(_ret, - retain: true, release: true); - } - - /// addressComponents - objc.NSDictionary? get addressComponents { - final _ret = _objc_msgSend_82(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_451( - _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_452( - _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_453(_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_454(_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_455( - _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_456( - _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_457(_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_458( - _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_458( - _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_458( - _class_NSTextCheckingResult, - _sel_replacementCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult.castFromPointer(_ret, - retain: true, release: true); + ? _objc_msgSend_6yg79oStret( + _ptr, + this.ref.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.ref.pointer, + options.value, + range) + : _ptr.ref = _objc_msgSend_6yg79o( + this.ref.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.ref.pointer, + options.value, + range); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); } - /// correctionCheckingResultWithRange:replacementString: - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_( - _NSRange range, objc.NSString replacementString) { - final _ret = _objc_msgSend_458( - _class_NSTextCheckingResult, - _sel_correctionCheckingResultWithRange_replacementString_, + /// stringByReplacingMatchesInString:options:range:withTemplate: + objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( + objc.NSString string, + NSMatchingOptions options, + objc.NSRange range, + objc.NSString templ) { + final _ret = _objc_msgSend_zsgini( + this.ref.pointer, + _sel_stringByReplacingMatchesInString_options_range_withTemplate_, + string.ref.pointer, + options.value, range, - replacementString.pointer); - return NSTextCheckingResult.castFromPointer(_ret, - retain: true, release: true); + templ.ref.pointer); + return objc.NSString.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_459( - _class_NSTextCheckingResult, - _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, + /// replaceMatchesInString:options:range:withTemplate: + int replaceMatchesInString_options_range_withTemplate_( + objc.NSMutableString string, + NSMatchingOptions options, + objc.NSRange range, + objc.NSString templ) { + return _objc_msgSend_19w8ucc( + this.ref.pointer, + _sel_replaceMatchesInString_options_range_withTemplate_, + string.ref.pointer, + options.value, 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_460( - _class_NSTextCheckingResult, - _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, - ranges, - count, - regularExpression.pointer); - return NSTextCheckingResult.castFromPointer(_ret, - retain: true, release: true); + templ.ref.pointer); } - /// phoneNumberCheckingResultWithRange:phoneNumber: - static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( - _NSRange range, objc.NSString phoneNumber) { - final _ret = _objc_msgSend_458( - _class_NSTextCheckingResult, - _sel_phoneNumberCheckingResultWithRange_phoneNumber_, - range, - phoneNumber.pointer); - return NSTextCheckingResult.castFromPointer(_ret, - retain: true, release: true); + /// replacementStringForResult:inString:offset:template: + objc.NSString replacementStringForResult_inString_offset_template_( + NSTextCheckingResult result, + objc.NSString string, + int offset, + objc.NSString templ) { + final _ret = _objc_msgSend_eyseqq( + this.ref.pointer, + _sel_replacementStringForResult_inString_offset_template_, + result.ref.pointer, + string.ref.pointer, + offset, + templ.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// transitInformationCheckingResultWithRange:components: - static NSTextCheckingResult - transitInformationCheckingResultWithRange_components_( - _NSRange range, objc.NSDictionary components) { - final _ret = _objc_msgSend_456( - _class_NSTextCheckingResult, - _sel_transitInformationCheckingResultWithRange_components_, - range, - components.pointer); - return NSTextCheckingResult.castFromPointer(_ret, - retain: true, release: true); + /// escapedTemplateForString: + static objc.NSString escapedTemplateForString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, + _sel_escapedTemplateForString_, string.ref.pointer); + return objc.NSString.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); + NSRegularExpression init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSTextCheckingResult new1() { - final _ret = _objc_msgSend_19(_class_NSTextCheckingResult, _sel_new); - return NSTextCheckingResult.castFromPointer(_ret, + static NSRegularExpression new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSRegularExpression, _sel_new); + return NSRegularExpression.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, + static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSRegularExpression, _sel_allocWithZone_, zone); + return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSTextCheckingResult alloc() { - final _ret = _objc_msgSend_19(_class_NSTextCheckingResult, _sel_alloc); - return NSTextCheckingResult.castFromPointer(_ret, + static NSRegularExpression alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSRegularExpression, _sel_alloc); + return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); } @@ -22485,1290 +23521,1222 @@ class NSTextCheckingResult extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSTextCheckingResult, + _objc_msgSend_cqxsqq( + _class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSTextCheckingResult, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSRegularExpression, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSTextCheckingResult, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSRegularExpression, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSTextCheckingResult, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSRegularExpression, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSTextCheckingResult, + _objc_msgSend_1tjlcwl( + _class_NSRegularExpression, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSRegularExpression, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSRegularExpression, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} -late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); + /// self + NSRegularExpression self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); + } -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); + /// retain + NSRegularExpression retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSTextCheckingType(this.value); + /// autorelease + NSRegularExpression autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); + } - 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"), - }; + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSRegularExpression, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSRegularExpression? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); + } } -late final _sel_resultType = objc.registerName("resultType"); -final _objc_msgSend_433 = objc.msgSendPointer +late final _sel_regularExpression = objc.registerName("regularExpression"); +late final _sel_phoneNumber = objc.registerName("phoneNumber"); +late final _sel_numberOfRanges = objc.registerName("numberOfRanges"); +late final _sel_rangeAtIndex_ = objc.registerName("rangeAtIndex:"); +final _objc_msgSend_rmij85 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Uint64 Function(ffi.Pointer, - ffi.Pointer)>>() + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_range = objc.registerName("range"); -final _objc_msgSend_434 = objc.msgSendPointer + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_rmij85Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - _NSRange Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_434Stret = objc.msgSendStretPointer + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); +final _objc_msgSend_1pl4rx6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1pl4rx6Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_NSRange>, + ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_orthography = objc.registerName("orthography"); -final _objc_msgSend_435 = objc.msgSendPointer + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resultByAdjustingRangesWithOffset_ = + objc.registerName("resultByAdjustingRangesWithOffset:"); +late final _sel_addressComponents = objc.registerName("addressComponents"); +late final _sel_orthographyCheckingResultWithRange_orthography_ = + objc.registerName("orthographyCheckingResultWithRange:orthography:"); +final _objc_msgSend_1g0atks = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_grammarDetails = objc.registerName("grammarDetails"); -late final _sel_duration = objc.registerName("duration"); -late final _sel_components = objc.registerName("components"); -late final _sel_replacementString = objc.registerName("replacementString"); -late final _sel_alternativeStrings = objc.registerName("alternativeStrings"); + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_spellCheckingResultWithRange_ = + objc.registerName("spellCheckingResultWithRange:"); +late final _sel_grammarCheckingResultWithRange_details_ = + objc.registerName("grammarCheckingResultWithRange:details:"); +late final _sel_dateCheckingResultWithRange_date_ = + objc.registerName("dateCheckingResultWithRange:date:"); +late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = + objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); +final _objc_msgSend_1trgi6b = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer, + double)>(); +late final _sel_addressCheckingResultWithRange_components_ = + objc.registerName("addressCheckingResultWithRange:components:"); +late final _sel_linkCheckingResultWithRange_URL_ = + objc.registerName("linkCheckingResultWithRange:URL:"); +late final _sel_quoteCheckingResultWithRange_replacementString_ = + objc.registerName("quoteCheckingResultWithRange:replacementString:"); +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_1desjtb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = + objc.registerName( + "regularExpressionCheckingResultWithRanges:count:regularExpression:"); +final _objc_msgSend_1s39epe = 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_phoneNumberCheckingResultWithRange_phoneNumber_ = + objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); +late final _sel_transitInformationCheckingResultWithRange_components_ = + objc.registerName("transitInformationCheckingResultWithRange:components:"); -/// NSRegularExpression -class NSRegularExpression extends objc.NSObject { - NSRegularExpression._(ffi.Pointer pointer, +/// 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 [NSRegularExpression] that points to the same underlying object as [other]. - NSRegularExpression.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSTextCheckingResult] that points to the same underlying object as [other]. + NSTextCheckingResult.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSRegularExpression] that wraps the given raw object pointer. - NSRegularExpression.castFromPointer(ffi.Pointer other, + /// 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 [NSRegularExpression]. + /// Returns whether [obj] is an instance of [NSTextCheckingResult]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); } - /// regularExpressionWithPattern:options:error: - static NSRegularExpression? regularExpressionWithPattern_options_error_( - objc.NSString pattern, - NSRegularExpressionOptions options, - ffi.Pointer> error) { - final _ret = _objc_msgSend_436( - _class_NSRegularExpression, - _sel_regularExpressionWithPattern_options_error_, - pattern.pointer, - options.value, - error); + /// resultType + NSTextCheckingType get resultType { + final _ret = _objc_msgSend_1d8v3ql(this.ref.pointer, _sel_resultType); + return NSTextCheckingType.fromValue(_ret); + } + + /// range + objc.NSRange get range { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_vi3lefStret(_ptr, this.ref.pointer, _sel_range) + : _ptr.ref = _objc_msgSend_vi3lef(this.ref.pointer, _sel_range); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// orthography + NSOrthography? get orthography { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_orthography); return _ret.address == 0 ? null - : NSRegularExpression.castFromPointer(_ret, - retain: true, release: true); + : NSOrthography.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_437( - this.pointer, - _sel_initWithPattern_options_error_, - pattern.pointer, - options.value, - error); + /// grammarDetails + objc.NSArray? get grammarDetails { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_grammarDetails); return _ret.address == 0 ? null - : NSRegularExpression.castFromPointer(_ret, - retain: true, release: true); + : objc.NSArray.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); + /// date + objc.NSDate? get date { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_date); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// options - NSRegularExpressionOptions get options { - final _ret = _objc_msgSend_438(this.pointer, _sel_options); - return NSRegularExpressionOptions.fromValue(_ret); + /// timeZone + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_timeZone); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// numberOfCaptureGroups - int get numberOfCaptureGroups { - return _objc_msgSend_57(this.pointer, _sel_numberOfCaptureGroups); + /// duration + double get duration { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_duration) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_duration); } - /// escapedPatternForString: - static objc.NSString escapedPatternForString_(objc.NSString string) { - final _ret = _objc_msgSend_306(_class_NSRegularExpression, - _sel_escapedPatternForString_, string.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// components + objc.NSDictionary? get components { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_components); + return _ret.address == 0 + ? null + : objc.NSDictionary.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_439( - this.pointer, - _sel_enumerateMatchesInString_options_range_usingBlock_, - string.pointer, - options.value, - range, - block.pointer); + /// URL + objc.NSURL? get URL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// matchesInString:options:range: - objc.NSArray matchesInString_options_range_( - objc.NSString string, NSMatchingOptions options, _NSRange range) { - final _ret = _objc_msgSend_440( - this.pointer, - _sel_matchesInString_options_range_, - string.pointer, - options.value, - range); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// replacementString + objc.NSString? get replacementString { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_replacementString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// numberOfMatchesInString:options:range: - int numberOfMatchesInString_options_range_( - objc.NSString string, NSMatchingOptions options, _NSRange range) { - return _objc_msgSend_441( - this.pointer, - _sel_numberOfMatchesInString_options_range_, - string.pointer, - options.value, - range); + /// alternativeStrings + objc.NSArray? get alternativeStrings { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_alternativeStrings); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// firstMatchInString:options:range: - NSTextCheckingResult? firstMatchInString_options_range_( - objc.NSString string, NSMatchingOptions options, _NSRange range) { - final _ret = _objc_msgSend_442( - this.pointer, - _sel_firstMatchInString_options_range_, - string.pointer, - options.value, - range); + /// regularExpression + NSRegularExpression? get regularExpression { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_regularExpression); return _ret.address == 0 ? null - : NSTextCheckingResult.castFromPointer(_ret, + : NSRegularExpression.castFromPointer(_ret, retain: true, release: true); } - /// rangeOfFirstMatchInString:options:range: - void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, - objc.NSString string, NSMatchingOptions options, _NSRange range) { + /// phoneNumber + objc.NSString? get phoneNumber { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_phoneNumber); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// numberOfRanges + int get numberOfRanges { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_numberOfRanges); + } + + /// rangeAtIndex: + objc.NSRange rangeAtIndex_(int idx) { + final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_443Stret( - stret, - this.pointer, - _sel_rangeOfFirstMatchInString_options_range_, - string.pointer, - options.value, - range) - : stret.ref = _objc_msgSend_443( - this.pointer, - _sel_rangeOfFirstMatchInString_options_range_, - string.pointer, - options.value, - range); + ? _objc_msgSend_rmij85Stret( + _ptr, this.ref.pointer, _sel_rangeAtIndex_, idx) + : _ptr.ref = + _objc_msgSend_rmij85(this.ref.pointer, _sel_rangeAtIndex_, idx); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); } - /// stringByReplacingMatchesInString:options:range:withTemplate: - objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( - objc.NSString string, - NSMatchingOptions options, - _NSRange range, - objc.NSString templ) { - final _ret = _objc_msgSend_444( - this.pointer, - _sel_stringByReplacingMatchesInString_options_range_withTemplate_, - string.pointer, - options.value, - range, - templ.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// rangeWithName: + objc.NSRange rangeWithName_(objc.NSString name) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1pl4rx6Stret( + _ptr, this.ref.pointer, _sel_rangeWithName_, name.ref.pointer) + : _ptr.ref = _objc_msgSend_1pl4rx6( + this.ref.pointer, _sel_rangeWithName_, name.ref.pointer); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); } - /// replaceMatchesInString:options:range:withTemplate: - int replaceMatchesInString_options_range_withTemplate_( - objc.NSMutableString string, - NSMatchingOptions options, - _NSRange range, - objc.NSString templ) { - return _objc_msgSend_445( - this.pointer, - _sel_replaceMatchesInString_options_range_withTemplate_, - string.pointer, - options.value, - range, - templ.pointer); + /// resultByAdjustingRangesWithOffset: + NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { + final _ret = _objc_msgSend_crtxa9( + this.ref.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// replacementStringForResult:inString:offset:template: - objc.NSString replacementStringForResult_inString_offset_template_( - NSTextCheckingResult result, - objc.NSString string, - int offset, - objc.NSString templ) { - final _ret = _objc_msgSend_446( - this.pointer, - _sel_replacementStringForResult_inString_offset_template_, - result.pointer, - string.pointer, - offset, - templ.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// addressComponents + objc.NSDictionary? get addressComponents { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_addressComponents); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// escapedTemplateForString: - static objc.NSString escapedTemplateForString_(objc.NSString string) { - final _ret = _objc_msgSend_306(_class_NSRegularExpression, - _sel_escapedTemplateForString_, string.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// orthographyCheckingResultWithRange:orthography: + static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( + objc.NSRange range, NSOrthography orthography) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_orthographyCheckingResultWithRange_orthography_, + range, + orthography.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// init - NSRegularExpression init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSRegularExpression.castFromPointer(_ret, + /// spellCheckingResultWithRange: + static NSTextCheckingResult spellCheckingResultWithRange_( + objc.NSRange range) { + final _ret = _objc_msgSend_176f8tz( + _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); + return NSTextCheckingResult.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); + /// grammarCheckingResultWithRange:details: + static NSTextCheckingResult grammarCheckingResultWithRange_details_( + objc.NSRange range, objc.NSArray details) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_grammarCheckingResultWithRange_details_, + range, + details.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, 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); + /// dateCheckingResultWithRange:date: + static NSTextCheckingResult dateCheckingResultWithRange_date_( + objc.NSRange range, objc.NSDate date) { + final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_, range, date.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// alloc - static NSRegularExpression alloc() { - final _ret = _objc_msgSend_19(_class_NSRegularExpression, _sel_alloc); - return NSRegularExpression.castFromPointer(_ret, - retain: false, release: true); + /// dateCheckingResultWithRange:date:timeZone:duration: + static NSTextCheckingResult + dateCheckingResultWithRange_date_timeZone_duration_(objc.NSRange range, + objc.NSDate date, NSTimeZone timeZone, double duration) { + final _ret = _objc_msgSend_1trgi6b( + _class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_timeZone_duration_, + range, + date.ref.pointer, + timeZone.ref.pointer, + duration); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, 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); + /// addressCheckingResultWithRange:components: + static NSTextCheckingResult addressCheckingResultWithRange_components_( + objc.NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_addressCheckingResultWithRange_components_, + range, + components.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSRegularExpression, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// linkCheckingResultWithRange:URL: + static NSTextCheckingResult linkCheckingResultWithRange_URL_( + objc.NSRange range, objc.NSURL url) { + final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, + _sel_linkCheckingResultWithRange_URL_, range, url.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); + /// quoteCheckingResultWithRange:replacementString: + static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_quoteCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSRegularExpression, _sel_useStoredAccessor); + /// dashCheckingResultWithRange:replacementString: + static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_dashCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// 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); + /// replacementCheckingResultWithRange:replacementString: + static NSTextCheckingResult + replacementCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_replacementCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSRegularExpression, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// correctionCheckingResultWithRange:replacementString: + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSRegularExpression, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// correctionCheckingResultWithRange:replacementString:alternativeStrings: + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_alternativeStrings_( + objc.NSRange range, + objc.NSString replacementString, + objc.NSArray alternativeStrings) { + final _ret = _objc_msgSend_1desjtb( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, + range, + replacementString.ref.pointer, + alternativeStrings.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// regularExpressionCheckingResultWithRanges:count:regularExpression: + static NSTextCheckingResult + regularExpressionCheckingResultWithRanges_count_regularExpression_( + ffi.Pointer ranges, + int count, + NSRegularExpression regularExpression) { + final _ret = _objc_msgSend_1s39epe( + _class_NSTextCheckingResult, + _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, + ranges, + count, + regularExpression.ref.pointer); + return NSTextCheckingResult.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); + /// phoneNumberCheckingResultWithRange:phoneNumber: + static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( + objc.NSRange range, objc.NSString phoneNumber) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_phoneNumberCheckingResultWithRange_phoneNumber_, + range, + phoneNumber.ref.pointer); + return NSTextCheckingResult.castFromPointer(_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_436 = 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_437 = 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_438 = 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); + /// transitInformationCheckingResultWithRange:components: + static NSTextCheckingResult + transitInformationCheckingResultWithRange_components_( + objc.NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_transitInformationCheckingResultWithRange_components_, + range, + components.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// 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; + /// init + NSTextCheckingResult init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// 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; + /// new + static NSTextCheckingResult new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTextCheckingResult, _sel_new); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); + } - 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); -} + /// allocWithZone: + static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSTextCheckingResult, _sel_allocWithZone_, zone); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); + } -enum NSMatchingFlags { - NSMatchingProgress(1), - NSMatchingCompleted(2), - NSMatchingHitEnd(4), - NSMatchingRequiredEnd(8), - NSMatchingInternalError(16); + /// alloc + static NSTextCheckingResult alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTextCheckingResult, _sel_alloc); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); + } - final int value; - const NSMatchingFlags(this.value); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } - static NSMatchingFlags fromValue(int value) => switch (value) { - 1 => NSMatchingProgress, - 2 => NSMatchingCompleted, - 4 => NSMatchingHitEnd, - 8 => NSMatchingRequiredEnd, - 16 => NSMatchingInternalError, - _ => throw ArgumentError("Unknown value for NSMatchingFlags: $value"), - }; -} + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } -late final _sel_enumerateMatchesInString_options_range_usingBlock_ = - objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); -final _objc_msgSend_439 = 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_440 = 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_441 = 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_442 = 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_443 = 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_443Stret = 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_444 = 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_445 = 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_446 = 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_447 = 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_448 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_448Stret = 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_449 = 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_449Stret = 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_450 = 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_451 = objc.msgSendPointer + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSTextCheckingResult, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSTextCheckingResult, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSTextCheckingResult, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSTextCheckingResult, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSTextCheckingResult self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSTextCheckingResult retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSTextCheckingResult autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSTextCheckingResult, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSTextCheckingResult? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _class_NSTimer = objc.getClass("NSTimer"); +late final _sel_timerWithTimeInterval_invocation_repeats_ = + objc.registerName("timerWithTimeInterval:invocation:repeats:"); +final _objc_msgSend_1dbp0rg = 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_452 = 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_453 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( + ffi.Double, ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_dateCheckingResultWithRange_date_ = - objc.registerName("dateCheckingResultWithRange:date:"); -final _objc_msgSend_454 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( + double, ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = - objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); -final _objc_msgSend_455 = objc.msgSendPointer + 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_12fx7q4 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Double, ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Double)>>() + ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, + double, ffi.Pointer, + ffi.Pointer, ffi.Pointer, - double)>(); -late final _sel_addressCheckingResultWithRange_components_ = - objc.registerName("addressCheckingResultWithRange:components:"); -final _objc_msgSend_456 = objc.msgSendPointer + 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); +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSTimer_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSTimer_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTimer_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSTimer { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSTimer_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(NSTimer) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTimer_closureCallable, + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(NSTimer) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTimer_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => + fn(NSTimer.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSTimer_CallExtension + on objc.ObjCBlock { + void call(NSTimer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); +} + +late final _sel_timerWithTimeInterval_repeats_block_ = + objc.registerName("timerWithTimeInterval:repeats:block:"); +final _objc_msgSend_1t6yrah = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Double, + ffi.Bool, + 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_457 = objc.msgSendPointer + 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_tzx95k = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype 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_458 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype 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_ = + ffi.Pointer, + double, + bool, + ffi.Pointer)>(); +late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_ = objc.registerName( - "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); -final _objc_msgSend_459 = objc.msgSendPointer + "initWithFireDate:interval:target:selector:userInfo:repeats:"); +final _objc_msgSend_1thgzrb = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, - ffi.Pointer)>>() + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = - objc.registerName( - "regularExpressionCheckingResultWithRanges:count:regularExpression:"); -final _objc_msgSend_460 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( + double, 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:"); - -/// NSURLCache -class NSURLCache extends objc.NSObject { - NSURLCache._(ffi.Pointer pointer, + ffi.Pointer, + bool)>(); +late final _sel_fire = objc.registerName("fire"); +late final _sel_fireDate = objc.registerName("fireDate"); +late final _sel_setFireDate_ = objc.registerName("setFireDate:"); +late final _sel_timeInterval = objc.registerName("timeInterval"); +late final _sel_tolerance = objc.registerName("tolerance"); +late final _sel_setTolerance_ = objc.registerName("setTolerance:"); + +/// 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 [NSURLCache] that points to the same underlying object as [other]. - NSURLCache.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSTimer] that points to the same underlying object as [other]. + NSTimer.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLCache] that wraps the given raw object pointer. - NSURLCache.castFromPointer(ffi.Pointer other, + /// 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 [NSURLCache]. + /// Returns whether [obj] is an instance of [NSTimer]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); - } - - /// sharedURLCache - static NSURLCache getSharedURLCache() { - final _ret = _objc_msgSend_461(_class_NSURLCache, _sel_sharedURLCache); - return NSURLCache.castFromPointer(_ret, retain: true, release: true); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTimer); } - /// setSharedURLCache: - static void setSharedURLCache(NSURLCache value) { - return _objc_msgSend_462( - _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); + /// timerWithTimeInterval:invocation:repeats: + static NSTimer timerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_1dbp0rg( + _class_NSTimer, + _sel_timerWithTimeInterval_invocation_repeats_, + ti, + invocation.ref.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - /// initWithMemoryCapacity:diskCapacity:diskPath: - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - int memoryCapacity, int diskCapacity, objc.NSString? path) { - final _ret = _objc_msgSend_463( - this.pointer, - _sel_initWithMemoryCapacity_diskCapacity_diskPath_, - memoryCapacity, - diskCapacity, - path?.pointer ?? ffi.nullptr); - return NSURLCache.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_1dbp0rg( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_invocation_repeats_, + ti, + invocation.ref.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - /// initWithMemoryCapacity:diskCapacity:directoryURL: - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { - final _ret = _objc_msgSend_464( - this.pointer, - _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, - memoryCapacity, - diskCapacity, - directoryURL?.pointer ?? ffi.nullptr); - return NSURLCache.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_12fx7q4( + _class_NSTimer, + _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.ref.pointer, + aSelector, + userInfo?.ref.pointer ?? ffi.nullptr, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - /// cachedResponseForRequest: - NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_469( - this.pointer, _sel_cachedResponseForRequest_, request.pointer); - return _ret.address == 0 - ? null - : NSCachedURLResponse.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_12fx7q4( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.ref.pointer, + aSelector, + userInfo?.ref.pointer ?? ffi.nullptr, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - /// storeCachedResponse:forRequest: - void storeCachedResponse_forRequest_( - NSCachedURLResponse cachedResponse, NSURLRequest request) { - _objc_msgSend_470(this.pointer, _sel_storeCachedResponse_forRequest_, - cachedResponse.pointer, request.pointer); + /// timerWithTimeInterval:repeats:block: + static NSTimer timerWithTimeInterval_repeats_block_(double interval, + bool repeats, objc.ObjCBlock block) { + final _ret = _objc_msgSend_1t6yrah( + _class_NSTimer, + _sel_timerWithTimeInterval_repeats_block_, + interval, + repeats, + block.ref.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - /// removeCachedResponseForRequest: - void removeCachedResponseForRequest_(NSURLRequest request) { - _objc_msgSend_471( - this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); + /// scheduledTimerWithTimeInterval:repeats:block: + static NSTimer scheduledTimerWithTimeInterval_repeats_block_(double interval, + bool repeats, objc.ObjCBlock block) { + final _ret = _objc_msgSend_1t6yrah( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_repeats_block_, + interval, + repeats, + block.ref.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - /// removeAllCachedResponses - void removeAllCachedResponses() { - _objc_msgSend_7(this.pointer, _sel_removeAllCachedResponses); + /// initWithFireDate:interval:repeats:block: + NSTimer initWithFireDate_interval_repeats_block_( + objc.NSDate date, + double interval, + bool repeats, + objc.ObjCBlock block) { + final _ret = _objc_msgSend_tzx95k( + this.ref.retainAndReturnPointer(), + _sel_initWithFireDate_interval_repeats_block_, + date.ref.pointer, + interval, + repeats, + block.ref.pointer); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - /// removeCachedResponsesSinceDate: - void removeCachedResponsesSinceDate_(objc.NSDate date) { - _objc_msgSend_255( - this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); + /// 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_1thgzrb( + this.ref.retainAndReturnPointer(), + _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, + date.ref.pointer, + ti, + t.ref.pointer, + s, + ui?.ref.pointer ?? ffi.nullptr, + rep); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - /// memoryCapacity - int get memoryCapacity { - return _objc_msgSend_57(this.pointer, _sel_memoryCapacity); + /// fire + void fire() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_fire); } - /// setMemoryCapacity: - set memoryCapacity(int value) { - return _objc_msgSend_133(this.pointer, _sel_setMemoryCapacity_, value); + /// fireDate + objc.NSDate get fireDate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fireDate); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// diskCapacity - int get diskCapacity { - return _objc_msgSend_57(this.pointer, _sel_diskCapacity); + /// setFireDate: + set fireDate(objc.NSDate value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFireDate_, value.ref.pointer); } - /// setDiskCapacity: - set diskCapacity(int value) { - return _objc_msgSend_133(this.pointer, _sel_setDiskCapacity_, value); + /// timeInterval + double get timeInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeInterval) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeInterval); } - /// currentMemoryUsage - int get currentMemoryUsage { - return _objc_msgSend_57(this.pointer, _sel_currentMemoryUsage); + /// tolerance + double get tolerance { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_tolerance) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_tolerance); } - /// currentDiskUsage - int get currentDiskUsage { - return _objc_msgSend_57(this.pointer, _sel_currentDiskUsage); + /// setTolerance: + set tolerance(double value) { + return _objc_msgSend_suh039(this.ref.pointer, _sel_setTolerance_, value); } - /// storeCachedResponse:forDataTask: - void storeCachedResponse_forDataTask_( - NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { - _objc_msgSend_472(this.pointer, _sel_storeCachedResponse_forDataTask_, - cachedResponse.pointer, dataTask.pointer); + /// invalidate + void invalidate() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); } - /// getCachedResponseForDataTask:completionHandler: - void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask dataTask, - ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { - _objc_msgSend_473( - this.pointer, - _sel_getCachedResponseForDataTask_completionHandler_, - dataTask.pointer, - completionHandler.pointer); + /// isValid + bool get valid { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValid); } - /// removeCachedResponseForDataTask: - void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { - _objc_msgSend_474( - this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); + /// userInfo + objc.ObjCObjectBase? get userInfo { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// init - NSURLCache init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLCache.castFromPointer(_ret, retain: true, release: true); + NSTimer init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } /// new - static NSURLCache new1() { - final _ret = _objc_msgSend_19(_class_NSURLCache, _sel_new); - return NSURLCache.castFromPointer(_ret, retain: false, release: true); + static NSTimer new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTimer, _sel_new); + return NSTimer.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); + static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSTimer, _sel_allocWithZone_, zone); + return NSTimer.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); + static NSTimer alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTimer, _sel_alloc); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -23776,94 +24744,76 @@ class NSURLCache extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLCache, + _objc_msgSend_cqxsqq( + _class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLCache, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSTimer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLCache, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSTimer, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSURLCache, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSTimer, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLCache, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSTimer, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSTimer, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLCache, + _objc_msgSend_1tjlcwl( + _class_NSTimer, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLCache, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSTimer, _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); + _objc_msgSend_1unuoxw(_class_NSTimer, _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_461 = 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_462 = 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_463 = objc.msgSendPointer +final _objc_msgSend_ebb7er = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -23881,22 +24831,56 @@ final _objc_msgSend_463 = objc.msgSendPointer ffi.Pointer)>(); late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); -final _objc_msgSend_464 = objc.msgSendPointer +late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); +late final _sel_initWithResponse_data_ = + objc.registerName("initWithResponse:data:"); + +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_nhp99d = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - int, - int, - ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_storagePolicy = objc.registerName("storagePolicy"); +final _objc_msgSend_1xh4qg4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); /// NSCachedURLResponse class NSCachedURLResponse extends objc.NSObject { @@ -23906,7 +24890,7 @@ class NSCachedURLResponse extends objc.NSObject { /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. NSCachedURLResponse.castFromPointer(ffi.Pointer other, @@ -23915,17 +24899,17 @@ class NSCachedURLResponse extends objc.NSObject { /// Returns whether [obj] is an instance of [NSCachedURLResponse]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } /// initWithResponse:data: NSCachedURLResponse initWithResponse_data_( NSURLResponse response, objc.NSData data) { - final _ret = _objc_msgSend_465(this.pointer, _sel_initWithResponse_data_, - response.pointer, data.pointer); + final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), + _sel_initWithResponse_data_, response.ref.pointer, data.ref.pointer); return NSCachedURLResponse.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// initWithResponse:data:userInfo:storagePolicy: @@ -23934,32 +24918,32 @@ class NSCachedURLResponse extends objc.NSObject { objc.NSData data, objc.NSDictionary? userInfo, NSURLCacheStoragePolicy storagePolicy) { - final _ret = _objc_msgSend_466( - this.pointer, + final _ret = _objc_msgSend_nhp99d( + this.ref.retainAndReturnPointer(), _sel_initWithResponse_data_userInfo_storagePolicy_, - response.pointer, - data.pointer, - userInfo?.pointer ?? ffi.nullptr, + response.ref.pointer, + data.ref.pointer, + userInfo?.ref.pointer ?? ffi.nullptr, storagePolicy.value); return NSCachedURLResponse.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// response NSURLResponse get response { - final _ret = _objc_msgSend_467(this.pointer, _sel_response); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_response); return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } /// data objc.NSData get data { - final _ret = _objc_msgSend_113(this.pointer, _sel_data); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// userInfo objc.NSDictionary? get userInfo { - final _ret = _objc_msgSend_82(this.pointer, _sel_userInfo); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -23967,35 +24951,36 @@ class NSCachedURLResponse extends objc.NSObject { /// storagePolicy NSURLCacheStoragePolicy get storagePolicy { - final _ret = _objc_msgSend_468(this.pointer, _sel_storagePolicy); + final _ret = _objc_msgSend_1xh4qg4(this.ref.pointer, _sel_storagePolicy); return NSURLCacheStoragePolicy.fromValue(_ret); } /// init NSCachedURLResponse init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSCachedURLResponse.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// new static NSCachedURLResponse new1() { - final _ret = _objc_msgSend_19(_class_NSCachedURLResponse, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_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); + final _ret = _objc_msgSend_1b3ihd0( + _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); + final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_alloc); return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); } @@ -24005,182 +24990,120 @@ class NSCachedURLResponse extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSCachedURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSCachedURLResponse, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSCachedURLResponse, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSCachedURLResponse, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSCachedURLResponse, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSCachedURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSCachedURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSCachedURLResponse, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( + final _ret = _objc_msgSend_1unuoxw( _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} -late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); -late final _sel_initWithResponse_data_ = - objc.registerName("initWithResponse:data:"); -final _objc_msgSend_465 = 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)>(); + /// self + NSCachedURLResponse self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); + } -enum NSURLCacheStoragePolicy { - NSURLCacheStorageAllowed(0), - NSURLCacheStorageAllowedInMemoryOnly(1), - NSURLCacheStorageNotAllowed(2); + /// retain + NSCachedURLResponse retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSURLCacheStoragePolicy(this.value); + /// autorelease + NSCachedURLResponse autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); + } - static NSURLCacheStoragePolicy fromValue(int value) => switch (value) { - 0 => NSURLCacheStorageAllowed, - 1 => NSURLCacheStorageAllowedInMemoryOnly, - 2 => NSURLCacheStorageNotAllowed, - _ => throw ArgumentError( - "Unknown value for NSURLCacheStoragePolicy: $value"), - }; + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSCachedURLResponse, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSCachedURLResponse? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); + } } -late final _sel_initWithResponse_data_userInfo_storagePolicy_ = - objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); -final _objc_msgSend_466 = 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)>(); -final _objc_msgSend_467 = 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_468 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); late final _sel_cachedResponseForRequest_ = objc.registerName("cachedResponseForRequest:"); -final _objc_msgSend_469 = 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_470 = 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_471 = 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_ = @@ -24191,6 +25114,7 @@ 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"); +late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); /// NSURLSessionDataTask class NSURLSessionDataTask extends NSURLSessionTask { @@ -24200,7 +25124,7 @@ class NSURLSessionDataTask extends NSURLSessionTask { /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. NSURLSessionDataTask.castFromPointer(ffi.Pointer other, @@ -24209,27 +25133,28 @@ class NSURLSessionDataTask extends NSURLSessionTask { /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); } /// init NSURLSessionDataTask init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLSessionDataTask.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// new static NSURLSessionDataTask new1() { - final _ret = _objc_msgSend_19(_class_NSURLSessionDataTask, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_new); return NSURLSessionDataTask.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( + final _ret = _objc_msgSend_1b3ihd0( _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); return NSURLSessionDataTask.castFromPointer(_ret, retain: false, release: true); @@ -24237,7 +25162,7 @@ class NSURLSessionDataTask extends NSURLSessionTask { /// alloc static NSURLSessionDataTask alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSessionDataTask, _sel_alloc); + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_alloc); return NSURLSessionDataTask.castFromPointer(_ret, retain: false, release: true); } @@ -24247,151 +25172,179 @@ class NSURLSessionDataTask extends NSURLSessionTask { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSURLSessionDataTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionDataTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSessionDataTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSURLSessionDataTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionDataTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionDataTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSURLSessionDataTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSURLSessionDataTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSURLSessionDataTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( + final _ret = _objc_msgSend_1unuoxw( _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLSessionDataTask self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSURLSessionDataTask retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSURLSessionDataTask autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } } -late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); late final _sel_storeCachedResponse_forDataTask_ = objc.registerName("storeCachedResponse:forDataTask:"); -final _objc_msgSend_472 = 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) => + ffi.Pointer block, + ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -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); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSCachedURLResponse { /// 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); - } + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(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; + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock fromFunction( + void Function(NSCachedURLResponse?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -24402,223 +25355,219 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { /// /// 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; + static objc.ObjCBlock listener( + void Function(NSCachedURLResponse?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - void call(NSCachedURLResponse? arg0) => pointer.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSCachedURLResponse_CallExtension + on objc.ObjCBlock { + void call(NSCachedURLResponse? arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, + ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } late final _sel_getCachedResponseForDataTask_completionHandler_ = objc.registerName("getCachedResponseForDataTask:completionHandler:"); -final _objc_msgSend_473 = 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_474 = 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, +/// 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 [NSURLConnection] that points to the same underlying object as [other]. - NSURLConnection.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLCache] that points to the same underlying object as [other]. + NSURLCache.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLConnection] that wraps the given raw object pointer. - NSURLConnection.castFromPointer(ffi.Pointer other, + /// 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 [NSURLConnection]. + /// Returns whether [obj] is an instance of [NSURLCache]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCache); } - /// initWithRequest:delegate:startImmediately: - NSURLConnection? initWithRequest_delegate_startImmediately_( - NSURLRequest request, - objc.ObjCObjectBase? delegate, - bool startImmediately) { - final _ret = _objc_msgSend_475( - 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); + /// sharedURLCache + static NSURLCache getSharedURLCache() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_sharedURLCache); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - /// initWithRequest:delegate: - NSURLConnection? initWithRequest_delegate_( - NSURLRequest request, objc.ObjCObjectBase? delegate) { - final _ret = _objc_msgSend_476(this.pointer, _sel_initWithRequest_delegate_, - request.pointer, delegate?.pointer ?? ffi.nullptr); + /// setSharedURLCache: + static void setSharedURLCache(NSURLCache value) { + return _objc_msgSend_ukcdfq( + _class_NSURLCache, _sel_setSharedURLCache_, value.ref.pointer); + } + + /// initWithMemoryCapacity:diskCapacity:diskPath: + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, objc.NSString? path) { + final _ret = _objc_msgSend_ebb7er( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.ref.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithMemoryCapacity:diskCapacity:directoryURL: + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_ebb7er( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.ref.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } + + /// cachedResponseForRequest: + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_cachedResponseForRequest_, request.ref.pointer); return _ret.address == 0 ? null - : NSURLConnection.castFromPointer(_ret, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); + } + + /// storeCachedResponse:forRequest: + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_storeCachedResponse_forRequest_, + cachedResponse.ref.pointer, + request.ref.pointer); + } + + /// removeCachedResponseForRequest: + void removeCachedResponseForRequest_(NSURLRequest request) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForRequest_, + request.ref.pointer); } - /// connectionWithRequest:delegate: - static NSURLConnection? connectionWithRequest_delegate_( - NSURLRequest request, objc.ObjCObjectBase? delegate) { - final _ret = _objc_msgSend_477( - _class_NSURLConnection, - _sel_connectionWithRequest_delegate_, - request.pointer, - delegate?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURLConnection.castFromPointer(_ret, retain: true, release: true); + /// removeAllCachedResponses + void removeAllCachedResponses() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_removeAllCachedResponses); } - /// originalRequest - NSURLRequest get originalRequest { - final _ret = _objc_msgSend_478(this.pointer, _sel_originalRequest); - return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + /// removeCachedResponsesSinceDate: + void removeCachedResponsesSinceDate_(objc.NSDate date) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponsesSinceDate_, + date.ref.pointer); } - /// currentRequest - NSURLRequest get currentRequest { - final _ret = _objc_msgSend_478(this.pointer, _sel_currentRequest); - return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + /// memoryCapacity + int get memoryCapacity { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_memoryCapacity); } - /// start - void start() { - _objc_msgSend_7(this.pointer, _sel_start); + /// setMemoryCapacity: + set memoryCapacity(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMemoryCapacity_, value); } - /// cancel - void cancel() { - _objc_msgSend_7(this.pointer, _sel_cancel); + /// diskCapacity + int get diskCapacity { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_diskCapacity); } - /// scheduleInRunLoop:forMode: - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { - _objc_msgSend_227(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + /// setDiskCapacity: + set diskCapacity(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setDiskCapacity_, value); } - /// unscheduleFromRunLoop:forMode: - void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { - _objc_msgSend_227(this.pointer, _sel_unscheduleFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + /// currentMemoryUsage + int get currentMemoryUsage { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentMemoryUsage); } - /// setDelegateQueue: - void setDelegateQueue_(NSOperationQueue? queue) { - _objc_msgSend_479( - this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); + /// currentDiskUsage + int get currentDiskUsage { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentDiskUsage); } - /// canHandleRequest: - static bool canHandleRequest_(NSURLRequest request) { - return _objc_msgSend_480( - _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); + /// storeCachedResponse:forDataTask: + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_storeCachedResponse_forDataTask_, + cachedResponse.ref.pointer, + dataTask.ref.pointer); } - /// sendSynchronousRequest:returningResponse:error: - static objc.NSData? sendSynchronousRequest_returningResponse_error_( - NSURLRequest request, - ffi.Pointer> response, - ffi.Pointer> error) { - final _ret = _objc_msgSend_481( - _class_NSURLConnection, - _sel_sendSynchronousRequest_returningResponse_error_, - request.pointer, - response, - error); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// getCachedResponseForDataTask:completionHandler: + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.ref.pointer, + completionHandler.ref.pointer); } - /// sendAsynchronousRequest:queue:completionHandler: - static void sendAsynchronousRequest_queue_completionHandler_( - NSURLRequest request, - NSOperationQueue queue, - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { - _objc_msgSend_482( - _class_NSURLConnection, - _sel_sendAsynchronousRequest_queue_completionHandler_, - request.pointer, - queue.pointer, - handler.pointer); + /// removeCachedResponseForDataTask: + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_removeCachedResponseForDataTask_, dataTask.ref.pointer); } /// init - NSURLConnection init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLConnection.castFromPointer(_ret, retain: true, release: true); + NSURLCache init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// new - static NSURLConnection new1() { - final _ret = _objc_msgSend_19(_class_NSURLConnection, _sel_new); - return NSURLConnection.castFromPointer(_ret, retain: false, release: true); + static NSURLCache new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_new); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSURLConnection, _sel_allocWithZone_, zone); - return NSURLConnection.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSURLCache, _sel_allocWithZone_, zone); + return NSURLCache.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); + static NSURLCache alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_alloc); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -24626,74 +25575,92 @@ class NSURLConnection extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLConnection, + _objc_msgSend_cqxsqq( + _class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLConnection, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLCache, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLCache, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSURLConnection, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSURLCache, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLConnection, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLCache, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLCache, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLConnection, + _objc_msgSend_1tjlcwl( + _class_NSURLCache, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCache, _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); + _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLCache self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLCache retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLCache autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLCache.castFromPointer(_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_475 = objc.msgSendPointer +final _objc_msgSend_at5jtv = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -24711,88 +25678,16 @@ final _objc_msgSend_475 = objc.msgSendPointer bool)>(); late final _sel_initWithRequest_delegate_ = objc.registerName("initWithRequest:delegate:"); -final _objc_msgSend_476 = 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_477 = 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)>(); -final _objc_msgSend_478 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); late final _sel_unscheduleFromRunLoop_forMode_ = objc.registerName("unscheduleFromRunLoop:forMode:"); late final _sel_setDelegateQueue_ = objc.registerName("setDelegateQueue:"); -final _objc_msgSend_479 = 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_480 = 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_481 = 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 block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -24808,8 +25703,18 @@ void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -24817,70 +25722,258 @@ void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerTrampoline( + 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); + objc.objectRelease(block.cast()); +} -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); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(NSURLResponse?, objc.NSData?, + objc.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. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureCallable, + (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))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock + listener(void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerCallable + .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))); + final wrapper = _wrapListenerBlock_tenbla(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSURLResponse?, objc.NSData?, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_CallExtension on objc + .ObjCBlock { + void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => + ref.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)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_sendAsynchronousRequest_queue_completionHandler_ = + objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); +void _ObjCBlock_ffiVoid_objcObjCObject_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); +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock?, objc.NSError)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { /// 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); - } + static objc + .ObjCBlock?, objc.NSError)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, + objc.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; + static objc.ObjCBlock?, objc.NSError)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock?, objc.NSError)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock?, objc.NSError)> fromFunction( + void Function(objc.ObjCObjectBase?, objc.NSError) fn) => + objc.ObjCBlock?, objc.NSError)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -24891,56 +25984,49 @@ class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError /// /// 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; + static objc + .ObjCBlock?, objc.NSError)> + listener(void Function(objc.ObjCObjectBase?, objc.NSError) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: false, release: true), + objc.NSError.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1tjlcwl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, + objc.NSError)>(wrapper, retain: false, release: true); + } +} - void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => - pointer.ref.invoke +/// Call operator for `objc.ObjCBlock?, objc.NSError)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc + .ObjCBlock?, objc.NSError)> { + void call(objc.ObjCObjectBase? arg0, objc.NSError arg1) => + ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() + ffi.Pointer arg1)>>() .asFunction< void Function( - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.ref.pointer); } -late final _sel_sendAsynchronousRequest_queue_completionHandler_ = - objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); -final _objc_msgSend_482 = objc.msgSendPointer +final _objc_msgSend_10t0qpd = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -24948,164 +26034,180 @@ final _objc_msgSend_482 = objc.msgSendPointer 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)>(); -/// NSURLCredential -class NSURLCredential extends objc.NSObject { - NSURLCredential._(ffi.Pointer 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 [NSURLCredential] that points to the same underlying object as [other]. - NSURLCredential.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLConnection] that points to the same underlying object as [other]. + NSURLConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLCredential] that wraps the given raw object pointer. - NSURLCredential.castFromPointer(ffi.Pointer other, + /// 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 [NSURLCredential]. + /// Returns whether [obj] is an instance of [NSURLConnection]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); - } - - /// persistence - NSURLCredentialPersistence get persistence { - final _ret = _objc_msgSend_483(this.pointer, _sel_persistence); - return NSURLCredentialPersistence.fromValue(_ret); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLConnection); } - /// initWithUser:password:persistence: - NSURLCredential initWithUser_password_persistence_(objc.NSString user, - objc.NSString password, NSURLCredentialPersistence persistence) { - final _ret = _objc_msgSend_484( - 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_485( - _class_NSURLCredential, - _sel_credentialWithUser_password_persistence_, - user.pointer, - password.pointer, - persistence.value); - return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + /// initWithRequest:delegate:startImmediately: + NSURLConnection? initWithRequest_delegate_startImmediately_( + NSURLRequest request, + objc.ObjCObjectBase? delegate, + bool startImmediately) { + final _ret = _objc_msgSend_at5jtv( + this.ref.retainAndReturnPointer(), + _sel_initWithRequest_delegate_startImmediately_, + request.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr, + startImmediately); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - /// user - objc.NSString? get user { - final _ret = _objc_msgSend_20(this.pointer, _sel_user); + /// initWithRequest:delegate: + NSURLConnection? initWithRequest_delegate_( + NSURLRequest request, objc.ObjCObjectBase? delegate) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithRequest_delegate_, + request.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - /// password - objc.NSString? get password { - final _ret = _objc_msgSend_20(this.pointer, _sel_password); + /// connectionWithRequest:delegate: + static NSURLConnection? connectionWithRequest_delegate_( + NSURLRequest request, objc.ObjCObjectBase? delegate) { + final _ret = _objc_msgSend_iq11qg( + _class_NSURLConnection, + _sel_connectionWithRequest_delegate_, + request.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - /// hasPassword - bool get hasPassword { - return _objc_msgSend_13(this.pointer, _sel_hasPassword); + /// originalRequest + NSURLRequest get originalRequest { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_originalRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// initWithIdentity:certificates:persistence: - NSURLCredential initWithIdentity_certificates_persistence_( - ffi.Pointer<__SecIdentity> identity, - objc.NSArray? certArray, - NSURLCredentialPersistence persistence) { - final _ret = _objc_msgSend_486( - this.pointer, - _sel_initWithIdentity_certificates_persistence_, - identity, - certArray?.pointer ?? ffi.nullptr, - persistence.value); - return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + /// currentRequest + NSURLRequest get currentRequest { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentRequest); + return NSURLRequest.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_487( - _class_NSURLCredential, - _sel_credentialWithIdentity_certificates_persistence_, - identity, - certArray?.pointer ?? ffi.nullptr, - persistence.value); - return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + /// start + void start() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_start); } - /// identity - ffi.Pointer<__SecIdentity> get identity { - return _objc_msgSend_488(this.pointer, _sel_identity); + /// cancel + void cancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } - /// certificates - objc.NSArray get certificates { - final _ret = _objc_msgSend_33(this.pointer, _sel_certificates); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// scheduleInRunLoop:forMode: + void scheduleInRunLoop_forMode_(objc.NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } - /// initWithTrust: - NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_489(this.pointer, _sel_initWithTrust_, trust); - return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + /// unscheduleFromRunLoop:forMode: + void unscheduleFromRunLoop_forMode_( + objc.NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_unscheduleFromRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } - /// credentialForTrust: - static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_490( - _class_NSURLCredential, _sel_credentialForTrust_, trust); - return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + /// setDelegateQueue: + void setDelegateQueue_(NSOperationQueue? queue) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegateQueue_, + queue?.ref.pointer ?? ffi.nullptr); + } + + /// canHandleRequest: + static bool canHandleRequest_(NSURLRequest request) { + return _objc_msgSend_l8lotg( + _class_NSURLConnection, _sel_canHandleRequest_, request.ref.pointer); + } + + /// sendSynchronousRequest:returningResponse:error: + static objc.NSData? sendSynchronousRequest_returningResponse_error_( + NSURLRequest request, + ffi.Pointer> response, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1dca44n( + _class_NSURLConnection, + _sel_sendSynchronousRequest_returningResponse_error_, + request.ref.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, + objc.ObjCBlock< + ffi.Void Function(NSURLResponse?, objc.NSData?, objc.NSError?)> + handler) { + _objc_msgSend_10t0qpd( + _class_NSURLConnection, + _sel_sendAsynchronousRequest_queue_completionHandler_, + request.ref.pointer, + queue.ref.pointer, + handler.ref.pointer); } /// init - NSURLCredential init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + NSURLConnection init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } /// new - static NSURLCredential new1() { - final _ret = _objc_msgSend_19(_class_NSURLCredential, _sel_new); - return NSURLCredential.castFromPointer(_ret, retain: false, release: true); + static NSURLConnection new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLConnection, _sel_new); + return NSURLConnection.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); + static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLConnection, _sel_allocWithZone_, zone); + return NSURLConnection.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); + static NSURLConnection alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLConnection, _sel_alloc); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -25113,68 +26215,86 @@ class NSURLCredential extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLCredential, + _objc_msgSend_cqxsqq( + _class_NSURLConnection, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLCredential, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSURLCredential, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSURLConnection, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLCredential, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLConnection, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLCredential, + _objc_msgSend_1tjlcwl( + _class_NSURLConnection, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLConnection, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLConnection, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLConnection self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLConnection.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLConnection retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLConnection.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLConnection autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLConnection.castFromPointer(_ret, retain: true, release: true); + } } late final _class_NSURLCredential = objc.getClass("NSURLCredential"); @@ -25199,7 +26319,7 @@ enum NSURLCredentialPersistence { } late final _sel_persistence = objc.registerName("persistence"); -final _objc_msgSend_483 = objc.msgSendPointer +final _objc_msgSend_1dwdxi1 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, @@ -25209,7 +26329,7 @@ final _objc_msgSend_483 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithUser_password_persistence_ = objc.registerName("initWithUser:password:persistence:"); -final _objc_msgSend_484 = objc.msgSendPointer +final _objc_msgSend_nwxkj = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -25227,22 +26347,6 @@ final _objc_msgSend_484 = objc.msgSendPointer int)>(); late final _sel_credentialWithUser_password_persistence_ = objc.registerName("credentialWithUser:password:persistence:"); -final _objc_msgSend_485 = 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"); @@ -25251,7 +26355,7 @@ final class __SecIdentity extends ffi.Opaque {} late final _sel_initWithIdentity_certificates_persistence_ = objc.registerName("initWithIdentity:certificates:persistence:"); -final _objc_msgSend_486 = objc.msgSendPointer +final _objc_msgSend_1lfx01 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -25269,24 +26373,8 @@ final _objc_msgSend_486 = objc.msgSendPointer int)>(); late final _sel_credentialWithIdentity_certificates_persistence_ = objc.registerName("credentialWithIdentity:certificates:persistence:"); -final _objc_msgSend_487 = 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_488 = objc.msgSendPointer +final _objc_msgSend_1dyqaf3 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer<__SecIdentity> Function(ffi.Pointer, @@ -25299,7 +26387,7 @@ late final _sel_certificates = objc.registerName("certificates"); final class __SecTrust extends ffi.Opaque {} late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); -final _objc_msgSend_489 = objc.msgSendPointer +final _objc_msgSend_a2ucgd = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, @@ -25308,165 +26396,158 @@ final _objc_msgSend_489 = objc.msgSendPointer instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<__SecTrust>)>(); late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); -final _objc_msgSend_490 = 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, +/// 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 [NSURLProtectionSpace] that points to the same underlying object as [other]. - NSURLProtectionSpace.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLProtectionSpace] that wraps the given raw object pointer. - NSURLProtectionSpace.castFromPointer(ffi.Pointer other, + /// 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 [NSURLProtectionSpace]. + /// Returns whether [obj] is an instance of [NSURLCredential]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredential); + } + + /// persistence + NSURLCredentialPersistence get persistence { + final _ret = _objc_msgSend_1dwdxi1(this.ref.pointer, _sel_persistence); + return NSURLCredentialPersistence.fromValue(_ret); } - /// 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_491( - 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); + /// initWithUser:password:persistence: + NSURLCredential initWithUser_password_persistence_(objc.NSString user, + objc.NSString password, NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_nwxkj( + this.ref.retainAndReturnPointer(), + _sel_initWithUser_password_persistence_, + user.ref.pointer, + password.ref.pointer, + persistence.value); + return NSURLCredential.castFromPointer(_ret, retain: false, 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_491( - 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); + /// credentialWithUser:password:persistence: + static NSURLCredential credentialWithUser_password_persistence_( + objc.NSString user, + objc.NSString password, + NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_nwxkj( + _class_NSURLCredential, + _sel_credentialWithUser_password_persistence_, + user.ref.pointer, + password.ref.pointer, + persistence.value); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - /// realm - objc.NSString? get realm { - final _ret = _objc_msgSend_20(this.pointer, _sel_realm); + /// user + objc.NSString? get user { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_user); 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); + /// password + objc.NSString? get password { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_password); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// host - objc.NSString get host { - final _ret = _objc_msgSend_11(this.pointer, _sel_host); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// hasPassword + bool get hasPassword { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_hasPassword); } - /// port - int get port { - return _objc_msgSend_123(this.pointer, _sel_port); + /// initWithIdentity:certificates:persistence: + NSURLCredential initWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_1lfx01( + this.ref.retainAndReturnPointer(), + _sel_initWithIdentity_certificates_persistence_, + identity, + certArray?.ref.pointer ?? ffi.nullptr, + persistence.value); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } - /// 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); + /// credentialWithIdentity:certificates:persistence: + static NSURLCredential credentialWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_1lfx01( + _class_NSURLCredential, + _sel_credentialWithIdentity_certificates_persistence_, + identity, + certArray?.ref.pointer ?? ffi.nullptr, + persistence.value); + return NSURLCredential.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); + /// identity + ffi.Pointer<__SecIdentity> get identity { + return _objc_msgSend_1dyqaf3(this.ref.pointer, _sel_identity); } - /// authenticationMethod - objc.NSString get authenticationMethod { - final _ret = _objc_msgSend_11(this.pointer, _sel_authenticationMethod); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// certificates + objc.NSArray get certificates { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_certificates); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// distinguishedNames - objc.NSArray? get distinguishedNames { - final _ret = _objc_msgSend_86(this.pointer, _sel_distinguishedNames); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// initWithTrust: + NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_a2ucgd( + this.ref.retainAndReturnPointer(), _sel_initWithTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } - /// serverTrust - ffi.Pointer<__SecTrust> get serverTrust { - return _objc_msgSend_492(this.pointer, _sel_serverTrust); + /// credentialForTrust: + static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_a2ucgd( + _class_NSURLCredential, _sel_credentialForTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// init - NSURLProtectionSpace init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLProtectionSpace.castFromPointer(_ret, - retain: true, release: true); + NSURLCredential init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// new - static NSURLProtectionSpace new1() { - final _ret = _objc_msgSend_19(_class_NSURLProtectionSpace, _sel_new); - return NSURLProtectionSpace.castFromPointer(_ret, - retain: false, release: true); + static NSURLCredential new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredential, _sel_new); + return NSURLCredential.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); + static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLCredential, _sel_allocWithZone_, zone); + return NSURLCredential.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); + static NSURLCredential alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredential, _sel_alloc); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -25474,75 +26555,113 @@ class NSURLProtectionSpace extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLProtectionSpace, + _objc_msgSend_cqxsqq( + _class_NSURLCredential, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLProtectionSpace, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSURLProtectionSpace, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSURLCredential, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLProtectionSpace, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLCredential, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLCredential, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLProtectionSpace, + _objc_msgSend_1tjlcwl( + _class_NSURLCredential, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredential, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredential, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLCredential self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLCredential retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLCredential autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSURLCredential, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSURLCredential? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLCredential.castFromPointer(_ret, retain: false, 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_491 = objc.msgSendPointer +final _objc_msgSend_sfgdlr = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -25567,7 +26686,6 @@ late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc 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"); @@ -25575,7 +26693,7 @@ late final _sel_authenticationMethod = objc.registerName("authenticationMethod"); late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); late final _sel_serverTrust = objc.registerName("serverTrust"); -final _objc_msgSend_492 = objc.msgSendPointer +final _objc_msgSend_uv0l05 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer<__SecTrust> Function(ffi.Pointer, @@ -25584,181 +26702,159 @@ final _objc_msgSend_492 = objc.msgSendPointer ffi.Pointer<__SecTrust> Function( ffi.Pointer, ffi.Pointer)>(); -/// NSURLCredentialStorage -class NSURLCredentialStorage extends objc.NSObject { - NSURLCredentialStorage._(ffi.Pointer pointer, +/// 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 [NSURLCredentialStorage] that points to the same underlying object as [other]. - NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLProtectionSpace] that points to the same underlying object as [other]. + NSURLProtectionSpace.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. - NSURLCredentialStorage.castFromPointer(ffi.Pointer other, + /// 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 [NSURLCredentialStorage]. + /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); } - /// sharedCredentialStorage - static NSURLCredentialStorage getSharedCredentialStorage() { - final _ret = _objc_msgSend_493( - _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); - return NSURLCredentialStorage.castFromPointer(_ret, - retain: true, release: true); + /// 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_sfgdlr( + this.ref.retainAndReturnPointer(), + _sel_initWithHost_port_protocol_realm_authenticationMethod_, + host.ref.pointer, + port, + protocol?.ref.pointer ?? ffi.nullptr, + realm?.ref.pointer ?? ffi.nullptr, + authenticationMethod?.ref.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } - /// credentialsForProtectionSpace: - objc.NSDictionary? credentialsForProtectionSpace_( - NSURLProtectionSpace space) { - final _ret = _objc_msgSend_494( - this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); + /// 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_sfgdlr( + this.ref.retainAndReturnPointer(), + _sel_initWithProxyHost_port_type_realm_authenticationMethod_, + host.ref.pointer, + port, + type?.ref.pointer ?? ffi.nullptr, + realm?.ref.pointer ?? ffi.nullptr, + authenticationMethod?.ref.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); + } + + /// realm + objc.NSString? get realm { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_realm); return _ret.address == 0 ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// allCredentials - objc.NSDictionary get allCredentials { - final _ret = _objc_msgSend_121(this.pointer, _sel_allCredentials); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// receivesCredentialSecurely + bool get receivesCredentialSecurely { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_receivesCredentialSecurely); } - /// setCredential:forProtectionSpace: - void setCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_495(this.pointer, _sel_setCredential_forProtectionSpace_, - credential.pointer, space.pointer); + /// isProxy + bool get isProxy { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isProxy); } - /// removeCredential:forProtectionSpace: - void removeCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_495(this.pointer, _sel_removeCredential_forProtectionSpace_, - credential.pointer, space.pointer); + /// host + objc.NSString get host { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_host); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// removeCredential:forProtectionSpace:options: - void removeCredential_forProtectionSpace_options_(NSURLCredential credential, - NSURLProtectionSpace space, objc.NSDictionary? options) { - _objc_msgSend_496( - this.pointer, - _sel_removeCredential_forProtectionSpace_options_, - credential.pointer, - space.pointer, - options?.pointer ?? ffi.nullptr); + /// port + int get port { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_port); } - /// defaultCredentialForProtectionSpace: - NSURLCredential? defaultCredentialForProtectionSpace_( - NSURLProtectionSpace space) { - final _ret = _objc_msgSend_497( - this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); + /// proxyType + objc.NSString? get proxyType { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_proxyType); return _ret.address == 0 - ? null - : NSURLCredential.castFromPointer(_ret, retain: true, release: true); - } - - /// setDefaultCredential:forProtectionSpace: - void setDefaultCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_495( - 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_498( - this.pointer, - _sel_getCredentialsForProtectionSpace_task_completionHandler_, - protectionSpace.pointer, - task.pointer, - completionHandler.pointer); + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setCredential:forProtectionSpace:task: - void setCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _objc_msgSend_499(this.pointer, _sel_setCredential_forProtectionSpace_task_, - credential.pointer, protectionSpace.pointer, task.pointer); + /// protocol + objc.NSString? get protocol { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_protocol); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// removeCredential:forProtectionSpace:options:task: - void removeCredential_forProtectionSpace_options_task_( - NSURLCredential credential, - NSURLProtectionSpace protectionSpace, - objc.NSDictionary? options, - NSURLSessionTask task) { - _objc_msgSend_500( - this.pointer, - _sel_removeCredential_forProtectionSpace_options_task_, - credential.pointer, - protectionSpace.pointer, - options?.pointer ?? ffi.nullptr, - task.pointer); + /// authenticationMethod + objc.NSString get authenticationMethod { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_authenticationMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// getDefaultCredentialForProtectionSpace:task:completionHandler: - void getDefaultCredentialForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace space, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSURLCredential completionHandler) { - _objc_msgSend_501( - this.pointer, - _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, - space.pointer, - task.pointer, - completionHandler.pointer); + /// distinguishedNames + objc.NSArray? get distinguishedNames { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_distinguishedNames); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setDefaultCredential:forProtectionSpace:task: - void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _objc_msgSend_499( - this.pointer, - _sel_setDefaultCredential_forProtectionSpace_task_, - credential.pointer, - protectionSpace.pointer, - task.pointer); + /// serverTrust + ffi.Pointer<__SecTrust> get serverTrust { + return _objc_msgSend_uv0l05(this.ref.pointer, _sel_serverTrust); } /// init - NSURLCredentialStorage init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLCredentialStorage.castFromPointer(_ret, - retain: true, release: true); + NSURLProtectionSpace init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSURLCredentialStorage new1() { - final _ret = _objc_msgSend_19(_class_NSURLCredentialStorage, _sel_new); - return NSURLCredentialStorage.castFromPointer(_ret, + static NSURLProtectionSpace new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtectionSpace, _sel_new); + return NSURLProtectionSpace.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, + static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLProtectionSpace, _sel_allocWithZone_, zone); + return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSURLCredentialStorage alloc() { - final _ret = _objc_msgSend_19(_class_NSURLCredentialStorage, _sel_alloc); - return NSURLCredentialStorage.castFromPointer(_ret, + static NSURLProtectionSpace alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtectionSpace, _sel_alloc); + return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); } @@ -25767,209 +26863,215 @@ class NSURLCredentialStorage extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLCredentialStorage, + _objc_msgSend_cqxsqq( + _class_NSURLProtectionSpace, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLCredentialStorage, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSURLCredentialStorage, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSURLProtectionSpace, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLCredentialStorage, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLProtectionSpace, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLProtectionSpace, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLCredentialStorage, + _objc_msgSend_1tjlcwl( + _class_NSURLProtectionSpace, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtectionSpace, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLProtectionSpace self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSURLProtectionSpace retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSURLProtectionSpace autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSURLProtectionSpace, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSURLProtectionSpace? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); + } } late final _class_NSURLCredentialStorage = objc.getClass("NSURLCredentialStorage"); late final _sel_sharedCredentialStorage = objc.registerName("sharedCredentialStorage"); -final _objc_msgSend_493 = 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_494 = 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_495 = 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_496 = 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_497 = 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) => + ffi.Pointer block, + ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -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); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDictionary_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSDictionary { /// 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); - } + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(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; + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock fromFunction( + void Function(objc.NSDictionary?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -25980,74 +27082,42 @@ class ObjCBlock_ffiVoid_NSDictionary extends objc.ObjCBlockBase { /// /// 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; + static objc.ObjCBlock listener( + void Function(objc.NSDictionary?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - void call(objc.NSDictionary? arg0) => pointer.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSDictionary_CallExtension + on objc.ObjCBlock { + void call(objc.NSDictionary? arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, + ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); -final _objc_msgSend_498 = 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_499 = 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_500 = objc.msgSendPointer +final _objc_msgSend_19b8ge5 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -26066,68 +27136,89 @@ final _objc_msgSend_500 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLCredential_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -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); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLCredential_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLCredential_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLCredential { /// 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); - } + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(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; + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - 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; + static objc.ObjCBlock fromFunction( + void Function(NSURLCredential?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLCredential_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -26138,229 +27229,230 @@ class ObjCBlock_ffiVoid_NSURLCredential extends objc.ObjCBlockBase { /// /// 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; + static objc.ObjCBlock listener( + void Function(NSURLCredential?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLCredential_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - void call(NSURLCredential? arg0) => pointer.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLCredential_CallExtension + on objc.ObjCBlock { + void call(NSURLCredential? arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, + ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = objc.registerName( "getDefaultCredentialForProtectionSpace:task:completionHandler:"); -final _objc_msgSend_501 = 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, +/// 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 [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_502( - this.pointer, - _sel_initWithRequest_cachedResponse_client_, - request.pointer, - cachedResponse?.pointer ?? ffi.nullptr, - client?.pointer ?? ffi.nullptr); - return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); - } + /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// client - objc.ObjCObjectBase? get client { - final _ret = _objc_msgSend_83(this.pointer, _sel_client); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, 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_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); } - /// request - NSURLRequest get request { - final _ret = _objc_msgSend_478(this.pointer, _sel_request); - return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + /// sharedCredentialStorage + static NSURLCredentialStorage getSharedCredentialStorage() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - /// cachedResponse - NSCachedURLResponse? get cachedResponse { - final _ret = _objc_msgSend_503(this.pointer, _sel_cachedResponse); + /// credentialsForProtectionSpace: + objc.NSDictionary? credentialsForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_credentialsForProtectionSpace_, space.ref.pointer); return _ret.address == 0 ? null - : NSCachedURLResponse.castFromPointer(_ret, - retain: true, release: true); - } - - /// canInitWithRequest: - static bool canInitWithRequest_(NSURLRequest request) { - return _objc_msgSend_480( - _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// canonicalRequestForRequest: - static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_504(_class_NSURLProtocol, - _sel_canonicalRequestForRequest_, request.pointer); - return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + /// allCredentials + objc.NSDictionary get allCredentials { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allCredentials); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// requestIsCacheEquivalent:toRequest: - static bool requestIsCacheEquivalent_toRequest_( - NSURLRequest a, NSURLRequest b) { - return _objc_msgSend_505(_class_NSURLProtocol, - _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); + /// setCredential:forProtectionSpace: + void setCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_setCredential_forProtectionSpace_, + credential.ref.pointer, + space.ref.pointer); } - /// startLoading - void startLoading() { - _objc_msgSend_7(this.pointer, _sel_startLoading); + /// removeCredential:forProtectionSpace: + void removeCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_removeCredential_forProtectionSpace_, + credential.ref.pointer, + space.ref.pointer); } - /// stopLoading - void stopLoading() { - _objc_msgSend_7(this.pointer, _sel_stopLoading); + /// removeCredential:forProtectionSpace:options: + void removeCredential_forProtectionSpace_options_(NSURLCredential credential, + NSURLProtectionSpace space, objc.NSDictionary? options) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_removeCredential_forProtectionSpace_options_, + credential.ref.pointer, + space.ref.pointer, + options?.ref.pointer ?? ffi.nullptr); } - /// propertyForKey:inRequest: - static objc.ObjCObjectBase? propertyForKey_inRequest_( - objc.NSString key, NSURLRequest request) { - final _ret = _objc_msgSend_506(_class_NSURLProtocol, - _sel_propertyForKey_inRequest_, key.pointer, request.pointer); + /// defaultCredentialForProtectionSpace: + NSURLCredential? defaultCredentialForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_defaultCredentialForProtectionSpace_, space.ref.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_513(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, - value.pointer, key.pointer, request.pointer); + : NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - /// removePropertyForKey:inRequest: - static void removePropertyForKey_inRequest_( - objc.NSString key, NSMutableURLRequest request) { - _objc_msgSend_514(_class_NSURLProtocol, - _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); + /// setDefaultCredential:forProtectionSpace: + void setDefaultCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_setDefaultCredential_forProtectionSpace_, + credential.ref.pointer, + space.ref.pointer); } - /// registerClass: - static bool registerClass_(objc.ObjCObjectBase protocolClass) { - return _objc_msgSend_0( - _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); + /// getCredentialsForProtectionSpace:task:completionHandler: + void getCredentialsForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace protectionSpace, + NSURLSessionTask task, + objc.ObjCBlock completionHandler) { + _objc_msgSend_10t0qpd( + this.ref.pointer, + _sel_getCredentialsForProtectionSpace_task_completionHandler_, + protectionSpace.ref.pointer, + task.ref.pointer, + completionHandler.ref.pointer); } - /// unregisterClass: - static void unregisterClass_(objc.ObjCObjectBase protocolClass) { - _objc_msgSend_27( - _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); + /// setCredential:forProtectionSpace:task: + void setCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_setCredential_forProtectionSpace_task_, + credential.ref.pointer, + protectionSpace.ref.pointer, + task.ref.pointer); } - /// canInitWithTask: - static bool canInitWithTask_(NSURLSessionTask task) { - return _objc_msgSend_515( - _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); + /// removeCredential:forProtectionSpace:options:task: + void removeCredential_forProtectionSpace_options_task_( + NSURLCredential credential, + NSURLProtectionSpace protectionSpace, + objc.NSDictionary? options, + NSURLSessionTask task) { + _objc_msgSend_19b8ge5( + this.ref.pointer, + _sel_removeCredential_forProtectionSpace_options_task_, + credential.ref.pointer, + protectionSpace.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + task.ref.pointer); } - /// initWithTask:cachedResponse:client: - NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, - NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { - final _ret = _objc_msgSend_516( - this.pointer, - _sel_initWithTask_cachedResponse_client_, - task.pointer, - cachedResponse?.pointer ?? ffi.nullptr, - client?.pointer ?? ffi.nullptr); - return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); + /// getDefaultCredentialForProtectionSpace:task:completionHandler: + void getDefaultCredentialForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace space, + NSURLSessionTask task, + objc.ObjCBlock completionHandler) { + _objc_msgSend_10t0qpd( + this.ref.pointer, + _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, + space.ref.pointer, + task.ref.pointer, + completionHandler.ref.pointer); } - /// task - NSURLSessionTask? get task { - final _ret = _objc_msgSend_517(this.pointer, _sel_task); - return _ret.address == 0 - ? null - : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + /// setDefaultCredential:forProtectionSpace:task: + void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_setDefaultCredential_forProtectionSpace_task_, + credential.ref.pointer, + protectionSpace.ref.pointer, + task.ref.pointer); } /// init - NSURLProtocol init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); + NSURLCredentialStorage init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSURLProtocol new1() { - final _ret = _objc_msgSend_19(_class_NSURLProtocol, _sel_new); - return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); + static NSURLCredentialStorage new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredentialStorage, _sel_new); + return NSURLCredentialStorage.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); + static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); + return NSURLCredentialStorage.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); + static NSURLCredentialStorage alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLCredentialStorage, _sel_alloc); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -26368,147 +27460,162 @@ class NSURLProtocol extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLProtocol, + _objc_msgSend_cqxsqq( + _class_NSURLCredentialStorage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLProtocol, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSURLProtocol, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSURLCredentialStorage, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLProtocol, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLCredentialStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLCredentialStorage, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLProtocol, + _objc_msgSend_1tjlcwl( + _class_NSURLCredentialStorage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredentialStorage, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLCredentialStorage self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSURLCredentialStorage retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSURLCredentialStorage autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLCredentialStorage.castFromPointer(_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_502 = 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_503 = 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_504 = 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_505 = 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_506 = objc.msgSendPointer +late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); +late final _sel_setURL_ = objc.registerName("setURL:"); +late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); +final _objc_msgSend_12vaadl = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + 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_br89tg = 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_1w8eyjo = 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:"); +late final _sel_setValue_forHTTPHeaderField_ = + objc.registerName("setValue:forHTTPHeaderField:"); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); +late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); +late final _sel_setHTTPShouldHandleCookies_ = + objc.registerName("setHTTPShouldHandleCookies:"); +late final _sel_setHTTPShouldUsePipelining_ = + objc.registerName("setHTTPShouldUsePipelining:"); /// NSMutableURLRequest class NSMutableURLRequest extends NSURLRequest { @@ -26518,7 +27625,7 @@ class NSMutableURLRequest extends NSURLRequest { /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. NSMutableURLRequest.castFromPointer(ffi.Pointer other, @@ -26527,13 +27634,13 @@ class NSMutableURLRequest extends NSURLRequest { /// Returns whether [obj] is an instance of [NSMutableURLRequest]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } /// URL objc.NSURL? get URL { - final _ret = _objc_msgSend_24(this.pointer, _sel_URL); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); @@ -26541,36 +27648,38 @@ class NSMutableURLRequest extends NSURLRequest { /// setURL: set URL(objc.NSURL? value) { - return _objc_msgSend_25( - this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURL_, value?.ref.pointer ?? ffi.nullptr); } /// cachePolicy NSURLRequestCachePolicy get cachePolicy { - final _ret = _objc_msgSend_331(this.pointer, _sel_cachePolicy); + final _ret = _objc_msgSend_2xak1q(this.ref.pointer, _sel_cachePolicy); return NSURLRequestCachePolicy.fromValue(_ret); } /// setCachePolicy: set cachePolicy(NSURLRequestCachePolicy value) { - return _objc_msgSend_507(this.pointer, _sel_setCachePolicy_, value.value); + return _objc_msgSend_12vaadl( + this.ref.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); + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutInterval) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); } /// setTimeoutInterval: set timeoutInterval(double value) { - return _objc_msgSend_223(this.pointer, _sel_setTimeoutInterval_, value); + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutInterval_, value); } /// mainDocumentURL objc.NSURL? get mainDocumentURL { - final _ret = _objc_msgSend_24(this.pointer, _sel_mainDocumentURL); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); @@ -26578,100 +27687,109 @@ class NSMutableURLRequest extends NSURLRequest { /// setMainDocumentURL: set mainDocumentURL(objc.NSURL? value) { - return _objc_msgSend_25( - this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMainDocumentURL_, + value?.ref.pointer ?? ffi.nullptr); } /// networkServiceType NSURLRequestNetworkServiceType get networkServiceType { - final _ret = _objc_msgSend_332(this.pointer, _sel_networkServiceType); + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// setNetworkServiceType: set networkServiceType(NSURLRequestNetworkServiceType value) { - return _objc_msgSend_508( - this.pointer, _sel_setNetworkServiceType_, value.value); + return _objc_msgSend_br89tg( + this.ref.pointer, _sel_setNetworkServiceType_, value.value); } /// allowsCellularAccess bool get allowsCellularAccess { - return _objc_msgSend_13(this.pointer, _sel_allowsCellularAccess); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); } /// setAllowsCellularAccess: set allowsCellularAccess(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setAllowsCellularAccess_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsCellularAccess_, value); } /// allowsExpensiveNetworkAccess bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_13(this.pointer, _sel_allowsExpensiveNetworkAccess); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } /// setAllowsExpensiveNetworkAccess: set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } /// allowsConstrainedNetworkAccess bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_13(this.pointer, _sel_allowsConstrainedNetworkAccess); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } /// setAllowsConstrainedNetworkAccess: set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } /// assumesHTTP3Capable bool get assumesHTTP3Capable { - return _objc_msgSend_13(this.pointer, _sel_assumesHTTP3Capable); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); } /// setAssumesHTTP3Capable: set assumesHTTP3Capable(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setAssumesHTTP3Capable_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAssumesHTTP3Capable_, value); } /// attribution NSURLRequestAttribution get attribution { - final _ret = _objc_msgSend_333(this.pointer, _sel_attribution); + final _ret = _objc_msgSend_t5yka9(this.ref.pointer, _sel_attribution); return NSURLRequestAttribution.fromValue(_ret); } /// setAttribution: set attribution(NSURLRequestAttribution value) { - return _objc_msgSend_509(this.pointer, _sel_setAttribution_, value.value); + return _objc_msgSend_1w8eyjo( + this.ref.pointer, _sel_setAttribution_, value.value); } /// requiresDNSSECValidation bool get requiresDNSSECValidation { - return _objc_msgSend_13(this.pointer, _sel_requiresDNSSECValidation); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } /// setRequiresDNSSECValidation: set requiresDNSSECValidation(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setRequiresDNSSECValidation_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); } /// HTTPMethod objc.NSString get HTTPMethod { - final _ret = _objc_msgSend_11(this.pointer, _sel_HTTPMethod); + final _ret = _objc_msgSend_1unuoxw(this.ref.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); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setHTTPMethod_, value.ref.pointer); } /// allHTTPHeaderFields objc.NSDictionary? get allHTTPHeaderFields { - final _ret = _objc_msgSend_82(this.pointer, _sel_allHTTPHeaderFields); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -26679,25 +27797,25 @@ class NSMutableURLRequest extends NSURLRequest { /// setAllHTTPHeaderFields: set allHTTPHeaderFields(objc.NSDictionary? value) { - return _objc_msgSend_187(this.pointer, _sel_setAllHTTPHeaderFields_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAllHTTPHeaderFields_, + value?.ref.pointer ?? ffi.nullptr); } /// setValue:forHTTPHeaderField: void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { - _objc_msgSend_510(this.pointer, _sel_setValue_forHTTPHeaderField_, - value?.pointer ?? ffi.nullptr, field.pointer); + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setValue_forHTTPHeaderField_, + value?.ref.pointer ?? ffi.nullptr, field.ref.pointer); } /// addValue:forHTTPHeaderField: void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { - _objc_msgSend_213(this.pointer, _sel_addValue_forHTTPHeaderField_, - value.pointer, field.pointer); + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_addValue_forHTTPHeaderField_, + value.ref.pointer, field.ref.pointer); } /// HTTPBody objc.NSData? get HTTPBody { - final _ret = _objc_msgSend_334(this.pointer, _sel_HTTPBody); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); @@ -26705,57 +27823,57 @@ class NSMutableURLRequest extends NSURLRequest { /// setHTTPBody: set HTTPBody(objc.NSData? value) { - return _objc_msgSend_511( - this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setHTTPBody_, value?.ref.pointer ?? ffi.nullptr); } /// HTTPBodyStream - NSInputStream? get HTTPBodyStream { - final _ret = _objc_msgSend_351(this.pointer, _sel_HTTPBodyStream); + objc.NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); return _ret.address == 0 ? null - : NSInputStream.castFromPointer(_ret, retain: true, release: true); + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// setHTTPBodyStream: - set HTTPBodyStream(NSInputStream? value) { - return _objc_msgSend_512( - this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); + set HTTPBodyStream(objc.NSInputStream? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPBodyStream_, + value?.ref.pointer ?? ffi.nullptr); } /// HTTPShouldHandleCookies bool get HTTPShouldHandleCookies { - return _objc_msgSend_13(this.pointer, _sel_HTTPShouldHandleCookies); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); } /// setHTTPShouldHandleCookies: set HTTPShouldHandleCookies(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setHTTPShouldHandleCookies_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldHandleCookies_, value); } /// HTTPShouldUsePipelining bool get HTTPShouldUsePipelining { - return _objc_msgSend_13(this.pointer, _sel_HTTPShouldUsePipelining); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); } /// setHTTPShouldUsePipelining: set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setHTTPShouldUsePipelining_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); } /// requestWithURL: static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_329( - _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.ref.pointer); return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSMutableURLRequest, _sel_supportsSecureCoding); } @@ -26764,10 +27882,10 @@ class NSMutableURLRequest extends NSURLRequest { objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_330( + final _ret = _objc_msgSend_191svj( _class_NSMutableURLRequest, _sel_requestWithURL_cachePolicy_timeoutInterval_, - URL.pointer, + URL.ref.pointer, cachePolicy.value, timeoutInterval); return NSMutableURLRequest.castFromPointer(_ret, @@ -26776,50 +27894,51 @@ class NSMutableURLRequest extends NSURLRequest { /// initWithURL: NSMutableURLRequest initWithURL_(objc.NSURL URL) { - final _ret = - _objc_msgSend_329(this.pointer, _sel_initWithURL_, URL.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); return NSMutableURLRequest.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// initWithURL:cachePolicy:timeoutInterval: NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_330( - this.pointer, + final _ret = _objc_msgSend_191svj( + this.ref.retainAndReturnPointer(), _sel_initWithURL_cachePolicy_timeoutInterval_, - URL.pointer, + URL.ref.pointer, cachePolicy.value, timeoutInterval); return NSMutableURLRequest.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// init NSMutableURLRequest init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableURLRequest.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// new static NSMutableURLRequest new1() { - final _ret = _objc_msgSend_19(_class_NSMutableURLRequest, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_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); + final _ret = _objc_msgSend_1b3ihd0( + _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); + final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_alloc); return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); } @@ -26829,421 +27948,292 @@ class NSMutableURLRequest extends NSURLRequest { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSMutableURLRequest, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSMutableURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSMutableURLRequest, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSMutableURLRequest, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSMutableURLRequest, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMutableURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSMutableURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSMutableURLRequest, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( + final _ret = _objc_msgSend_1unuoxw( _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSMutableURLRequest self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSMutableURLRequest retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSMutableURLRequest autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + /// initWithCoder: + NSMutableURLRequest? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMutableURLRequest.castFromPointer(_ret, + retain: false, 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_507 = 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_508 = 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_509 = 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:"); -late final _sel_setValue_forHTTPHeaderField_ = - objc.registerName("setValue:forHTTPHeaderField:"); -final _objc_msgSend_510 = 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_511 = 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_512 = 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_513 = 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_514 = 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_515 = 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_516 = 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_517 = 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, +/// 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 [NSXMLParser] that points to the same underlying object as [other]. - NSXMLParser.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLProtocol] that points to the same underlying object as [other]. + NSURLProtocol.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSXMLParser] that wraps the given raw object pointer. - NSXMLParser.castFromPointer(ffi.Pointer other, + /// 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 [NSXMLParser]. + /// Returns whether [obj] is an instance of [NSURLProtocol]. 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_36( - 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_337(this.pointer, _sel_initWithData_, data.pointer); - return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); } - /// initWithStream: - NSXMLParser initWithStream_(NSInputStream stream) { - final _ret = - _objc_msgSend_518(this.pointer, _sel_initWithStream_, stream.pointer); - return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + /// initWithRequest:cachedResponse:client: + NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, + NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithRequest_cachedResponse_client_, + request.ref.pointer, + cachedResponse?.ref.pointer ?? ffi.nullptr, + client?.ref.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(this.pointer, _sel_delegate); + /// client + objc.ObjCObjectBase? get client { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_client); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - 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); + /// request + NSURLRequest get request { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_request); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// externalEntityResolvingPolicy - NSXMLParserExternalEntityResolvingPolicy get externalEntityResolvingPolicy { - final _ret = - _objc_msgSend_519(this.pointer, _sel_externalEntityResolvingPolicy); - return NSXMLParserExternalEntityResolvingPolicy.fromValue(_ret); + /// cachedResponse + NSCachedURLResponse? get cachedResponse { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_cachedResponse); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - /// setExternalEntityResolvingPolicy: - set externalEntityResolvingPolicy( - NSXMLParserExternalEntityResolvingPolicy value) { - return _objc_msgSend_520( - this.pointer, _sel_setExternalEntityResolvingPolicy_, value.value); + /// canInitWithRequest: + static bool canInitWithRequest_(NSURLRequest request) { + return _objc_msgSend_l8lotg( + _class_NSURLProtocol, _sel_canInitWithRequest_, request.ref.pointer); } - /// allowedExternalEntityURLs - objc.NSSet? get allowedExternalEntityURLs { - final _ret = - _objc_msgSend_521(this.pointer, _sel_allowedExternalEntityURLs); - return _ret.address == 0 - ? null - : objc.NSSet.castFromPointer(_ret, retain: true, release: true); + /// canonicalRequestForRequest: + static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7(_class_NSURLProtocol, + _sel_canonicalRequestForRequest_, request.ref.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// setAllowedExternalEntityURLs: - set allowedExternalEntityURLs(objc.NSSet? value) { - return _objc_msgSend_522(this.pointer, _sel_setAllowedExternalEntityURLs_, - value?.pointer ?? ffi.nullptr); + /// requestIsCacheEquivalent:toRequest: + static bool requestIsCacheEquivalent_toRequest_( + NSURLRequest a, NSURLRequest b) { + return _objc_msgSend_1ywe6ev(_class_NSURLProtocol, + _sel_requestIsCacheEquivalent_toRequest_, a.ref.pointer, b.ref.pointer); } - /// parse - bool parse() { - return _objc_msgSend_13(this.pointer, _sel_parse); + /// startLoading + void startLoading() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_startLoading); } - /// abortParsing - void abortParsing() { - _objc_msgSend_7(this.pointer, _sel_abortParsing); + /// stopLoading + void stopLoading() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopLoading); } - /// parserError - objc.NSError? get parserError { - final _ret = _objc_msgSend_341(this.pointer, _sel_parserError); + /// propertyForKey:inRequest: + static objc.ObjCObjectBase? propertyForKey_inRequest_( + objc.NSString key, NSURLRequest request) { + final _ret = _objc_msgSend_iq11qg(_class_NSURLProtocol, + _sel_propertyForKey_inRequest_, key.ref.pointer, request.ref.pointer); return _ret.address == 0 ? null - : objc.NSError.castFromPointer(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// shouldResolveExternalEntities - bool get shouldResolveExternalEntities { - return _objc_msgSend_13(this.pointer, _sel_shouldResolveExternalEntities); + /// setProperty:forKey:inRequest: + static void setProperty_forKey_inRequest_(objc.ObjCObjectBase value, + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_tenbla( + _class_NSURLProtocol, + _sel_setProperty_forKey_inRequest_, + value.ref.pointer, + key.ref.pointer, + request.ref.pointer); } - /// setShouldResolveExternalEntities: - set shouldResolveExternalEntities(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setShouldResolveExternalEntities_, value); + /// removePropertyForKey:inRequest: + static void removePropertyForKey_inRequest_( + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_1tjlcwl( + _class_NSURLProtocol, + _sel_removePropertyForKey_inRequest_, + key.ref.pointer, + request.ref.pointer); } - /// 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); + /// registerClass: + static bool registerClass_(objc.ObjCObjectBase protocolClass) { + return _objc_msgSend_l8lotg( + _class_NSURLProtocol, _sel_registerClass_, protocolClass.ref.pointer); } - /// 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); + /// unregisterClass: + static void unregisterClass_(objc.ObjCObjectBase protocolClass) { + _objc_msgSend_ukcdfq( + _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.ref.pointer); } - /// lineNumber - int get lineNumber { - return _objc_msgSend_123(this.pointer, _sel_lineNumber); + /// canInitWithTask: + static bool canInitWithTask_(NSURLSessionTask task) { + return _objc_msgSend_l8lotg( + _class_NSURLProtocol, _sel_canInitWithTask_, task.ref.pointer); } - /// columnNumber - int get columnNumber { - return _objc_msgSend_123(this.pointer, _sel_columnNumber); + /// initWithTask:cachedResponse:client: + NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, + NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithTask_cachedResponse_client_, + task.ref.pointer, + cachedResponse?.ref.pointer ?? ffi.nullptr, + client?.ref.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); + } + + /// task + NSURLSessionTask? get task { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_task); + return _ret.address == 0 + ? null + : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } /// init - NSXMLParser init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + NSURLProtocol init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// new - static NSXMLParser new1() { - final _ret = _objc_msgSend_19(_class_NSXMLParser, _sel_new); - return NSXMLParser.castFromPointer(_ret, retain: false, release: true); + static NSURLProtocol new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtocol, _sel_new); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSXMLParser, _sel_allocWithZone_, zone); - return NSXMLParser.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSURLProtocol, _sel_allocWithZone_, zone); + return NSURLProtocol.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); + static NSURLProtocol alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtocol, _sel_alloc); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -27251,84 +28241,93 @@ class NSXMLParser extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSXMLParser, + _objc_msgSend_cqxsqq( + _class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSXMLParser, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLProtocol, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSXMLParser, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSURLProtocol, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSXMLParser, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLProtocol, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.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); + return _objc_msgSend_l8lotg(_class_NSURLProtocol, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSXMLParser, + _objc_msgSend_1tjlcwl( + _class_NSURLProtocol, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtocol, _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); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtocol, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLProtocol self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLProtocol retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLProtocol autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); + } } late final _class_NSXMLParser = objc.getClass("NSXMLParser"); late final _sel_initWithContentsOfURL_ = objc.registerName("initWithContentsOfURL:"); +late final _sel_initWithData_ = objc.registerName("initWithData:"); late final _sel_initWithStream_ = objc.registerName("initWithStream:"); -final _objc_msgSend_518 = 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_ = @@ -27360,7 +28359,7 @@ enum NSXMLParserExternalEntityResolvingPolicy { late final _sel_externalEntityResolvingPolicy = objc.registerName("externalEntityResolvingPolicy"); -final _objc_msgSend_519 = objc.msgSendPointer +final _objc_msgSend_6drw9t = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, @@ -27370,7 +28369,7 @@ final _objc_msgSend_519 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); late final _sel_setExternalEntityResolvingPolicy_ = objc.registerName("setExternalEntityResolvingPolicy:"); -final _objc_msgSend_520 = objc.msgSendPointer +final _objc_msgSend_1277g64 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -27380,26 +28379,8 @@ final _objc_msgSend_520 = objc.msgSendPointer ffi.Pointer, int)>(); late final _sel_allowedExternalEntityURLs = objc.registerName("allowedExternalEntityURLs"); -final _objc_msgSend_521 = 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_522 = 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"); @@ -27412,317 +28393,196 @@ late final _sel_systemID = objc.registerName("systemID"); late final _sel_lineNumber = objc.registerName("lineNumber"); late final _sel_columnNumber = objc.registerName("columnNumber"); -/// NSFileWrapper -class NSFileWrapper extends objc.NSObject { - NSFileWrapper._(ffi.Pointer 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 [NSFileWrapper] that points to the same underlying object as [other]. - NSFileWrapper.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSXMLParser] that points to the same underlying object as [other]. + NSXMLParser.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSFileWrapper] that wraps the given raw object pointer. - NSFileWrapper.castFromPointer(ffi.Pointer other, + /// 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 [NSFileWrapper]. + /// Returns whether [obj] is an instance of [NSXMLParser]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); - } - - /// initWithURL:options:error: - NSFileWrapper? initWithURL_options_error_( - objc.NSURL url, - NSFileWrapperReadingOptions options, - ffi.Pointer> outError) { - final _ret = _objc_msgSend_523(this.pointer, - _sel_initWithURL_options_error_, url.pointer, options.value, outError); - return _ret.address == 0 - ? null - : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); - } - - /// initDirectoryWithFileWrappers: - NSFileWrapper initDirectoryWithFileWrappers_( - objc.NSDictionary childrenByPreferredName) { - final _ret = _objc_msgSend_524(this.pointer, - _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.pointer); - return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); - } - - /// initRegularFileWithContents: - NSFileWrapper initRegularFileWithContents_(objc.NSData contents) { - final _ret = _objc_msgSend_337( - this.pointer, _sel_initRegularFileWithContents_, contents.pointer); - return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); - } - - /// initSymbolicLinkWithDestinationURL: - NSFileWrapper initSymbolicLinkWithDestinationURL_(objc.NSURL url) { - final _ret = _objc_msgSend_329( - this.pointer, _sel_initSymbolicLinkWithDestinationURL_, url.pointer); - return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithSerializedRepresentation: - NSFileWrapper? initWithSerializedRepresentation_( - objc.NSData serializeRepresentation) { - final _ret = _objc_msgSend_338( - this.pointer, - _sel_initWithSerializedRepresentation_, - serializeRepresentation.pointer); - return _ret.address == 0 - ? null - : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLParser); } - /// initWithCoder: - NSFileWrapper? initWithCoder_(objc.NSCoder inCoder) { - final _ret = - _objc_msgSend_239(this.pointer, _sel_initWithCoder_, inCoder.pointer); + /// initWithContentsOfURL: + NSXMLParser? initWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, url.ref.pointer); return _ret.address == 0 ? null - : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); - } - - /// isDirectory - bool get directory { - return _objc_msgSend_13(this.pointer, _sel_isDirectory); - } - - /// isRegularFile - bool get regularFile { - return _objc_msgSend_13(this.pointer, _sel_isRegularFile); - } - - /// isSymbolicLink - bool get symbolicLink { - return _objc_msgSend_13(this.pointer, _sel_isSymbolicLink); + : NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - /// preferredFilename - objc.NSString? get preferredFilename { - final _ret = _objc_msgSend_20(this.pointer, _sel_preferredFilename); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// initWithData: + NSXMLParser initWithData_(objc.NSData data) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithData_, data.ref.pointer); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - /// setPreferredFilename: - set preferredFilename(objc.NSString? value) { - return _objc_msgSend_21(this.pointer, _sel_setPreferredFilename_, - value?.pointer ?? ffi.nullptr); + /// initWithStream: + NSXMLParser initWithStream_(objc.NSInputStream stream) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithStream_, stream.ref.pointer); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - /// filename - objc.NSString? get filename { - final _ret = _objc_msgSend_20(this.pointer, _sel_filename); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// setFilename: - set filename(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setFilename_, value?.pointer ?? ffi.nullptr); - } - - /// fileAttributes - objc.NSDictionary get fileAttributes { - final _ret = _objc_msgSend_121(this.pointer, _sel_fileAttributes); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } - - /// setFileAttributes: - set fileAttributes(objc.NSDictionary value) { - return _objc_msgSend_122( - this.pointer, _sel_setFileAttributes_, value.pointer); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// matchesContentsOfURL: - bool matchesContentsOfURL_(objc.NSURL url) { - return _objc_msgSend_314( - this.pointer, _sel_matchesContentsOfURL_, url.pointer); + /// setDelegate: + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } - /// readFromURL:options:error: - bool readFromURL_options_error_( - objc.NSURL url, - NSFileWrapperReadingOptions options, - ffi.Pointer> outError) { - return _objc_msgSend_525(this.pointer, _sel_readFromURL_options_error_, - url.pointer, options.value, outError); + /// shouldProcessNamespaces + bool get shouldProcessNamespaces { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_shouldProcessNamespaces); } - /// writeToURL:options:originalContentsURL:error: - bool writeToURL_options_originalContentsURL_error_( - objc.NSURL url, - NSFileWrapperWritingOptions options, - objc.NSURL? originalContentsURL, - ffi.Pointer> outError) { - return _objc_msgSend_526( - this.pointer, - _sel_writeToURL_options_originalContentsURL_error_, - url.pointer, - options.value, - originalContentsURL?.pointer ?? ffi.nullptr, - outError); + /// setShouldProcessNamespaces: + set shouldProcessNamespaces(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldProcessNamespaces_, value); } - /// serializedRepresentation - objc.NSData? get serializedRepresentation { - final _ret = _objc_msgSend_334(this.pointer, _sel_serializedRepresentation); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// shouldReportNamespacePrefixes + bool get shouldReportNamespacePrefixes { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_shouldReportNamespacePrefixes); } - /// addFileWrapper: - objc.NSString addFileWrapper_(NSFileWrapper child) { - final _ret = - _objc_msgSend_527(this.pointer, _sel_addFileWrapper_, child.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setShouldReportNamespacePrefixes: + set shouldReportNamespacePrefixes(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldReportNamespacePrefixes_, value); } - /// addRegularFileWithContents:preferredFilename: - objc.NSString addRegularFileWithContents_preferredFilename_( - objc.NSData data, objc.NSString fileName) { - final _ret = _objc_msgSend_528( - this.pointer, - _sel_addRegularFileWithContents_preferredFilename_, - data.pointer, - fileName.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// externalEntityResolvingPolicy + NSXMLParserExternalEntityResolvingPolicy get externalEntityResolvingPolicy { + final _ret = _objc_msgSend_6drw9t( + this.ref.pointer, _sel_externalEntityResolvingPolicy); + return NSXMLParserExternalEntityResolvingPolicy.fromValue(_ret); } - /// removeFileWrapper: - void removeFileWrapper_(NSFileWrapper child) { - _objc_msgSend_529(this.pointer, _sel_removeFileWrapper_, child.pointer); + /// setExternalEntityResolvingPolicy: + set externalEntityResolvingPolicy( + NSXMLParserExternalEntityResolvingPolicy value) { + return _objc_msgSend_1277g64( + this.ref.pointer, _sel_setExternalEntityResolvingPolicy_, value.value); } - /// fileWrappers - objc.NSDictionary? get fileWrappers { - final _ret = _objc_msgSend_82(this.pointer, _sel_fileWrappers); + /// allowedExternalEntityURLs + objc.NSSet? get allowedExternalEntityURLs { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allowedExternalEntityURLs); return _ret.address == 0 ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + : objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// keyForFileWrapper: - objc.NSString? keyForFileWrapper_(NSFileWrapper child) { - final _ret = - _objc_msgSend_530(this.pointer, _sel_keyForFileWrapper_, child.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setAllowedExternalEntityURLs: + set allowedExternalEntityURLs(objc.NSSet? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setAllowedExternalEntityURLs_, value?.ref.pointer ?? ffi.nullptr); } - /// regularFileContents - objc.NSData? get regularFileContents { - final _ret = _objc_msgSend_334(this.pointer, _sel_regularFileContents); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// parse + bool parse() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_parse); } - /// symbolicLinkDestinationURL - objc.NSURL? get symbolicLinkDestinationURL { - final _ret = - _objc_msgSend_24(this.pointer, _sel_symbolicLinkDestinationURL); - return _ret.address == 0 - ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + /// abortParsing + void abortParsing() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_abortParsing); } - /// initWithPath: - objc.ObjCObjectBase? initWithPath_(objc.NSString path) { - final _ret = - _objc_msgSend_35(this.pointer, _sel_initWithPath_, path.pointer); + /// parserError + objc.NSError? get parserError { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_parserError); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// initSymbolicLinkWithDestination: - objc.ObjCObjectBase initSymbolicLinkWithDestination_(objc.NSString path) { - final _ret = _objc_msgSend_63( - this.pointer, _sel_initSymbolicLinkWithDestination_, path.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - /// needsToBeUpdatedFromPath: - bool needsToBeUpdatedFromPath_(objc.NSString path) { - return _objc_msgSend_31( - this.pointer, _sel_needsToBeUpdatedFromPath_, path.pointer); + /// shouldResolveExternalEntities + bool get shouldResolveExternalEntities { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_shouldResolveExternalEntities); } - /// updateFromPath: - bool updateFromPath_(objc.NSString path) { - return _objc_msgSend_31(this.pointer, _sel_updateFromPath_, path.pointer); + /// setShouldResolveExternalEntities: + set shouldResolveExternalEntities(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldResolveExternalEntities_, value); } - /// writeToFile:atomically:updateFilenames: - bool writeToFile_atomically_updateFilenames_( - objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { - return _objc_msgSend_531( - this.pointer, - _sel_writeToFile_atomically_updateFilenames_, - path.pointer, - atomicFlag, - updateFilenamesFlag); + /// publicID + objc.NSString? get publicID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// addFileWithPath: - objc.NSString addFileWithPath_(objc.NSString path) { - final _ret = - _objc_msgSend_306(this.pointer, _sel_addFileWithPath_, path.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// systemID + objc.NSString? get systemID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// addSymbolicLinkWithDestination:preferredFilename: - objc.NSString addSymbolicLinkWithDestination_preferredFilename_( - objc.NSString path, objc.NSString filename) { - final _ret = _objc_msgSend_532( - this.pointer, - _sel_addSymbolicLinkWithDestination_preferredFilename_, - path.pointer, - filename.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// lineNumber + int get lineNumber { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_lineNumber); } - /// symbolicLinkDestination - objc.NSString symbolicLinkDestination() { - final _ret = _objc_msgSend_11(this.pointer, _sel_symbolicLinkDestination); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// columnNumber + int get columnNumber { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_columnNumber); } /// init - NSFileWrapper init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + NSXMLParser init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// new - static NSFileWrapper new1() { - final _ret = _objc_msgSend_19(_class_NSFileWrapper, _sel_new); - return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); + static NSXMLParser new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLParser, _sel_new); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSFileWrapper, _sel_allocWithZone_, zone); - return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSXMLParser, _sel_allocWithZone_, zone); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSFileWrapper alloc() { - final _ret = _objc_msgSend_19(_class_NSFileWrapper, _sel_alloc); - return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); + static NSXMLParser alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLParser, _sel_alloc); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -27730,68 +28590,86 @@ class NSFileWrapper extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSFileWrapper, + _objc_msgSend_cqxsqq( + _class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSFileWrapper, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSXMLParser, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSFileWrapper, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSXMLParser, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSFileWrapper, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLParser, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSFileWrapper, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSXMLParser, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSFileWrapper, + _objc_msgSend_1tjlcwl( + _class_NSXMLParser, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = - _objc_msgSend_19(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); + _objc_msgSend_1unuoxw(_class_NSXMLParser, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSXMLParser self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSXMLParser retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSXMLParser autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + } } late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); @@ -27813,7 +28691,7 @@ enum NSFileWrapperReadingOptions { late final _sel_initWithURL_options_error_ = objc.registerName("initWithURL:options:error:"); -final _objc_msgSend_523 = objc.msgSendPointer +final _objc_msgSend_g0dcla = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -27831,16 +28709,6 @@ final _objc_msgSend_523 = objc.msgSendPointer ffi.Pointer>)>(); late final _sel_initDirectoryWithFileWrappers_ = objc.registerName("initDirectoryWithFileWrappers:"); -final _objc_msgSend_524 = 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_initRegularFileWithContents_ = objc.registerName("initRegularFileWithContents:"); late final _sel_initSymbolicLinkWithDestinationURL_ = @@ -27861,7 +28729,7 @@ late final _sel_matchesContentsOfURL_ = objc.registerName("matchesContentsOfURL:"); late final _sel_readFromURL_options_error_ = objc.registerName("readFromURL:options:error:"); -final _objc_msgSend_525 = objc.msgSendPointer +final _objc_msgSend_138eppz = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -27895,7 +28763,7 @@ enum NSFileWrapperWritingOptions { late final _sel_writeToURL_options_originalContentsURL_error_ = objc.registerName("writeToURL:options:originalContentsURL:error:"); -final _objc_msgSend_526 = objc.msgSendPointer +final _objc_msgSend_nrvb12 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -27916,55 +28784,11 @@ final _objc_msgSend_526 = objc.msgSendPointer late final _sel_serializedRepresentation = objc.registerName("serializedRepresentation"); late final _sel_addFileWrapper_ = objc.registerName("addFileWrapper:"); -final _objc_msgSend_527 = 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_addRegularFileWithContents_preferredFilename_ = objc.registerName("addRegularFileWithContents:preferredFilename:"); -final _objc_msgSend_528 = 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_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); -final _objc_msgSend_529 = 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_fileWrappers = objc.registerName("fileWrappers"); late final _sel_keyForFileWrapper_ = objc.registerName("keyForFileWrapper:"); -final _objc_msgSend_530 = 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_regularFileContents = objc.registerName("regularFileContents"); late final _sel_symbolicLinkDestinationURL = objc.registerName("symbolicLinkDestinationURL"); @@ -27975,7 +28799,7 @@ late final _sel_needsToBeUpdatedFromPath_ = late final _sel_updateFromPath_ = objc.registerName("updateFromPath:"); late final _sel_writeToFile_atomically_updateFilenames_ = objc.registerName("writeToFile:atomically:updateFilenames:"); -final _objc_msgSend_531 = objc.msgSendPointer +final _objc_msgSend_1vcrzki = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -27994,392 +28818,337 @@ final _objc_msgSend_531 = objc.msgSendPointer late final _sel_addFileWithPath_ = objc.registerName("addFileWithPath:"); late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = objc.registerName("addSymbolicLinkWithDestination:preferredFilename:"); -final _objc_msgSend_532 = 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_symbolicLinkDestination = objc.registerName("symbolicLinkDestination"); -/// NSURLSession -class NSURLSession extends objc.NSObject { - NSURLSession._(ffi.Pointer pointer, +/// NSFileWrapper +class NSFileWrapper extends objc.NSObject { + NSFileWrapper._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSURLSession] that points to the same underlying object as [other]. - NSURLSession.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSFileWrapper] that points to the same underlying object as [other]. + NSFileWrapper.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLSession] that wraps the given raw object pointer. - NSURLSession.castFromPointer(ffi.Pointer other, + /// Constructs a [NSFileWrapper] that wraps the given raw object pointer. + NSFileWrapper.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLSession]. + /// Returns whether [obj] is an instance of [NSFileWrapper]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSession); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); } - /// sharedSession - static NSURLSession getSharedSession() { - final _ret = _objc_msgSend_533(_class_NSURLSession, _sel_sharedSession); - return NSURLSession.castFromPointer(_ret, retain: true, release: true); - } - - /// sessionWithConfiguration: - static NSURLSession sessionWithConfiguration_( - NSURLSessionConfiguration configuration) { - final _ret = _objc_msgSend_549(_class_NSURLSession, - _sel_sessionWithConfiguration_, configuration.pointer); - return NSURLSession.castFromPointer(_ret, retain: true, release: true); - } - - /// sessionWithConfiguration:delegate:delegateQueue: - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NSURLSessionConfiguration configuration, - objc.ObjCObjectBase? delegate, - NSOperationQueue? queue) { - final _ret = _objc_msgSend_550( - _class_NSURLSession, - _sel_sessionWithConfiguration_delegate_delegateQueue_, - configuration.pointer, - delegate?.pointer ?? ffi.nullptr, - queue?.pointer ?? ffi.nullptr); - return NSURLSession.castFromPointer(_ret, retain: true, release: true); + /// initWithURL:options:error: + NSFileWrapper? initWithURL_options_error_( + objc.NSURL url, + NSFileWrapperReadingOptions options, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_g0dcla( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_options_error_, + url.ref.pointer, + options.value, + outError); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - /// delegateQueue - NSOperationQueue get delegateQueue { - final _ret = _objc_msgSend_400(this.pointer, _sel_delegateQueue); - return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + /// initDirectoryWithFileWrappers: + NSFileWrapper initDirectoryWithFileWrappers_( + objc.NSDictionary childrenByPreferredName) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), + _sel_initDirectoryWithFileWrappers_, + childrenByPreferredName.ref.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// initRegularFileWithContents: + NSFileWrapper initRegularFileWithContents_(objc.NSData contents) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initRegularFileWithContents_, contents.ref.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - /// configuration - NSURLSessionConfiguration get configuration { - final _ret = _objc_msgSend_534(this.pointer, _sel_configuration); - return NSURLSessionConfiguration.castFromPointer(_ret, - retain: true, release: true); + /// initSymbolicLinkWithDestinationURL: + NSFileWrapper initSymbolicLinkWithDestinationURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initSymbolicLinkWithDestinationURL_, url.ref.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - /// sessionDescription - objc.NSString? get sessionDescription { - final _ret = _objc_msgSend_20(this.pointer, _sel_sessionDescription); + /// initWithSerializedRepresentation: + NSFileWrapper? initWithSerializedRepresentation_( + objc.NSData serializeRepresentation) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), + _sel_initWithSerializedRepresentation_, + serializeRepresentation.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - /// setSessionDescription: - set sessionDescription(objc.NSString? value) { - return _objc_msgSend_21(this.pointer, _sel_setSessionDescription_, - value?.pointer ?? ffi.nullptr); + /// initWithCoder: + NSFileWrapper? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - /// finishTasksAndInvalidate - void finishTasksAndInvalidate() { - _objc_msgSend_7(this.pointer, _sel_finishTasksAndInvalidate); + /// isDirectory + bool get directory { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDirectory); } - /// invalidateAndCancel - void invalidateAndCancel() { - _objc_msgSend_7(this.pointer, _sel_invalidateAndCancel); + /// isRegularFile + bool get regularFile { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isRegularFile); } - /// resetWithCompletionHandler: - void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _objc_msgSend_258(this.pointer, _sel_resetWithCompletionHandler_, - completionHandler.pointer); + /// isSymbolicLink + bool get symbolicLink { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSymbolicLink); } - /// flushWithCompletionHandler: - void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _objc_msgSend_258(this.pointer, _sel_flushWithCompletionHandler_, - completionHandler.pointer); + /// preferredFilename + objc.NSString? get preferredFilename { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// getTasksWithCompletionHandler: - void getTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { - _objc_msgSend_551(this.pointer, _sel_getTasksWithCompletionHandler_, - completionHandler.pointer); + /// setPreferredFilename: + set preferredFilename(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPreferredFilename_, + value?.ref.pointer ?? ffi.nullptr); } - /// getAllTasksWithCompletionHandler: - void getAllTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray1 completionHandler) { - _objc_msgSend_552(this.pointer, _sel_getAllTasksWithCompletionHandler_, - completionHandler.pointer); + /// filename + objc.NSString? get filename { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_filename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// dataTaskWithRequest: - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_553( - this.pointer, _sel_dataTaskWithRequest_, request.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: true, release: true); + /// setFilename: + set filename(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFilename_, value?.ref.pointer ?? ffi.nullptr); } - /// dataTaskWithURL: - NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { - final _ret = - _objc_msgSend_554(this.pointer, _sel_dataTaskWithURL_, url.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: true, release: true); + /// fileAttributes + objc.NSDictionary get fileAttributes { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileAttributes); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// uploadTaskWithRequest:fromFile: - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest request, objc.NSURL fileURL) { - final _ret = _objc_msgSend_556(this.pointer, - _sel_uploadTaskWithRequest_fromFile_, request.pointer, fileURL.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// setFileAttributes: + set fileAttributes(objc.NSDictionary value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFileAttributes_, value.ref.pointer); } - /// uploadTaskWithRequest:fromData: - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest request, objc.NSData bodyData) { - final _ret = _objc_msgSend_557( - this.pointer, - _sel_uploadTaskWithRequest_fromData_, - request.pointer, - bodyData.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// matchesContentsOfURL: + bool matchesContentsOfURL_(objc.NSURL url) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_matchesContentsOfURL_, url.ref.pointer); } - /// uploadTaskWithResumeData: - NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { - final _ret = _objc_msgSend_558( - this.pointer, _sel_uploadTaskWithResumeData_, resumeData.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// readFromURL:options:error: + bool readFromURL_options_error_( + objc.NSURL url, + NSFileWrapperReadingOptions options, + ffi.Pointer> outError) { + return _objc_msgSend_138eppz( + this.ref.pointer, + _sel_readFromURL_options_error_, + url.ref.pointer, + options.value, + outError); } - /// uploadTaskWithStreamedRequest: - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_559( - this.pointer, _sel_uploadTaskWithStreamedRequest_, request.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// writeToURL:options:originalContentsURL:error: + bool writeToURL_options_originalContentsURL_error_( + objc.NSURL url, + NSFileWrapperWritingOptions options, + objc.NSURL? originalContentsURL, + ffi.Pointer> outError) { + return _objc_msgSend_nrvb12( + this.ref.pointer, + _sel_writeToURL_options_originalContentsURL_error_, + url.ref.pointer, + options.value, + originalContentsURL?.ref.pointer ?? ffi.nullptr, + outError); } - /// downloadTaskWithRequest: - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_560( - this.pointer, _sel_downloadTaskWithRequest_, request.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + /// serializedRepresentation + objc.NSData? get serializedRepresentation { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_serializedRepresentation); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// downloadTaskWithURL: - NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { - final _ret = - _objc_msgSend_561(this.pointer, _sel_downloadTaskWithURL_, url.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + /// addFileWrapper: + objc.NSString addFileWrapper_(NSFileWrapper child) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_addFileWrapper_, child.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// downloadTaskWithResumeData: - NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { - final _ret = _objc_msgSend_562( - this.pointer, _sel_downloadTaskWithResumeData_, resumeData.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + /// addRegularFileWithContents:preferredFilename: + objc.NSString addRegularFileWithContents_preferredFilename_( + objc.NSData data, objc.NSString fileName) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_addRegularFileWithContents_preferredFilename_, + data.ref.pointer, + fileName.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// streamTaskWithHostName:port: - NSURLSessionStreamTask streamTaskWithHostName_port_( - objc.NSString hostname, int port) { - final _ret = _objc_msgSend_565(this.pointer, - _sel_streamTaskWithHostName_port_, hostname.pointer, port); - return NSURLSessionStreamTask.castFromPointer(_ret, - retain: true, release: true); + /// removeFileWrapper: + void removeFileWrapper_(NSFileWrapper child) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeFileWrapper_, child.ref.pointer); } - /// streamTaskWithNetService: - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _objc_msgSend_574( - this.pointer, _sel_streamTaskWithNetService_, service.pointer); - return NSURLSessionStreamTask.castFromPointer(_ret, - retain: true, release: true); + /// fileWrappers + objc.NSDictionary? get fileWrappers { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileWrappers); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// webSocketTaskWithURL: - NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_581( - this.pointer, _sel_webSocketTaskWithURL_, url.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: true, release: true); + /// keyForFileWrapper: + objc.NSString? keyForFileWrapper_(NSFileWrapper child) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_keyForFileWrapper_, child.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// webSocketTaskWithURL:protocols: - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - objc.NSURL url, objc.NSArray protocols) { - final _ret = _objc_msgSend_582(this.pointer, - _sel_webSocketTaskWithURL_protocols_, url.pointer, protocols.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: true, release: true); + /// regularFileContents + objc.NSData? get regularFileContents { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_regularFileContents); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// webSocketTaskWithRequest: - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_583( - this.pointer, _sel_webSocketTaskWithRequest_, request.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: true, release: true); + /// symbolicLinkDestinationURL + objc.NSURL? get symbolicLinkDestinationURL { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_symbolicLinkDestinationURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// init - NSURLSession init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLSession.castFromPointer(_ret, retain: true, release: true); + /// initWithPath: + objc.ObjCObjectBase? initWithPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); } - /// new - static NSURLSession new1() { - final _ret = _objc_msgSend_19(_class_NSURLSession, _sel_new); - return NSURLSession.castFromPointer(_ret, retain: false, release: true); + /// initSymbolicLinkWithDestination: + objc.ObjCObjectBase initSymbolicLinkWithDestination_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initSymbolicLinkWithDestination_, path.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: false, release: true); } - /// dataTaskWithRequest:completionHandler: - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_584( - this.pointer, - _sel_dataTaskWithRequest_completionHandler_, - request.pointer, - completionHandler.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: true, release: true); + /// needsToBeUpdatedFromPath: + bool needsToBeUpdatedFromPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_needsToBeUpdatedFromPath_, path.ref.pointer); } - /// dataTaskWithURL:completionHandler: - NSURLSessionDataTask dataTaskWithURL_completionHandler_(objc.NSURL url, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_585( - this.pointer, - _sel_dataTaskWithURL_completionHandler_, - url.pointer, - completionHandler.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: true, release: true); + /// updateFromPath: + bool updateFromPath_(objc.NSString path) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_updateFromPath_, path.ref.pointer); } - /// uploadTaskWithRequest:fromFile:completionHandler: - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest request, - objc.NSURL fileURL, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_586( - this.pointer, - _sel_uploadTaskWithRequest_fromFile_completionHandler_, - request.pointer, - fileURL.pointer, - completionHandler.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// writeToFile:atomically:updateFilenames: + bool writeToFile_atomically_updateFilenames_( + objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { + return _objc_msgSend_1vcrzki( + this.ref.pointer, + _sel_writeToFile_atomically_updateFilenames_, + path.ref.pointer, + atomicFlag, + updateFilenamesFlag); } - /// uploadTaskWithRequest:fromData:completionHandler: - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest request, - objc.NSData? bodyData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_587( - this.pointer, - _sel_uploadTaskWithRequest_fromData_completionHandler_, - request.pointer, - bodyData?.pointer ?? ffi.nullptr, - completionHandler.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// addFileWithPath: + objc.NSString addFileWithPath_(objc.NSString path) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_addFileWithPath_, path.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// uploadTaskWithResumeData:completionHandler: - NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( - objc.NSData resumeData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_588( - this.pointer, - _sel_uploadTaskWithResumeData_completionHandler_, - resumeData.pointer, - completionHandler.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// addSymbolicLinkWithDestination:preferredFilename: + objc.NSString addSymbolicLinkWithDestination_preferredFilename_( + objc.NSString path, objc.NSString filename) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_addSymbolicLinkWithDestination_preferredFilename_, + path.ref.pointer, + filename.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// downloadTaskWithRequest:completionHandler: - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_589( - this.pointer, - _sel_downloadTaskWithRequest_completionHandler_, - request.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + /// symbolicLinkDestination + objc.NSString symbolicLinkDestination() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_symbolicLinkDestination); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// downloadTaskWithURL:completionHandler: - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( - objc.NSURL url, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_590( - this.pointer, - _sel_downloadTaskWithURL_completionHandler_, - url.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + /// init + NSFileWrapper init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - /// downloadTaskWithResumeData:completionHandler: - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - objc.NSData resumeData, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_591( - this.pointer, - _sel_downloadTaskWithResumeData_completionHandler_, - resumeData.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + /// new + static NSFileWrapper new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFileWrapper, _sel_new); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSURLSession, _sel_allocWithZone_, zone); - return NSURLSession.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSFileWrapper, _sel_allocWithZone_, zone); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSURLSession alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSession, _sel_alloc); - return NSURLSession.castFromPointer(_ret, retain: false, release: true); + static NSFileWrapper alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSFileWrapper, _sel_alloc); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -28387,80 +29156,323 @@ class NSURLSession extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLSession, + _objc_msgSend_cqxsqq( + _class_NSFileWrapper, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSession, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSFileWrapper, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLSession, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSURLSession, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSFileWrapper, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSession, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSFileWrapper, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSURLSession, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSFileWrapper, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLSession, + _objc_msgSend_1tjlcwl( + _class_NSFileWrapper, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSURLSession, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileWrapper, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSFileWrapper self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSFileWrapper retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSFileWrapper autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSFileWrapper, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } } late final _class_NSURLSession = objc.getClass("NSURLSession"); late final _sel_sharedSession = objc.registerName("sharedSession"); -final _objc_msgSend_533 = objc.msgSendPointer +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +late final _sel_ephemeralSessionConfiguration = + objc.registerName("ephemeralSessionConfiguration"); +late final _sel_backgroundSessionConfigurationWithIdentifier_ = + objc.registerName("backgroundSessionConfigurationWithIdentifier:"); +late final _sel_identifier = objc.registerName("identifier"); +late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); +late final _sel_setRequestCachePolicy_ = + objc.registerName("setRequestCachePolicy:"); +late final _sel_timeoutIntervalForRequest = + objc.registerName("timeoutIntervalForRequest"); +late final _sel_setTimeoutIntervalForRequest_ = + objc.registerName("setTimeoutIntervalForRequest:"); +late final _sel_timeoutIntervalForResource = + objc.registerName("timeoutIntervalForResource"); +late final _sel_setTimeoutIntervalForResource_ = + objc.registerName("setTimeoutIntervalForResource:"); +late final _sel_waitsForConnectivity = + objc.registerName("waitsForConnectivity"); +late final _sel_setWaitsForConnectivity_ = + objc.registerName("setWaitsForConnectivity:"); +late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); +late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); +late final _sel_sharedContainerIdentifier = + objc.registerName("sharedContainerIdentifier"); +late final _sel_setSharedContainerIdentifier_ = + objc.registerName("setSharedContainerIdentifier:"); +late final _sel_sessionSendsLaunchEvents = + objc.registerName("sessionSendsLaunchEvents"); +late final _sel_setSessionSendsLaunchEvents_ = + objc.registerName("setSessionSendsLaunchEvents:"); +late final _sel_connectionProxyDictionary = + objc.registerName("connectionProxyDictionary"); +late final _sel_setConnectionProxyDictionary_ = + objc.registerName("setConnectionProxyDictionary:"); + +enum SSLProtocol { + kSSLProtocolUnknown(0), + kTLSProtocol1(4), + kTLSProtocol11(7), + kTLSProtocol12(8), + kDTLSProtocol1(9), + kTLSProtocol13(10), + kDTLSProtocol12(11), + kTLSProtocolMaxSupported(999), + kSSLProtocol2(1), + kSSLProtocol3(2), + kSSLProtocol3Only(3), + kTLSProtocol1Only(5), + kSSLProtocolAll(6); + + final int value; + const SSLProtocol(this.value); + + static SSLProtocol fromValue(int value) => switch (value) { + 0 => kSSLProtocolUnknown, + 4 => kTLSProtocol1, + 7 => kTLSProtocol11, + 8 => kTLSProtocol12, + 9 => kDTLSProtocol1, + 10 => kTLSProtocol13, + 11 => kDTLSProtocol12, + 999 => kTLSProtocolMaxSupported, + 1 => kSSLProtocol2, + 2 => kSSLProtocol3, + 3 => kSSLProtocol3Only, + 5 => kTLSProtocol1Only, + 6 => kSSLProtocolAll, + _ => throw ArgumentError("Unknown value for SSLProtocol: $value"), + }; +} + +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_ewo6ux = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.UnsignedInt Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_hcgw10 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); + +enum tls_protocol_version_t { + tls_protocol_version_TLSv10(769), + tls_protocol_version_TLSv11(770), + tls_protocol_version_TLSv12(771), + tls_protocol_version_TLSv13(772), + tls_protocol_version_DTLSv10(-257), + tls_protocol_version_DTLSv12(-259); + + final int value; + const tls_protocol_version_t(this.value); + + static tls_protocol_version_t fromValue(int value) => switch (value) { + 769 => tls_protocol_version_TLSv10, + 770 => tls_protocol_version_TLSv11, + 771 => tls_protocol_version_TLSv12, + 772 => tls_protocol_version_TLSv13, + -257 => tls_protocol_version_DTLSv10, + -259 => tls_protocol_version_DTLSv12, + _ => throw ArgumentError( + "Unknown value for tls_protocol_version_t: $value"), + }; +} + +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_a6qtz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Uint16 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_yb8bfm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Uint16)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocolVersion = + objc.registerName("TLSMaximumSupportedProtocolVersion"); +late final _sel_setTLSMaximumSupportedProtocolVersion_ = + objc.registerName("setTLSMaximumSupportedProtocolVersion:"); +late final _sel_HTTPShouldSetCookies = + objc.registerName("HTTPShouldSetCookies"); +late final _sel_setHTTPShouldSetCookies_ = + objc.registerName("setHTTPShouldSetCookies:"); +late final _sel_HTTPCookieAcceptPolicy = + objc.registerName("HTTPCookieAcceptPolicy"); +late final _sel_setHTTPCookieAcceptPolicy_ = + objc.registerName("setHTTPCookieAcceptPolicy:"); +late final _sel_HTTPAdditionalHeaders = + objc.registerName("HTTPAdditionalHeaders"); +late final _sel_setHTTPAdditionalHeaders_ = + objc.registerName("setHTTPAdditionalHeaders:"); +late final _sel_HTTPMaximumConnectionsPerHost = + objc.registerName("HTTPMaximumConnectionsPerHost"); +late final _sel_setHTTPMaximumConnectionsPerHost_ = + objc.registerName("setHTTPMaximumConnectionsPerHost:"); +late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); +late final _sel_setHTTPCookieStorage_ = + objc.registerName("setHTTPCookieStorage:"); +late final _sel_URLCredentialStorage = + objc.registerName("URLCredentialStorage"); +late final _sel_setURLCredentialStorage_ = + objc.registerName("setURLCredentialStorage:"); +late final _sel_URLCache = objc.registerName("URLCache"); +late final _sel_setURLCache_ = objc.registerName("setURLCache:"); +late final _sel_shouldUseExtendedBackgroundIdleMode = + objc.registerName("shouldUseExtendedBackgroundIdleMode"); +late final _sel_setShouldUseExtendedBackgroundIdleMode_ = + objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); +late final _sel_protocolClasses = objc.registerName("protocolClasses"); +late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); + +enum NSURLSessionMultipathServiceType { + NSURLSessionMultipathServiceTypeNone(0), + NSURLSessionMultipathServiceTypeHandover(1), + NSURLSessionMultipathServiceTypeInteractive(2), + NSURLSessionMultipathServiceTypeAggregate(3); + + final int value; + const NSURLSessionMultipathServiceType(this.value); + + static NSURLSessionMultipathServiceType fromValue(int value) => + switch (value) { + 0 => NSURLSessionMultipathServiceTypeNone, + 1 => NSURLSessionMultipathServiceTypeHandover, + 2 => NSURLSessionMultipathServiceTypeInteractive, + 3 => NSURLSessionMultipathServiceTypeAggregate, + _ => throw ArgumentError( + "Unknown value for NSURLSessionMultipathServiceType: $value"), + }; +} + +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_zqvllq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_1ngj1qh = 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_backgroundSessionConfiguration_ = + objc.registerName("backgroundSessionConfiguration:"); /// NSURLSessionConfiguration class NSURLSessionConfiguration extends objc.NSObject { @@ -28470,7 +29482,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Constructs a [NSURLSessionConfiguration] that points to the same underlying object as [other]. NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionConfiguration] that wraps the given raw object pointer. NSURLSessionConfiguration.castFromPointer(ffi.Pointer other, @@ -28479,13 +29491,13 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); } /// defaultSessionConfiguration static NSURLSessionConfiguration getDefaultSessionConfiguration() { - final _ret = _objc_msgSend_534( + final _ret = _objc_msgSend_1unuoxw( _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); @@ -28493,7 +29505,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// ephemeralSessionConfiguration static NSURLSessionConfiguration getEphemeralSessionConfiguration() { - final _ret = _objc_msgSend_534( + final _ret = _objc_msgSend_1unuoxw( _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); @@ -28502,15 +29514,17 @@ class NSURLSessionConfiguration extends objc.NSObject { /// backgroundSessionConfigurationWithIdentifier: static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { - final _ret = _objc_msgSend_535(_class_NSURLSessionConfiguration, - _sel_backgroundSessionConfigurationWithIdentifier_, identifier.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSURLSessionConfiguration, + _sel_backgroundSessionConfigurationWithIdentifier_, + identifier.ref.pointer); return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); } /// identifier objc.NSString? get identifier { - final _ret = _objc_msgSend_20(this.pointer, _sel_identifier); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_identifier); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -28518,120 +29532,133 @@ class NSURLSessionConfiguration extends objc.NSObject { /// requestCachePolicy NSURLRequestCachePolicy get requestCachePolicy { - final _ret = _objc_msgSend_331(this.pointer, _sel_requestCachePolicy); + final _ret = + _objc_msgSend_2xak1q(this.ref.pointer, _sel_requestCachePolicy); return NSURLRequestCachePolicy.fromValue(_ret); } /// setRequestCachePolicy: set requestCachePolicy(NSURLRequestCachePolicy value) { - return _objc_msgSend_507( - this.pointer, _sel_setRequestCachePolicy_, value.value); + return _objc_msgSend_12vaadl( + this.ref.pointer, _sel_setRequestCachePolicy_, value.value); } /// timeoutIntervalForRequest double get timeoutIntervalForRequest { return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_timeoutIntervalForRequest) - : _objc_msgSend_18(this.pointer, _sel_timeoutIntervalForRequest); + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_timeoutIntervalForRequest) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_timeoutIntervalForRequest); } /// setTimeoutIntervalForRequest: set timeoutIntervalForRequest(double value) { - return _objc_msgSend_223( - this.pointer, _sel_setTimeoutIntervalForRequest_, value); + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutIntervalForRequest_, value); } /// timeoutIntervalForResource double get timeoutIntervalForResource { return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_timeoutIntervalForResource) - : _objc_msgSend_18(this.pointer, _sel_timeoutIntervalForResource); + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_timeoutIntervalForResource) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_timeoutIntervalForResource); } /// setTimeoutIntervalForResource: set timeoutIntervalForResource(double value) { - return _objc_msgSend_223( - this.pointer, _sel_setTimeoutIntervalForResource_, value); + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutIntervalForResource_, value); } /// networkServiceType NSURLRequestNetworkServiceType get networkServiceType { - final _ret = _objc_msgSend_332(this.pointer, _sel_networkServiceType); + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// setNetworkServiceType: set networkServiceType(NSURLRequestNetworkServiceType value) { - return _objc_msgSend_508( - this.pointer, _sel_setNetworkServiceType_, value.value); + return _objc_msgSend_br89tg( + this.ref.pointer, _sel_setNetworkServiceType_, value.value); } /// allowsCellularAccess bool get allowsCellularAccess { - return _objc_msgSend_13(this.pointer, _sel_allowsCellularAccess); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); } /// setAllowsCellularAccess: set allowsCellularAccess(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setAllowsCellularAccess_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsCellularAccess_, value); } /// allowsExpensiveNetworkAccess bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_13(this.pointer, _sel_allowsExpensiveNetworkAccess); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } /// setAllowsExpensiveNetworkAccess: set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } /// allowsConstrainedNetworkAccess bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_13(this.pointer, _sel_allowsConstrainedNetworkAccess); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } /// setAllowsConstrainedNetworkAccess: set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } /// requiresDNSSECValidation bool get requiresDNSSECValidation { - return _objc_msgSend_13(this.pointer, _sel_requiresDNSSECValidation); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } /// setRequiresDNSSECValidation: set requiresDNSSECValidation(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setRequiresDNSSECValidation_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); } /// waitsForConnectivity bool get waitsForConnectivity { - return _objc_msgSend_13(this.pointer, _sel_waitsForConnectivity); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_waitsForConnectivity); } /// setWaitsForConnectivity: set waitsForConnectivity(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setWaitsForConnectivity_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setWaitsForConnectivity_, value); } /// isDiscretionary bool get discretionary { - return _objc_msgSend_13(this.pointer, _sel_isDiscretionary); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDiscretionary); } /// setDiscretionary: set discretionary(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setDiscretionary_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setDiscretionary_, value); } /// sharedContainerIdentifier objc.NSString? get sharedContainerIdentifier { - final _ret = _objc_msgSend_20(this.pointer, _sel_sharedContainerIdentifier); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedContainerIdentifier); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -28639,24 +29666,26 @@ class NSURLSessionConfiguration extends objc.NSObject { /// setSharedContainerIdentifier: set sharedContainerIdentifier(objc.NSString? value) { - return _objc_msgSend_21(this.pointer, _sel_setSharedContainerIdentifier_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setSharedContainerIdentifier_, value?.ref.pointer ?? ffi.nullptr); } /// sessionSendsLaunchEvents bool get sessionSendsLaunchEvents { - return _objc_msgSend_13(this.pointer, _sel_sessionSendsLaunchEvents); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_sessionSendsLaunchEvents); } /// setSessionSendsLaunchEvents: set sessionSendsLaunchEvents(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setSessionSendsLaunchEvents_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setSessionSendsLaunchEvents_, value); } /// connectionProxyDictionary objc.NSDictionary? get connectionProxyDictionary { - final _ret = _objc_msgSend_82(this.pointer, _sel_connectionProxyDictionary); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionProxyDictionary); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -28664,98 +29693,101 @@ class NSURLSessionConfiguration extends objc.NSObject { /// setConnectionProxyDictionary: set connectionProxyDictionary(objc.NSDictionary? value) { - return _objc_msgSend_187(this.pointer, _sel_setConnectionProxyDictionary_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setConnectionProxyDictionary_, value?.ref.pointer ?? ffi.nullptr); } /// TLSMinimumSupportedProtocol SSLProtocol get TLSMinimumSupportedProtocol { - final _ret = - _objc_msgSend_536(this.pointer, _sel_TLSMinimumSupportedProtocol); + final _ret = _objc_msgSend_ewo6ux( + this.ref.pointer, _sel_TLSMinimumSupportedProtocol); return SSLProtocol.fromValue(_ret); } /// setTLSMinimumSupportedProtocol: set TLSMinimumSupportedProtocol(SSLProtocol value) { - return _objc_msgSend_537( - this.pointer, _sel_setTLSMinimumSupportedProtocol_, value.value); + return _objc_msgSend_hcgw10( + this.ref.pointer, _sel_setTLSMinimumSupportedProtocol_, value.value); } /// TLSMaximumSupportedProtocol SSLProtocol get TLSMaximumSupportedProtocol { - final _ret = - _objc_msgSend_536(this.pointer, _sel_TLSMaximumSupportedProtocol); + final _ret = _objc_msgSend_ewo6ux( + this.ref.pointer, _sel_TLSMaximumSupportedProtocol); return SSLProtocol.fromValue(_ret); } /// setTLSMaximumSupportedProtocol: set TLSMaximumSupportedProtocol(SSLProtocol value) { - return _objc_msgSend_537( - this.pointer, _sel_setTLSMaximumSupportedProtocol_, value.value); + return _objc_msgSend_hcgw10( + this.ref.pointer, _sel_setTLSMaximumSupportedProtocol_, value.value); } /// TLSMinimumSupportedProtocolVersion tls_protocol_version_t get TLSMinimumSupportedProtocolVersion { - final _ret = _objc_msgSend_538( - this.pointer, _sel_TLSMinimumSupportedProtocolVersion); + final _ret = _objc_msgSend_a6qtz( + this.ref.pointer, _sel_TLSMinimumSupportedProtocolVersion); return tls_protocol_version_t.fromValue(_ret); } /// setTLSMinimumSupportedProtocolVersion: set TLSMinimumSupportedProtocolVersion(tls_protocol_version_t value) { - return _objc_msgSend_539( - this.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value.value); + return _objc_msgSend_yb8bfm(this.ref.pointer, + _sel_setTLSMinimumSupportedProtocolVersion_, value.value); } /// TLSMaximumSupportedProtocolVersion tls_protocol_version_t get TLSMaximumSupportedProtocolVersion { - final _ret = _objc_msgSend_538( - this.pointer, _sel_TLSMaximumSupportedProtocolVersion); + final _ret = _objc_msgSend_a6qtz( + this.ref.pointer, _sel_TLSMaximumSupportedProtocolVersion); return tls_protocol_version_t.fromValue(_ret); } /// setTLSMaximumSupportedProtocolVersion: set TLSMaximumSupportedProtocolVersion(tls_protocol_version_t value) { - return _objc_msgSend_539( - this.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value.value); + return _objc_msgSend_yb8bfm(this.ref.pointer, + _sel_setTLSMaximumSupportedProtocolVersion_, value.value); } /// HTTPShouldUsePipelining bool get HTTPShouldUsePipelining { - return _objc_msgSend_13(this.pointer, _sel_HTTPShouldUsePipelining); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); } /// setHTTPShouldUsePipelining: set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setHTTPShouldUsePipelining_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); } /// HTTPShouldSetCookies bool get HTTPShouldSetCookies { - return _objc_msgSend_13(this.pointer, _sel_HTTPShouldSetCookies); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldSetCookies); } /// setHTTPShouldSetCookies: set HTTPShouldSetCookies(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setHTTPShouldSetCookies_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldSetCookies_, value); } /// HTTPCookieAcceptPolicy NSHTTPCookieAcceptPolicy get HTTPCookieAcceptPolicy { - final _ret = _objc_msgSend_327(this.pointer, _sel_HTTPCookieAcceptPolicy); + final _ret = + _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_HTTPCookieAcceptPolicy); return NSHTTPCookieAcceptPolicy.fromValue(_ret); } /// setHTTPCookieAcceptPolicy: set HTTPCookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { - return _objc_msgSend_328( - this.pointer, _sel_setHTTPCookieAcceptPolicy_, value.value); + return _objc_msgSend_199e8fv( + this.ref.pointer, _sel_setHTTPCookieAcceptPolicy_, value.value); } /// HTTPAdditionalHeaders objc.NSDictionary? get HTTPAdditionalHeaders { - final _ret = _objc_msgSend_82(this.pointer, _sel_HTTPAdditionalHeaders); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPAdditionalHeaders); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -28763,24 +29795,26 @@ class NSURLSessionConfiguration extends objc.NSObject { /// setHTTPAdditionalHeaders: set HTTPAdditionalHeaders(objc.NSDictionary? value) { - return _objc_msgSend_187(this.pointer, _sel_setHTTPAdditionalHeaders_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setHTTPAdditionalHeaders_, value?.ref.pointer ?? ffi.nullptr); } /// HTTPMaximumConnectionsPerHost int get HTTPMaximumConnectionsPerHost { - return _objc_msgSend_123(this.pointer, _sel_HTTPMaximumConnectionsPerHost); + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_HTTPMaximumConnectionsPerHost); } /// setHTTPMaximumConnectionsPerHost: set HTTPMaximumConnectionsPerHost(int value) { - return _objc_msgSend_142( - this.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); } /// HTTPCookieStorage NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _objc_msgSend_540(this.pointer, _sel_HTTPCookieStorage); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPCookieStorage); return _ret.address == 0 ? null : NSHTTPCookieStorage.castFromPointer(_ret, @@ -28789,13 +29823,14 @@ class NSURLSessionConfiguration extends objc.NSObject { /// setHTTPCookieStorage: set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _objc_msgSend_541(this.pointer, _sel_setHTTPCookieStorage_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPCookieStorage_, + value?.ref.pointer ?? ffi.nullptr); } /// URLCredentialStorage NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _objc_msgSend_542(this.pointer, _sel_URLCredentialStorage); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCredentialStorage); return _ret.address == 0 ? null : NSURLCredentialStorage.castFromPointer(_ret, @@ -28804,13 +29839,13 @@ class NSURLSessionConfiguration extends objc.NSObject { /// setURLCredentialStorage: set URLCredentialStorage(NSURLCredentialStorage? value) { - return _objc_msgSend_543(this.pointer, _sel_setURLCredentialStorage_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURLCredentialStorage_, + value?.ref.pointer ?? ffi.nullptr); } /// URLCache NSURLCache? get URLCache { - final _ret = _objc_msgSend_544(this.pointer, _sel_URLCache); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCache); return _ret.address == 0 ? null : NSURLCache.castFromPointer(_ret, retain: true, release: true); @@ -28818,25 +29853,25 @@ class NSURLSessionConfiguration extends objc.NSObject { /// setURLCache: set URLCache(NSURLCache? value) { - return _objc_msgSend_545( - this.pointer, _sel_setURLCache_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURLCache_, value?.ref.pointer ?? ffi.nullptr); } /// shouldUseExtendedBackgroundIdleMode bool get shouldUseExtendedBackgroundIdleMode { - return _objc_msgSend_13( - this.pointer, _sel_shouldUseExtendedBackgroundIdleMode); + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_shouldUseExtendedBackgroundIdleMode); } /// setShouldUseExtendedBackgroundIdleMode: set shouldUseExtendedBackgroundIdleMode(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); } /// protocolClasses objc.NSArray? get protocolClasses { - final _ret = _objc_msgSend_86(this.pointer, _sel_protocolClasses); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_protocolClasses); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); @@ -28844,32 +29879,35 @@ class NSURLSessionConfiguration extends objc.NSObject { /// setProtocolClasses: set protocolClasses(objc.NSArray? value) { - return _objc_msgSend_546( - this.pointer, _sel_setProtocolClasses_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolClasses_, + value?.ref.pointer ?? ffi.nullptr); } /// multipathServiceType NSURLSessionMultipathServiceType get multipathServiceType { - final _ret = _objc_msgSend_547(this.pointer, _sel_multipathServiceType); + final _ret = + _objc_msgSend_zqvllq(this.ref.pointer, _sel_multipathServiceType); return NSURLSessionMultipathServiceType.fromValue(_ret); } /// setMultipathServiceType: set multipathServiceType(NSURLSessionMultipathServiceType value) { - return _objc_msgSend_548( - this.pointer, _sel_setMultipathServiceType_, value.value); + return _objc_msgSend_1ngj1qh( + this.ref.pointer, _sel_setMultipathServiceType_, value.value); } /// init NSURLSessionConfiguration init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLSessionConfiguration.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// new static NSURLSessionConfiguration new1() { - final _ret = _objc_msgSend_19(_class_NSURLSessionConfiguration, _sel_new); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_new); return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); } @@ -28877,15 +29915,15 @@ class NSURLSessionConfiguration extends objc.NSObject { /// backgroundSessionConfiguration: static NSURLSessionConfiguration backgroundSessionConfiguration_( objc.NSString identifier) { - final _ret = _objc_msgSend_535(_class_NSURLSessionConfiguration, - _sel_backgroundSessionConfiguration_, identifier.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.ref.pointer); return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); } /// allocWithZone: static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( + final _ret = _objc_msgSend_1b3ihd0( _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); @@ -28893,7 +29931,8 @@ class NSURLSessionConfiguration extends objc.NSObject { /// alloc static NSURLSessionConfiguration alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSessionConfiguration, _sel_alloc); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_alloc); return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); } @@ -28903,404 +29942,96 @@ class NSURLSessionConfiguration extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSURLSessionConfiguration, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionConfiguration, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSessionConfiguration, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSURLSessionConfiguration, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionConfiguration, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSURLSessionConfiguration, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSURLSessionConfiguration, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSURLSessionConfiguration, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( + final _ret = _objc_msgSend_1unuoxw( _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); - } -} - -late final _class_NSURLSessionConfiguration = - objc.getClass("NSURLSessionConfiguration"); -late final _sel_defaultSessionConfiguration = - objc.registerName("defaultSessionConfiguration"); -final _objc_msgSend_534 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_ephemeralSessionConfiguration = - objc.registerName("ephemeralSessionConfiguration"); -late final _sel_backgroundSessionConfigurationWithIdentifier_ = - objc.registerName("backgroundSessionConfigurationWithIdentifier:"); -final _objc_msgSend_535 = 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_identifier = objc.registerName("identifier"); -late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); -late final _sel_setRequestCachePolicy_ = - objc.registerName("setRequestCachePolicy:"); -late final _sel_timeoutIntervalForRequest = - objc.registerName("timeoutIntervalForRequest"); -late final _sel_setTimeoutIntervalForRequest_ = - objc.registerName("setTimeoutIntervalForRequest:"); -late final _sel_timeoutIntervalForResource = - objc.registerName("timeoutIntervalForResource"); -late final _sel_setTimeoutIntervalForResource_ = - objc.registerName("setTimeoutIntervalForResource:"); -late final _sel_waitsForConnectivity = - objc.registerName("waitsForConnectivity"); -late final _sel_setWaitsForConnectivity_ = - objc.registerName("setWaitsForConnectivity:"); -late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); -late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); -late final _sel_sharedContainerIdentifier = - objc.registerName("sharedContainerIdentifier"); -late final _sel_setSharedContainerIdentifier_ = - objc.registerName("setSharedContainerIdentifier:"); -late final _sel_sessionSendsLaunchEvents = - objc.registerName("sessionSendsLaunchEvents"); -late final _sel_setSessionSendsLaunchEvents_ = - objc.registerName("setSessionSendsLaunchEvents:"); -late final _sel_connectionProxyDictionary = - objc.registerName("connectionProxyDictionary"); -late final _sel_setConnectionProxyDictionary_ = - objc.registerName("setConnectionProxyDictionary:"); - -enum SSLProtocol { - kSSLProtocolUnknown(0), - kTLSProtocol1(4), - kTLSProtocol11(7), - kTLSProtocol12(8), - kDTLSProtocol1(9), - kTLSProtocol13(10), - kDTLSProtocol12(11), - kTLSProtocolMaxSupported(999), - kSSLProtocol2(1), - kSSLProtocol3(2), - kSSLProtocol3Only(3), - kTLSProtocol1Only(5), - kSSLProtocolAll(6); - - final int value; - const SSLProtocol(this.value); - - static SSLProtocol fromValue(int value) => switch (value) { - 0 => kSSLProtocolUnknown, - 4 => kTLSProtocol1, - 7 => kTLSProtocol11, - 8 => kTLSProtocol12, - 9 => kDTLSProtocol1, - 10 => kTLSProtocol13, - 11 => kDTLSProtocol12, - 999 => kTLSProtocolMaxSupported, - 1 => kSSLProtocol2, - 2 => kSSLProtocol3, - 3 => kSSLProtocol3Only, - 5 => kTLSProtocol1Only, - 6 => kSSLProtocolAll, - _ => throw ArgumentError("Unknown value for SSLProtocol: $value"), - }; -} - -late final _sel_TLSMinimumSupportedProtocol = - objc.registerName("TLSMinimumSupportedProtocol"); -final _objc_msgSend_536 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocol_ = - objc.registerName("setTLSMinimumSupportedProtocol:"); -final _objc_msgSend_537 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_TLSMaximumSupportedProtocol = - objc.registerName("TLSMaximumSupportedProtocol"); -late final _sel_setTLSMaximumSupportedProtocol_ = - objc.registerName("setTLSMaximumSupportedProtocol:"); - -enum tls_protocol_version_t { - tls_protocol_version_TLSv10(769), - tls_protocol_version_TLSv11(770), - tls_protocol_version_TLSv12(771), - tls_protocol_version_TLSv13(772), - tls_protocol_version_DTLSv10(-257), - tls_protocol_version_DTLSv12(-259); - - final int value; - const tls_protocol_version_t(this.value); - - static tls_protocol_version_t fromValue(int value) => switch (value) { - 769 => tls_protocol_version_TLSv10, - 770 => tls_protocol_version_TLSv11, - 771 => tls_protocol_version_TLSv12, - 772 => tls_protocol_version_TLSv13, - -257 => tls_protocol_version_DTLSv10, - -259 => tls_protocol_version_DTLSv12, - _ => throw ArgumentError( - "Unknown value for tls_protocol_version_t: $value"), - }; -} - -late final _sel_TLSMinimumSupportedProtocolVersion = - objc.registerName("TLSMinimumSupportedProtocolVersion"); -final _objc_msgSend_538 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Uint16 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocolVersion_ = - objc.registerName("setTLSMinimumSupportedProtocolVersion:"); -final _objc_msgSend_539 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Uint16)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_TLSMaximumSupportedProtocolVersion = - objc.registerName("TLSMaximumSupportedProtocolVersion"); -late final _sel_setTLSMaximumSupportedProtocolVersion_ = - objc.registerName("setTLSMaximumSupportedProtocolVersion:"); -late final _sel_HTTPShouldSetCookies = - objc.registerName("HTTPShouldSetCookies"); -late final _sel_setHTTPShouldSetCookies_ = - objc.registerName("setHTTPShouldSetCookies:"); -late final _sel_HTTPCookieAcceptPolicy = - objc.registerName("HTTPCookieAcceptPolicy"); -late final _sel_setHTTPCookieAcceptPolicy_ = - objc.registerName("setHTTPCookieAcceptPolicy:"); -late final _sel_HTTPAdditionalHeaders = - objc.registerName("HTTPAdditionalHeaders"); -late final _sel_setHTTPAdditionalHeaders_ = - objc.registerName("setHTTPAdditionalHeaders:"); -late final _sel_HTTPMaximumConnectionsPerHost = - objc.registerName("HTTPMaximumConnectionsPerHost"); -late final _sel_setHTTPMaximumConnectionsPerHost_ = - objc.registerName("setHTTPMaximumConnectionsPerHost:"); -late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); -final _objc_msgSend_540 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setHTTPCookieStorage_ = - objc.registerName("setHTTPCookieStorage:"); -final _objc_msgSend_541 = 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_URLCredentialStorage = - objc.registerName("URLCredentialStorage"); -final _objc_msgSend_542 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setURLCredentialStorage_ = - objc.registerName("setURLCredentialStorage:"); -final _objc_msgSend_543 = 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_URLCache = objc.registerName("URLCache"); -final _objc_msgSend_544 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setURLCache_ = objc.registerName("setURLCache:"); -final _objc_msgSend_545 = 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_shouldUseExtendedBackgroundIdleMode = - objc.registerName("shouldUseExtendedBackgroundIdleMode"); -late final _sel_setShouldUseExtendedBackgroundIdleMode_ = - objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); -late final _sel_protocolClasses = objc.registerName("protocolClasses"); -late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); -final _objc_msgSend_546 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + } -enum NSURLSessionMultipathServiceType { - NSURLSessionMultipathServiceTypeNone(0), - NSURLSessionMultipathServiceTypeHandover(1), - NSURLSessionMultipathServiceTypeInteractive(2), - NSURLSessionMultipathServiceTypeAggregate(3); + /// self + NSURLSessionConfiguration self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSURLSessionMultipathServiceType(this.value); + /// retain + NSURLSessionConfiguration retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } - static NSURLSessionMultipathServiceType fromValue(int value) => - switch (value) { - 0 => NSURLSessionMultipathServiceTypeNone, - 1 => NSURLSessionMultipathServiceTypeHandover, - 2 => NSURLSessionMultipathServiceTypeInteractive, - 3 => NSURLSessionMultipathServiceTypeAggregate, - _ => throw ArgumentError( - "Unknown value for NSURLSessionMultipathServiceType: $value"), - }; + /// autorelease + NSURLSessionConfiguration autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } } -late final _sel_multipathServiceType = - objc.registerName("multipathServiceType"); -final _objc_msgSend_547 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setMultipathServiceType_ = - objc.registerName("setMultipathServiceType:"); -final _objc_msgSend_548 = 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_backgroundSessionConfiguration_ = - objc.registerName("backgroundSessionConfiguration:"); late final _sel_sessionWithConfiguration_ = objc.registerName("sessionWithConfiguration:"); -final _objc_msgSend_549 = 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_sessionWithConfiguration_delegate_delegateQueue_ = objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); -final _objc_msgSend_550 = 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_delegateQueue = objc.registerName("delegateQueue"); late final _sel_configuration = objc.registerName("configuration"); late final _sel_sessionDescription = objc.registerName("sessionDescription"); @@ -29314,7 +30045,7 @@ late final _sel_resetWithCompletionHandler_ = late final _sel_flushWithCompletionHandler_ = objc.registerName("flushWithCompletionHandler:"); void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -29330,8 +30061,17 @@ void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -29339,69 +30079,92 @@ void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerTrampoline( + 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); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray_NSArray_NSArray castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._(pointer, - retain: retain, release: release); - } + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSArray, objc.NSArray, + objc.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_NSArray_NSArray.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_NSArray_NSArray_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction( - void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - objc.NSArray.castFromPointer(arg0, retain: true, release: true), - objc.NSArray.castFromPointer(arg1, retain: true, release: true), - objc.NSArray.castFromPointer(arg2, retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, retain: true, release: true), + objc.NSArray.castFromPointer(arg1, retain: true, release: true), + objc.NSArray.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -29412,382 +30175,261 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener( - void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray(objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - objc.NSArray.castFromPointer(arg0, - retain: false, release: true), - objc.NSArray.castFromPointer(arg1, retain: false, release: true), - objc.NSArray.castFromPointer(arg2, retain: false, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static objc + .ObjCBlock + listener(void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, + retain: false, release: true), + objc.NSArray.castFromPointer(arg1, + retain: false, release: true), + objc.NSArray.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tenbla(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSArray, objc.NSArray, + objc.NSArray)>(wrapper, retain: false, release: true); + } +} +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_CallExtension on objc + .ObjCBlock { void call(objc.NSArray arg0, objc.NSArray arg1, objc.NSArray arg2) => - pointer.ref.invoke + ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2.pointer); + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); } late final _sel_getTasksWithCompletionHandler_ = objc.registerName("getTasksWithCompletionHandler:"); -final _objc_msgSend_551 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray1_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSArray1 extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray1._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSArray1_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSArray1 { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray1 castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSArray1._(pointer, - retain: retain, release: release); - } + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(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_NSArray1.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_NSArray1_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_NSArray1.fromFunction(void Function(objc.NSArray) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - .cast(), - (ffi.Pointer arg0) => fn( - 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_NSArray1.listener(void Function(objc.NSArray) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSArray1( - objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0) => fn( - 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); -} - -late final _sel_getAllTasksWithCompletionHandler_ = - objc.registerName("getAllTasksWithCompletionHandler:"); -final _objc_msgSend_552 = 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_dataTaskWithRequest_ = - objc.registerName("dataTaskWithRequest:"); -final _objc_msgSend_553 = 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_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); -final _objc_msgSend_554 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -/// NSURLSessionUploadTask -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. - NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); - } - - /// init - NSURLSessionUploadTask init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); - } - - /// new - static NSURLSessionUploadTask new1() { - final _ret = _objc_msgSend_19(_class_NSURLSessionUploadTask, _sel_new); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// cancelByProducingResumeData: - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _objc_msgSend_555(this.pointer, _sel_cancelByProducingResumeData_, - completionHandler.pointer); - } - - /// allocWithZone: - static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSURLSessionUploadTask alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSessionUploadTask, _sel_alloc); - return NSURLSessionUploadTask.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_NSURLSessionUploadTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionUploadTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); - } - - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSURLSessionUploadTask, _sel_useStoredAccessor); - } - - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionUploadTask, - _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_NSURLSessionUploadTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLSessionUploadTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSArray1_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray1_closureCallable, + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(objc.NSArray) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray1_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSArray1_CallExtension + on objc.ObjCBlock { + void call(objc.NSArray arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); +} + +late final _sel_getAllTasksWithCompletionHandler_ = + objc.registerName("getAllTasksWithCompletionHandler:"); +late final _sel_dataTaskWithRequest_ = + objc.registerName("dataTaskWithRequest:"); +late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); late final _class_NSURLSessionUploadTask = objc.getClass("NSURLSessionUploadTask"); void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSData_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSData extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSData._(pointer, - retain: retain, release: release); - } + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(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_NSData.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_NSData_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData.fromFunction(void Function(objc.NSData?) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - .cast(), - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, - retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -29798,156 +30440,93 @@ class ObjCBlock_ffiVoid_NSData extends objc.ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData.listener(void Function(objc.NSData?) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSData(objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, - retain: false, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; + static objc.ObjCBlock listener( + void Function(objc.NSData?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - void call(objc.NSData? arg0) => pointer.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_CallExtension + on objc.ObjCBlock { + void call(objc.NSData? arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, + ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } late final _sel_cancelByProducingResumeData_ = objc.registerName("cancelByProducingResumeData:"); -final _objc_msgSend_555 = 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_uploadTaskWithRequest_fromFile_ = - objc.registerName("uploadTaskWithRequest:fromFile:"); -final _objc_msgSend_556 = 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_uploadTaskWithRequest_fromData_ = - objc.registerName("uploadTaskWithRequest:fromData:"); -final _objc_msgSend_557 = 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_uploadTaskWithResumeData_ = - objc.registerName("uploadTaskWithResumeData:"); -final _objc_msgSend_558 = 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_uploadTaskWithStreamedRequest_ = - objc.registerName("uploadTaskWithStreamedRequest:"); -final _objc_msgSend_559 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -/// NSURLSessionDownloadTask -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._(ffi.Pointer pointer, +/// NSURLSessionUploadTask +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, + /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. + NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); - } - - /// cancelByProducingResumeData: - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _objc_msgSend_555(this.pointer, _sel_cancelByProducingResumeData_, - completionHandler.pointer); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); } /// init - NSURLSessionDownloadTask init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + NSURLSessionUploadTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSURLSessionDownloadTask new1() { - final _ret = _objc_msgSend_19(_class_NSURLSessionDownloadTask, _sel_new); - return NSURLSessionDownloadTask.castFromPointer(_ret, + static NSURLSessionUploadTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_new); + return NSURLSessionUploadTask.castFromPointer(_ret, retain: false, release: true); } + /// cancelByProducingResumeData: + void cancelByProducingResumeData_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, + completionHandler.ref.pointer); + } + /// allocWithZone: - static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); - return NSURLSessionDownloadTask.castFromPointer(_ret, + static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); + return NSURLSessionUploadTask.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSURLSessionDownloadTask alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSessionDownloadTask, _sel_alloc); - return NSURLSessionDownloadTask.castFromPointer(_ret, + static NSURLSessionUploadTask alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_alloc); + return NSURLSessionUploadTask.castFromPointer(_ret, retain: false, release: true); } @@ -29956,204 +30535,160 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLSessionDownloadTask, + _objc_msgSend_cqxsqq( + _class_NSURLSessionUploadTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionDownloadTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSessionUploadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSURLSessionUploadTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionDownloadTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionUploadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSURLSessionDownloadTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSURLSessionUploadTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLSessionDownloadTask, + _objc_msgSend_1tjlcwl( + _class_NSURLSessionUploadTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_NSURLSessionDownloadTask = - objc.getClass("NSURLSessionDownloadTask"); -late final _sel_downloadTaskWithRequest_ = - objc.registerName("downloadTaskWithRequest:"); -final _objc_msgSend_560 = 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_downloadTaskWithURL_ = - objc.registerName("downloadTaskWithURL:"); -final _objc_msgSend_561 = 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_downloadTaskWithResumeData_ = - objc.registerName("downloadTaskWithResumeData:"); -final _objc_msgSend_562 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -/// NSURLSessionStreamTask -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [NSURLSessionStreamTask] that wraps the given raw object pointer. - NSURLSessionStreamTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); + /// self + NSURLSessionUploadTask self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// readDataOfMinLength:maxLength:timeout:completionHandler: - void readDataOfMinLength_maxLength_timeout_completionHandler_( - int minBytes, - int maxBytes, - double timeout, - ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { - _objc_msgSend_563( - this.pointer, - _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, - minBytes, - maxBytes, - timeout, - completionHandler.pointer); + /// retain + NSURLSessionUploadTask retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// writeData:timeout:completionHandler: - void writeData_timeout_completionHandler_(objc.NSData data, double timeout, - ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_564(this.pointer, _sel_writeData_timeout_completionHandler_, - data.pointer, timeout, completionHandler.pointer); + /// autorelease + NSURLSessionUploadTask autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } +} + +late final _sel_uploadTaskWithRequest_fromFile_ = + objc.registerName("uploadTaskWithRequest:fromFile:"); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); - /// captureStreams - void captureStreams() { - _objc_msgSend_7(this.pointer, _sel_captureStreams); - } +/// NSURLSessionDownloadTask +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// closeWrite - void closeWrite() { - _objc_msgSend_7(this.pointer, _sel_closeWrite); - } + /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// closeRead - void closeRead() { - _objc_msgSend_7(this.pointer, _sel_closeRead); - } + /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// startSecureConnection - void startSecureConnection() { - _objc_msgSend_7(this.pointer, _sel_startSecureConnection); + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } - /// stopSecureConnection - void stopSecureConnection() { - _objc_msgSend_7(this.pointer, _sel_stopSecureConnection); + /// cancelByProducingResumeData: + void cancelByProducingResumeData_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, + completionHandler.ref.pointer); } /// init - NSURLSessionStreamTask init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLSessionStreamTask.castFromPointer(_ret, - retain: true, release: true); + NSURLSessionDownloadTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSURLSessionStreamTask new1() { - final _ret = _objc_msgSend_19(_class_NSURLSessionStreamTask, _sel_new); - return NSURLSessionStreamTask.castFromPointer(_ret, + static NSURLSessionDownloadTask new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_new); + return NSURLSessionDownloadTask.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); - return NSURLSessionStreamTask.castFromPointer(_ret, + static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); + return NSURLSessionDownloadTask.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSURLSessionStreamTask alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSessionStreamTask, _sel_alloc); - return NSURLSessionStreamTask.castFromPointer(_ret, + static NSURLSessionDownloadTask alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_alloc); + return NSURLSessionDownloadTask.castFromPointer(_ret, retain: false, release: true); } @@ -30162,75 +30697,102 @@ class NSURLSessionStreamTask extends NSURLSessionTask { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLSessionStreamTask, + _objc_msgSend_cqxsqq( + _class_NSURLSessionDownloadTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionStreamTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSURLSessionStreamTask, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionStreamTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionDownloadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSURLSessionStreamTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSURLSessionDownloadTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLSessionStreamTask, + _objc_msgSend_1tjlcwl( + _class_NSURLSessionDownloadTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLSessionDownloadTask self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSURLSessionDownloadTask retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSURLSessionDownloadTask autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } } +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +late final _sel_downloadTaskWithURL_ = + objc.registerName("downloadTaskWithURL:"); +late final _sel_downloadTaskWithResumeData_ = + objc.registerName("downloadTaskWithResumeData:"); late final _class_NSURLSessionStreamTask = objc.getClass("NSURLSessionStreamTask"); void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => @@ -30242,72 +30804,101 @@ void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( .asFunction< void Function(ffi.Pointer, bool, ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => (objc.getBlockClosure(block) as void Function(ffi.Pointer, bool, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_bool_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_bool_NSError { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_bool_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSData_bool_NSError._(pointer, - retain: retain, release: release); - } + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSData, ffi.Bool, + objc.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_NSData_bool_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newPointerBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction( - void Function(objc.NSData, bool, objc.NSError?) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - .cast(), - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - objc.NSData.castFromPointer(arg0, retain: true, release: true), - arg1, - arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock + fromFunction(void Function(objc.NSData, bool, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable, + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -30318,322 +30909,197 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_bool_NSError.listener( - void Function(objc.NSData, bool, objc.NSError?) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSData_bool_NSError( - objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(objc.NSData.castFromPointer(arg0, retain: false, release: true), arg1, arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: false, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1, arg2?.pointer ?? ffi.nullptr); -} - -late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc - .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); -final _objc_msgSend_563 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Double, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - double, - ffi.Pointer)>(); -late final _sel_writeData_timeout_completionHandler_ = - objc.registerName("writeData:timeout:completionHandler:"); -final _objc_msgSend_564 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); -late final _sel_captureStreams = objc.registerName("captureStreams"); -late final _sel_closeWrite = objc.registerName("closeWrite"); -late final _sel_closeRead = objc.registerName("closeRead"); -late final _sel_startSecureConnection = - objc.registerName("startSecureConnection"); -late final _sel_stopSecureConnection = - objc.registerName("stopSecureConnection"); -late final _sel_streamTaskWithHostName_port_ = - objc.registerName("streamTaskWithHostName:port:"); -final _objc_msgSend_565 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - -/// NSNetService -class NSNetService extends objc.NSObject { - NSNetService._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSNetService] that points to the same underlying object as [other]. - NSNetService.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [NSNetService] that wraps the given raw object pointer. - NSNetService.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSNetService]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNetService); - } - - /// initWithDomain:type:name:port: - NSNetService initWithDomain_type_name_port_( - objc.NSString domain, objc.NSString type, objc.NSString name, int port) { - final _ret = _objc_msgSend_566( - this.pointer, - _sel_initWithDomain_type_name_port_, - domain.pointer, - type.pointer, - name.pointer, - port); - return NSNetService.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithDomain:type:name: - NSNetService initWithDomain_type_name_( - objc.NSString domain, objc.NSString type, objc.NSString name) { - final _ret = _objc_msgSend_567(this.pointer, _sel_initWithDomain_type_name_, - domain.pointer, type.pointer, name.pointer); - return NSNetService.castFromPointer(_ret, retain: true, release: true); - } - - /// scheduleInRunLoop:forMode: - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { - _objc_msgSend_227(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); - } - - /// removeFromRunLoop:forMode: - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { - _objc_msgSend_227(this.pointer, _sel_removeFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); - } - - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(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_200( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - /// includesPeerToPeer - bool get includesPeerToPeer { - return _objc_msgSend_13(this.pointer, _sel_includesPeerToPeer); - } - - /// setIncludesPeerToPeer: - set includesPeerToPeer(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setIncludesPeerToPeer_, value); - } - - /// name - objc.NSString get name { - final _ret = _objc_msgSend_11(this.pointer, _sel_name); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// type - objc.NSString get type { - final _ret = _objc_msgSend_11(this.pointer, _sel_type); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// domain - objc.NSString get domain { - final _ret = _objc_msgSend_11(this.pointer, _sel_domain); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// hostName - objc.NSString? get hostName { - final _ret = _objc_msgSend_20(this.pointer, _sel_hostName); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// addresses - objc.NSArray? get addresses { - final _ret = _objc_msgSend_86(this.pointer, _sel_addresses); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + static objc.ObjCBlock + listener(void Function(objc.NSData, bool, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + objc.NSData.castFromPointer(arg0, retain: false, release: true), + arg1, + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_hfhq9m(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSData, ffi.Bool, objc.NSError?)>(wrapper, + retain: false, release: true); } +} - /// port - int get port { - return _objc_msgSend_123(this.pointer, _sel_port); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_bool_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1, arg2?.ref.pointer ?? ffi.nullptr); +} - /// publish - void publish() { - _objc_msgSend_7(this.pointer, _sel_publish); - } +late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc + .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); +final _objc_msgSend_15i4521 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + double, + ffi.Pointer)>(); +late final _sel_writeData_timeout_completionHandler_ = + objc.registerName("writeData:timeout:completionHandler:"); +final _objc_msgSend_5qmwfe = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_captureStreams = objc.registerName("captureStreams"); +late final _sel_closeWrite = objc.registerName("closeWrite"); +late final _sel_closeRead = objc.registerName("closeRead"); +late final _sel_startSecureConnection = + objc.registerName("startSecureConnection"); +late final _sel_stopSecureConnection = + objc.registerName("stopSecureConnection"); - /// publishWithOptions: - void publishWithOptions_(NSNetServiceOptions options) { - _objc_msgSend_568(this.pointer, _sel_publishWithOptions_, options.value); - } +/// NSURLSessionStreamTask +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// resolve - void resolve() { - _objc_msgSend_7(this.pointer, _sel_resolve); - } + /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// stop - void stop() { - _objc_msgSend_7(this.pointer, _sel_stop); - } + /// Constructs a [NSURLSessionStreamTask] that wraps the given raw object pointer. + NSURLSessionStreamTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// dictionaryFromTXTRecordData: - static objc.NSDictionary dictionaryFromTXTRecordData_(objc.NSData txtData) { - final _ret = _objc_msgSend_569(_class_NSNetService, - _sel_dictionaryFromTXTRecordData_, txtData.pointer); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); } - /// dataFromTXTRecordDictionary: - static objc.NSData dataFromTXTRecordDictionary_( - objc.NSDictionary txtDictionary) { - final _ret = _objc_msgSend_570(_class_NSNetService, - _sel_dataFromTXTRecordDictionary_, txtDictionary.pointer); - return objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// readDataOfMinLength:maxLength:timeout:completionHandler: + void readDataOfMinLength_maxLength_timeout_completionHandler_( + int minBytes, + int maxBytes, + double timeout, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_15i4521( + this.ref.pointer, + _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, + minBytes, + maxBytes, + timeout, + completionHandler.ref.pointer); } - /// resolveWithTimeout: - void resolveWithTimeout_(double timeout) { - _objc_msgSend_571(this.pointer, _sel_resolveWithTimeout_, timeout); + /// writeData:timeout:completionHandler: + void writeData_timeout_completionHandler_(objc.NSData data, double timeout, + objc.ObjCBlock completionHandler) { + _objc_msgSend_5qmwfe( + this.ref.pointer, + _sel_writeData_timeout_completionHandler_, + data.ref.pointer, + timeout, + completionHandler.ref.pointer); } - /// getInputStream:outputStream: - bool getInputStream_outputStream_( - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _objc_msgSend_572(this.pointer, _sel_getInputStream_outputStream_, - inputStream, outputStream); + /// captureStreams + void captureStreams() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_captureStreams); } - /// setTXTRecordData: - bool setTXTRecordData_(objc.NSData? recordData) { - return _objc_msgSend_573(this.pointer, _sel_setTXTRecordData_, - recordData?.pointer ?? ffi.nullptr); + /// closeWrite + void closeWrite() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeWrite); } - /// TXTRecordData - objc.NSData? TXTRecordData() { - final _ret = _objc_msgSend_334(this.pointer, _sel_TXTRecordData); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// closeRead + void closeRead() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeRead); } - /// startMonitoring - void startMonitoring() { - _objc_msgSend_7(this.pointer, _sel_startMonitoring); + /// startSecureConnection + void startSecureConnection() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_startSecureConnection); } - /// stopMonitoring - void stopMonitoring() { - _objc_msgSend_7(this.pointer, _sel_stopMonitoring); + /// stopSecureConnection + void stopSecureConnection() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopSecureConnection); } /// init - NSNetService init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSNetService.castFromPointer(_ret, retain: true, release: true); + NSURLSessionStreamTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSNetService new1() { - final _ret = _objc_msgSend_19(_class_NSNetService, _sel_new); - return NSNetService.castFromPointer(_ret, retain: false, release: true); + static NSURLSessionStreamTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_new); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: - static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSNetService, _sel_allocWithZone_, zone); - return NSNetService.castFromPointer(_ret, retain: false, release: true); + static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } /// alloc - static NSNetService alloc() { - final _ret = _objc_msgSend_19(_class_NSNetService, _sel_alloc); - return NSNetService.castFromPointer(_ret, retain: false, release: true); + static NSURLSessionStreamTask alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_alloc); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -30641,94 +31107,112 @@ class NSNetService extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSNetService, + _objc_msgSend_cqxsqq( + _class_NSURLSessionStreamTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSNetService, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSessionStreamTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSNetService, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSNetService, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSURLSessionStreamTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSNetService, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionStreamTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSNetService, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSURLSessionStreamTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSNetService, + _objc_msgSend_1tjlcwl( + _class_NSURLSessionStreamTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSNetService, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSNetService, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLSessionStreamTask self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSURLSessionStreamTask retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSURLSessionStreamTask autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } } -late final _class_NSNetService = objc.getClass("NSNetService"); -late final _sel_initWithDomain_type_name_port_ = - objc.registerName("initWithDomain:type:name:port:"); -final _objc_msgSend_566 = objc.msgSendPointer +late final _sel_streamTaskWithHostName_port_ = + objc.registerName("streamTaskWithHostName:port:"); +final _objc_msgSend_spwp90 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>() + ffi.Long)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_initWithDomain_type_name_ = - objc.registerName("initWithDomain:type:name:"); -final _objc_msgSend_567 = objc.msgSendPointer +late final _class_NSNetService = objc.getClass("NSNetService"); +late final _sel_initWithDomain_type_name_port_ = + objc.registerName("initWithDomain:type:name:port:"); +final _objc_msgSend_1vcjoth = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -30736,18 +31220,23 @@ final _objc_msgSend_567 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + int)>(); +late final _sel_initWithDomain_type_name_ = + objc.registerName("initWithDomain:type:name:"); late final _sel_includesPeerToPeer = objc.registerName("includesPeerToPeer"); late final _sel_setIncludesPeerToPeer_ = objc.registerName("setIncludesPeerToPeer:"); late final _sel_type = objc.registerName("type"); +late final _sel_addresses = objc.registerName("addresses"); enum NSNetServiceOptions { NSNetServiceNoAutoRename(1), @@ -30765,7 +31254,7 @@ enum NSNetServiceOptions { } late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); -final _objc_msgSend_568 = objc.msgSendPointer +final _objc_msgSend_hj2tkj = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -30777,181 +31266,249 @@ late final _sel_resolve = objc.registerName("resolve"); late final _sel_stop = objc.registerName("stop"); late final _sel_dictionaryFromTXTRecordData_ = objc.registerName("dictionaryFromTXTRecordData:"); -final _objc_msgSend_569 = 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_dataFromTXTRecordDictionary_ = objc.registerName("dataFromTXTRecordDictionary:"); -final _objc_msgSend_570 = 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_resolveWithTimeout_ = objc.registerName("resolveWithTimeout:"); -final _objc_msgSend_571 = 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_getInputStream_outputStream_ = - objc.registerName("getInputStream:outputStream:"); -final _objc_msgSend_572 = 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_setTXTRecordData_ = objc.registerName("setTXTRecordData:"); -final _objc_msgSend_573 = 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_TXTRecordData = objc.registerName("TXTRecordData"); -late final _sel_startMonitoring = objc.registerName("startMonitoring"); -late final _sel_stopMonitoring = objc.registerName("stopMonitoring"); -late final _sel_streamTaskWithNetService_ = - objc.registerName("streamTaskWithNetService:"); -final _objc_msgSend_574 = objc.msgSendPointer +late final _sel_resolveWithTimeout_ = objc.registerName("resolveWithTimeout:"); +late final _sel_getInputStream_outputStream_ = + objc.registerName("getInputStream:outputStream:"); +final _objc_msgSend_1xn13sz = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer>, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_setTXTRecordData_ = objc.registerName("setTXTRecordData:"); +late final _sel_TXTRecordData = objc.registerName("TXTRecordData"); +late final _sel_startMonitoring = objc.registerName("startMonitoring"); +late final _sel_stopMonitoring = objc.registerName("stopMonitoring"); -/// NSURLSessionWebSocketTask -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._(ffi.Pointer pointer, +/// NSNetService +class NSNetService extends objc.NSObject { + NSNetService._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSNetService] that points to the same underlying object as [other]. + NSNetService.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, + /// Constructs a [NSNetService] that wraps the given raw object pointer. + NSNetService.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + /// Returns whether [obj] is an instance of [NSNetService]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSNetService); } - /// sendMessage:completionHandler: - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, - ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_576(this.pointer, _sel_sendMessage_completionHandler_, - message.pointer, completionHandler.pointer); + /// initWithDomain:type:name:port: + NSNetService initWithDomain_type_name_port_( + objc.NSString domain, objc.NSString type, objc.NSString name, int port) { + final _ret = _objc_msgSend_1vcjoth( + this.ref.retainAndReturnPointer(), + _sel_initWithDomain_type_name_port_, + domain.ref.pointer, + type.ref.pointer, + name.ref.pointer, + port); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - /// receiveMessageWithCompletionHandler: - void receiveMessageWithCompletionHandler_( - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - completionHandler) { - _objc_msgSend_577(this.pointer, _sel_receiveMessageWithCompletionHandler_, - completionHandler.pointer); + /// initWithDomain:type:name: + NSNetService initWithDomain_type_name_( + objc.NSString domain, objc.NSString type, objc.NSString name) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithDomain_type_name_, + domain.ref.pointer, + type.ref.pointer, + name.ref.pointer); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - /// sendPingWithPongReceiveHandler: - void sendPingWithPongReceiveHandler_( - ObjCBlock_ffiVoid_NSError pongReceiveHandler) { - _objc_msgSend_578(this.pointer, _sel_sendPingWithPongReceiveHandler_, - pongReceiveHandler.pointer); + /// scheduleInRunLoop:forMode: + void scheduleInRunLoop_forMode_(objc.NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } - /// cancelWithCloseCode:reason: - void cancelWithCloseCode_reason_( - NSURLSessionWebSocketCloseCode closeCode, objc.NSData? reason) { - _objc_msgSend_579(this.pointer, _sel_cancelWithCloseCode_reason_, - closeCode.value, reason?.pointer ?? ffi.nullptr); + /// removeFromRunLoop:forMode: + void removeFromRunLoop_forMode_(objc.NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } - /// maximumMessageSize - int get maximumMessageSize { - return _objc_msgSend_123(this.pointer, _sel_maximumMessageSize); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// setMaximumMessageSize: - set maximumMessageSize(int value) { - return _objc_msgSend_142(this.pointer, _sel_setMaximumMessageSize_, value); + /// setDelegate: + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } - /// closeCode - NSURLSessionWebSocketCloseCode get closeCode { - final _ret = _objc_msgSend_580(this.pointer, _sel_closeCode); - return NSURLSessionWebSocketCloseCode.fromValue(_ret); + /// includesPeerToPeer + bool get includesPeerToPeer { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_includesPeerToPeer); } - /// closeReason - objc.NSData? get closeReason { - final _ret = _objc_msgSend_334(this.pointer, _sel_closeReason); + /// setIncludesPeerToPeer: + set includesPeerToPeer(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setIncludesPeerToPeer_, value); + } + + /// name + objc.NSString get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// type + objc.NSString get type { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_type); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// domain + objc.NSString get domain { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// hostName + objc.NSString? get hostName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_hostName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// addresses + objc.NSArray? get addresses { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_addresses); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// port + int get port { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_port); + } + + /// publish + void publish() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); + } + + /// publishWithOptions: + void publishWithOptions_(NSNetServiceOptions options) { + _objc_msgSend_hj2tkj( + this.ref.pointer, _sel_publishWithOptions_, options.value); + } + + /// resolve + void resolve() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resolve); + } + + /// stop + void stop() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stop); + } + + /// dictionaryFromTXTRecordData: + static objc.NSDictionary dictionaryFromTXTRecordData_(objc.NSData txtData) { + final _ret = _objc_msgSend_juohf7(_class_NSNetService, + _sel_dictionaryFromTXTRecordData_, txtData.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + /// dataFromTXTRecordDictionary: + static objc.NSData dataFromTXTRecordDictionary_( + objc.NSDictionary txtDictionary) { + final _ret = _objc_msgSend_juohf7(_class_NSNetService, + _sel_dataFromTXTRecordDictionary_, txtDictionary.ref.pointer); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + /// resolveWithTimeout: + void resolveWithTimeout_(double timeout) { + _objc_msgSend_suh039(this.ref.pointer, _sel_resolveWithTimeout_, timeout); + } + + /// getInputStream:outputStream: + bool getInputStream_outputStream_( + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _objc_msgSend_1xn13sz(this.ref.pointer, + _sel_getInputStream_outputStream_, inputStream, outputStream); + } + + /// setTXTRecordData: + bool setTXTRecordData_(objc.NSData? recordData) { + return _objc_msgSend_l8lotg(this.ref.pointer, _sel_setTXTRecordData_, + recordData?.ref.pointer ?? ffi.nullptr); + } + + /// TXTRecordData + objc.NSData? TXTRecordData() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_TXTRecordData); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); } + /// startMonitoring + void startMonitoring() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_startMonitoring); + } + + /// stopMonitoring + void stopMonitoring() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopMonitoring); + } + /// init - NSURLSessionWebSocketTask init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: true, release: true); + NSNetService init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } /// new - static NSURLSessionWebSocketTask new1() { - final _ret = _objc_msgSend_19(_class_NSURLSessionWebSocketTask, _sel_new); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: false, release: true); + static NSNetService new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSNetService, _sel_new); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: false, release: true); + static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSNetService, _sel_allocWithZone_, zone); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSURLSessionWebSocketTask alloc() { - final _ret = _objc_msgSend_19(_class_NSURLSessionWebSocketTask, _sel_alloc); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: false, release: true); + static NSNetService alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSNetService, _sel_alloc); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -30959,73 +31516,119 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSURLSessionWebSocketTask, + _objc_msgSend_cqxsqq( + _class_NSNetService, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionWebSocketTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSNetService, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSNetService, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionWebSocketTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSNetService, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSURLSessionWebSocketTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSNetService, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSURLSessionWebSocketTask, + _objc_msgSend_1tjlcwl( + _class_NSNetService, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSNetService, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSNetService, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSNetService self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSNetService.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSNetService retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSNetService.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSNetService autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSNetService.castFromPointer(_ret, retain: true, release: true); + } } +late final _sel_streamTaskWithNetService_ = + objc.registerName("streamTaskWithNetService:"); late final _class_NSURLSessionWebSocketTask = objc.getClass("NSURLSessionWebSocketTask"); +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); + +enum NSURLSessionWebSocketMessageType { + NSURLSessionWebSocketMessageTypeData(0), + NSURLSessionWebSocketMessageTypeString(1); + + final int value; + const NSURLSessionWebSocketMessageType(this.value); + + static NSURLSessionWebSocketMessageType fromValue(int value) => + switch (value) { + 0 => NSURLSessionWebSocketMessageTypeData, + 1 => NSURLSessionWebSocketMessageTypeString, + _ => throw ArgumentError( + "Unknown value for NSURLSessionWebSocketMessageType: $value"), + }; +} + +final _objc_msgSend_1kew1r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); /// NSURLSessionWebSocketMessage class NSURLSessionWebSocketMessage extends objc.NSObject { @@ -31035,7 +31638,7 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. NSURLSessionWebSocketMessage.castFromPointer( @@ -31046,35 +31649,35 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSURLSessionWebSocketMessage); } /// initWithData: NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { - final _ret = - _objc_msgSend_337(this.pointer, _sel_initWithData_, data.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithData_, data.ref.pointer); return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// initWithString: NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { - final _ret = - _objc_msgSend_63(this.pointer, _sel_initWithString_, string.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, string.ref.pointer); return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// type NSURLSessionWebSocketMessageType get type { - final _ret = _objc_msgSend_575(this.pointer, _sel_type); + final _ret = _objc_msgSend_1kew1r(this.ref.pointer, _sel_type); return NSURLSessionWebSocketMessageType.fromValue(_ret); } /// data objc.NSData? get data { - final _ret = _objc_msgSend_334(this.pointer, _sel_data); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); @@ -31082,7 +31685,7 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { /// string objc.NSString? get string { - final _ret = _objc_msgSend_20(this.pointer, _sel_string); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_string); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -31090,15 +31693,16 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { /// init NSURLSessionWebSocketMessage init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } /// new static NSURLSessionWebSocketMessage new1() { final _ret = - _objc_msgSend_19(_class_NSURLSessionWebSocketMessage, _sel_new); + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_new); return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } @@ -31106,7 +31710,7 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { /// allocWithZone: static NSURLSessionWebSocketMessage allocWithZone_( ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( + final _ret = _objc_msgSend_1b3ihd0( _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); @@ -31115,7 +31719,7 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { /// alloc static NSURLSessionWebSocketMessage alloc() { final _ret = - _objc_msgSend_19(_class_NSURLSessionWebSocketMessage, _sel_alloc); + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_alloc); return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } @@ -31125,116 +31729,96 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_NSURLSessionWebSocketMessage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSURLSessionWebSocketMessage, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSessionWebSocketMessage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13(_class_NSURLSessionWebSocketMessage, + return _objc_msgSend_olxnu1(_class_NSURLSessionWebSocketMessage, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSURLSessionWebSocketMessage, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionWebSocketMessage, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSURLSessionWebSocketMessage, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSURLSessionWebSocketMessage, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_NSURLSessionWebSocketMessage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33(_class_NSURLSessionWebSocketMessage, + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( + final _ret = _objc_msgSend_1unuoxw( _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_NSURLSessionWebSocketMessage = - objc.getClass("NSURLSessionWebSocketMessage"); -enum NSURLSessionWebSocketMessageType { - NSURLSessionWebSocketMessageTypeData(0), - NSURLSessionWebSocketMessageTypeString(1); + /// self + NSURLSessionWebSocketMessage self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSURLSessionWebSocketMessageType(this.value); + /// retain + NSURLSessionWebSocketMessage retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); + } - static NSURLSessionWebSocketMessageType fromValue(int value) => - switch (value) { - 0 => NSURLSessionWebSocketMessageTypeData, - 1 => NSURLSessionWebSocketMessageTypeString, - _ => throw ArgumentError( - "Unknown value for NSURLSessionWebSocketMessageType: $value"), - }; + /// autorelease + NSURLSessionWebSocketMessage autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); + } } -final _objc_msgSend_575 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); late final _sel_sendMessage_completionHandler_ = objc.registerName("sendMessage:completionHandler:"); -final _objc_msgSend_576 = 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_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => block.ref.target @@ -31245,73 +31829,95 @@ void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => (objc.getBlockClosure(block) as void Function(ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._(pointer, - retain: retain, release: release); - } + static objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, + objc.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_NSURLSessionWebSocketMessage_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_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( - void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURLSessionWebSocketMessage.castFromPointer(arg0, retain: true, release: true), - arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock fromFunction( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -31322,65 +31928,56 @@ class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( - void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError(objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + static objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + listener(void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( arg0.address == 0 ? null : NSURLSessionWebSocketMessage.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; + : objc.NSError.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1tjlcwl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_CallExtension + on objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> { void call(NSURLSessionWebSocketMessage? arg0, objc.NSError? arg1) => - pointer.ref.invoke + ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); + ffi.Pointer)>()(ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); } late final _sel_receiveMessageWithCompletionHandler_ = objc.registerName("receiveMessageWithCompletionHandler:"); -final _objc_msgSend_577 = 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_sendPingWithPongReceiveHandler_ = objc.registerName("sendPingWithPongReceiveHandler:"); -final _objc_msgSend_578 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); enum NSURLSessionWebSocketCloseCode { NSURLSessionWebSocketCloseCodeInvalid(0), @@ -31421,7 +32018,7 @@ enum NSURLSessionWebSocketCloseCode { late final _sel_cancelWithCloseCode_reason_ = objc.registerName("cancelWithCloseCode:reason:"); -final _objc_msgSend_579 = objc.msgSendPointer +final _objc_msgSend_18im7ej = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -31439,7 +32036,7 @@ late final _sel_maximumMessageSize = objc.registerName("maximumMessageSize"); late final _sel_setMaximumMessageSize_ = objc.registerName("setMaximumMessageSize:"); late final _sel_closeCode = objc.registerName("closeCode"); -final _objc_msgSend_580 = objc.msgSendPointer +final _objc_msgSend_a13zbl = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, @@ -31448,48 +32045,216 @@ final _objc_msgSend_580 = objc.msgSendPointer int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_closeReason = objc.registerName("closeReason"); + +/// NSURLSessionWebSocketTask +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); + } + + /// sendMessage:completionHandler: + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + objc.ObjCBlock completionHandler) { + _objc_msgSend_cmbt6k(this.ref.pointer, _sel_sendMessage_completionHandler_, + message.ref.pointer, completionHandler.ref.pointer); + } + + /// receiveMessageWithCompletionHandler: + void receiveMessageWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + completionHandler) { + _objc_msgSend_4daxhl( + this.ref.pointer, + _sel_receiveMessageWithCompletionHandler_, + completionHandler.ref.pointer); + } + + /// sendPingWithPongReceiveHandler: + void sendPingWithPongReceiveHandler_( + objc.ObjCBlock pongReceiveHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.ref.pointer); + } + + /// cancelWithCloseCode:reason: + void cancelWithCloseCode_reason_( + NSURLSessionWebSocketCloseCode closeCode, objc.NSData? reason) { + _objc_msgSend_18im7ej(this.ref.pointer, _sel_cancelWithCloseCode_reason_, + closeCode.value, reason?.ref.pointer ?? ffi.nullptr); + } + + /// maximumMessageSize + int get maximumMessageSize { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_maximumMessageSize); + } + + /// setMaximumMessageSize: + set maximumMessageSize(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setMaximumMessageSize_, value); + } + + /// closeCode + NSURLSessionWebSocketCloseCode get closeCode { + final _ret = _objc_msgSend_a13zbl(this.ref.pointer, _sel_closeCode); + return NSURLSessionWebSocketCloseCode.fromValue(_ret); + } + + /// closeReason + objc.NSData? get closeReason { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_closeReason); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + /// init + NSURLSessionWebSocketTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); + } + + /// new + static NSURLSessionWebSocketTask new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); + } + + /// allocWithZone: + static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); + } + + /// alloc + static NSURLSessionWebSocketTask alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.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_cqxsqq( + _class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } + + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionWebSocketTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSURLSessionWebSocketTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionWebSocketTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSURLSessionWebSocketTask self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSURLSessionWebSocketTask retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSURLSessionWebSocketTask autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } +} + late final _sel_webSocketTaskWithURL_ = objc.registerName("webSocketTaskWithURL:"); -final _objc_msgSend_581 = 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_webSocketTaskWithURL_protocols_ = objc.registerName("webSocketTaskWithURL:protocols:"); -final _objc_msgSend_582 = 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_webSocketTaskWithRequest_ = objc.registerName("webSocketTaskWithRequest:"); -final _objc_msgSend_583 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -31505,8 +32270,18 @@ void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -31514,70 +32289,92 @@ void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline( + 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); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._(pointer, - retain: retain, release: release); - } + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.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_NSData_NSURLResponse_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_NSData_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( - void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), - arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -31588,88 +32385,67 @@ class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( - void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError( - objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, retain: false, release: true), - arg1.address == 0 ? null : NSURLResponse.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; + static objc + .ObjCBlock + listener(void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tenbla(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => - pointer.ref.invoke + ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); } late final _sel_dataTaskWithRequest_completionHandler_ = objc.registerName("dataTaskWithRequest:completionHandler:"); -final _objc_msgSend_584 = 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_dataTaskWithURL_completionHandler_ = objc.registerName("dataTaskWithURL:completionHandler:"); -final _objc_msgSend_585 = 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_uploadTaskWithRequest_fromFile_completionHandler_ = objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); -final _objc_msgSend_586 = objc.msgSendPointer +final _objc_msgSend_37obke = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -31677,50 +32453,20 @@ final _objc_msgSend_586 = objc.msgSendPointer 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_uploadTaskWithRequest_fromData_completionHandler_ = objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); -final _objc_msgSend_587 = 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_uploadTaskWithResumeData_completionHandler_ = objc.registerName("uploadTaskWithResumeData:completionHandler:"); -final _objc_msgSend_588 = 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)>(); void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -31736,8 +32482,18 @@ void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => @@ -31745,69 +32501,92 @@ void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline( + 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); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._(pointer, - retain: retain, release: release); - } + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.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_NSURL_NSURLResponse_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_NSURL_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( - void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), - arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -31818,476 +32597,465 @@ class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends objc.ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( - void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError(objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : objc.NSURL.castFromPointer(arg0, retain: false, release: true), - arg1.address == 0 ? null : NSURLResponse.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; + static objc + .ObjCBlock + listener(void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSURL + .castFromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tenbla(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => - pointer.ref.invoke + ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer block, + ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); } late final _sel_downloadTaskWithRequest_completionHandler_ = objc.registerName("downloadTaskWithRequest:completionHandler:"); -final _objc_msgSend_589 = 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_downloadTaskWithURL_completionHandler_ = objc.registerName("downloadTaskWithURL:completionHandler:"); -final _objc_msgSend_590 = 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_downloadTaskWithResumeData_completionHandler_ = objc.registerName("downloadTaskWithResumeData:completionHandler:"); -final _objc_msgSend_591 = 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)>(); -/// NSProtocolChecker -class NSProtocolChecker extends objc.NSProxy { - NSProtocolChecker._(ffi.Pointer pointer, +/// NSURLSession +class NSURLSession extends objc.NSObject { + NSURLSession._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSProtocolChecker] that points to the same underlying object as [other]. - NSProtocolChecker.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSURLSession] that points to the same underlying object as [other]. + NSURLSession.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSProtocolChecker] that wraps the given raw object pointer. - NSProtocolChecker.castFromPointer(ffi.Pointer other, + /// Constructs a [NSURLSession] that wraps the given raw object pointer. + NSURLSession.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSProtocolChecker]. + /// Returns whether [obj] is an instance of [NSURLSession]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); - } - - /// protocol - objc.Protocol get protocol { - final _ret = _objc_msgSend_592(this.pointer, _sel_protocol); - return objc.Protocol.castFromPointer(_ret, retain: true, release: true); - } - - /// target - objc.NSObject? get target { - final _ret = _objc_msgSend_397(this.pointer, _sel_target); - return _ret.address == 0 - ? null - : objc.NSObject.castFromPointer(_ret, retain: true, release: true); - } - - /// protocolCheckerWithTarget:protocol: - static NSProtocolChecker protocolCheckerWithTarget_protocol_( - objc.NSObject anObject, objc.Protocol aProtocol) { - final _ret = _objc_msgSend_593( - _class_NSProtocolChecker, - _sel_protocolCheckerWithTarget_protocol_, - anObject.pointer, - aProtocol.pointer); - return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithTarget:protocol: - NSProtocolChecker initWithTarget_protocol_( - objc.NSObject anObject, objc.Protocol aProtocol) { - final _ret = _objc_msgSend_593(this.pointer, _sel_initWithTarget_protocol_, - anObject.pointer, aProtocol.pointer); - return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSession); } - /// alloc - static objc.ObjCObjectBase alloc() { - final _ret = _objc_msgSend_19(_class_NSProtocolChecker, _sel_alloc); - return objc.ObjCObjectBase(_ret, retain: false, release: true); - } - - /// respondsToSelector: - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_241( - _class_NSProtocolChecker, _sel_respondsToSelector_, aSelector); - } -} - -late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); -final _objc_msgSend_592 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_target = objc.registerName("target"); -late final _sel_protocolCheckerWithTarget_protocol_ = - objc.registerName("protocolCheckerWithTarget:protocol:"); -final _objc_msgSend_593 = 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_initWithTarget_protocol_ = - objc.registerName("initWithTarget:protocol:"); - -/// NSTask -class NSTask extends objc.NSObject { - NSTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSTask] that points to the same underlying object as [other]. - NSTask.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [NSTask] that wraps the given raw object pointer. - NSTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTask); + /// sharedSession + static NSURLSession getSharedSession() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_sharedSession); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// init - NSTask init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSTask.castFromPointer(_ret, retain: true, release: true); + /// sessionWithConfiguration: + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_juohf7(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.ref.pointer); + return NSURLSession.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); + /// sessionWithConfiguration:delegate:delegateQueue: + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.ObjCObjectBase? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr, + queue?.ref.pointer ?? ffi.nullptr); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// setExecutableURL: - set executableURL(objc.NSURL? value) { - return _objc_msgSend_25( - this.pointer, _sel_setExecutableURL_, value?.pointer ?? ffi.nullptr); + /// delegateQueue + NSOperationQueue get delegateQueue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegateQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - /// arguments - objc.NSArray? get arguments { - final _ret = _objc_msgSend_86(this.pointer, _sel_arguments); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); return _ret.address == 0 ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// setArguments: - set arguments(objc.NSArray? value) { - return _objc_msgSend_546( - this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); + /// configuration + NSURLSessionConfiguration get configuration { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_configuration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - /// environment - objc.NSDictionary? get environment { - final _ret = _objc_msgSend_82(this.pointer, _sel_environment); + /// sessionDescription + objc.NSString? get sessionDescription { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sessionDescription); return _ret.address == 0 ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } - - /// setEnvironment: - set environment(objc.NSDictionary? value) { - return _objc_msgSend_187( - this.pointer, _sel_setEnvironment_, value?.pointer ?? ffi.nullptr); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// currentDirectoryURL - objc.NSURL? get currentDirectoryURL { - final _ret = _objc_msgSend_24(this.pointer, _sel_currentDirectoryURL); - return _ret.address == 0 - ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + /// setSessionDescription: + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSessionDescription_, + value?.ref.pointer ?? ffi.nullptr); } - /// setCurrentDirectoryURL: - set currentDirectoryURL(objc.NSURL? value) { - return _objc_msgSend_25(this.pointer, _sel_setCurrentDirectoryURL_, - value?.pointer ?? ffi.nullptr); + /// finishTasksAndInvalidate + void finishTasksAndInvalidate() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_finishTasksAndInvalidate); } - /// standardInput - objc.ObjCObjectBase? get standardInput { - final _ret = _objc_msgSend_83(this.pointer, _sel_standardInput); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// invalidateAndCancel + void invalidateAndCancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidateAndCancel); } - /// setStandardInput: - set standardInput(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setStandardInput_, value?.pointer ?? ffi.nullptr); + /// resetWithCompletionHandler: + void resetWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_resetWithCompletionHandler_, + completionHandler.ref.pointer); } - /// standardOutput - objc.ObjCObjectBase? get standardOutput { - final _ret = _objc_msgSend_83(this.pointer, _sel_standardOutput); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// flushWithCompletionHandler: + void flushWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_flushWithCompletionHandler_, + completionHandler.ref.pointer); } - /// setStandardOutput: - set standardOutput(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setStandardOutput_, value?.pointer ?? ffi.nullptr); + /// getTasksWithCompletionHandler: + void getTasksWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(objc.NSArray, objc.NSArray, objc.NSArray)> + completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.ref.pointer); } - /// standardError - objc.ObjCObjectBase? get standardError { - final _ret = _objc_msgSend_83(this.pointer, _sel_standardError); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// getAllTasksWithCompletionHandler: + void getAllTasksWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, + _sel_getAllTasksWithCompletionHandler_, completionHandler.ref.pointer); } - /// setStandardError: - set standardError(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setStandardError_, value?.pointer ?? ffi.nullptr); + /// dataTaskWithRequest: + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dataTaskWithRequest_, request.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - /// launchAndReturnError: - bool launchAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_39(this.pointer, _sel_launchAndReturnError_, error); + /// dataTaskWithURL: + NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dataTaskWithURL_, url.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - /// interrupt - void interrupt() { - _objc_msgSend_7(this.pointer, _sel_interrupt); + /// uploadTaskWithRequest:fromFile: + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromFile_, + request.ref.pointer, + fileURL.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// terminate - void terminate() { - _objc_msgSend_7(this.pointer, _sel_terminate); + /// uploadTaskWithRequest:fromData: + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromData_, + request.ref.pointer, + bodyData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// suspend - bool suspend() { - return _objc_msgSend_13(this.pointer, _sel_suspend); + /// uploadTaskWithResumeData: + NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_uploadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// resume - bool resume() { - return _objc_msgSend_13(this.pointer, _sel_resume); + /// uploadTaskWithStreamedRequest: + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_uploadTaskWithStreamedRequest_, request.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// processIdentifier - int get processIdentifier { - return _objc_msgSend_273(this.pointer, _sel_processIdentifier); + /// downloadTaskWithRequest: + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_downloadTaskWithRequest_, request.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - /// isRunning - bool get running { - return _objc_msgSend_13(this.pointer, _sel_isRunning); + /// downloadTaskWithURL: + NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_downloadTaskWithURL_, url.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - /// terminationStatus - int get terminationStatus { - return _objc_msgSend_273(this.pointer, _sel_terminationStatus); + /// downloadTaskWithResumeData: + NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_downloadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - /// terminationReason - NSTaskTerminationReason get terminationReason { - final _ret = _objc_msgSend_594(this.pointer, _sel_terminationReason); - return NSTaskTerminationReason.fromValue(_ret); + /// streamTaskWithHostName:port: + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, int port) { + final _ret = _objc_msgSend_spwp90(this.ref.pointer, + _sel_streamTaskWithHostName_port_, hostname.ref.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - /// terminationHandler - ObjCBlock_ffiVoid_NSTask? get terminationHandler { - final _ret = _objc_msgSend_595(this.pointer, _sel_terminationHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, - retain: true, release: true); + /// streamTaskWithNetService: + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_streamTaskWithNetService_, service.ref.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - /// setTerminationHandler: - set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { - return _objc_msgSend_596(this.pointer, _sel_setTerminationHandler_, - value?.pointer ?? ffi.nullptr); + /// webSocketTaskWithURL: + NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_webSocketTaskWithURL_, url.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - /// qualityOfService - NSQualityOfService get qualityOfService { - final _ret = _objc_msgSend_394(this.pointer, _sel_qualityOfService); - return NSQualityOfService.fromValue(_ret); + /// webSocketTaskWithURL:protocols: + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.NSArray protocols) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_webSocketTaskWithURL_protocols_, + url.ref.pointer, + protocols.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_395( - this.pointer, _sel_setQualityOfService_, value.value); + /// webSocketTaskWithRequest: + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_webSocketTaskWithRequest_, request.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - /// launchedTaskWithExecutableURL:arguments:error:terminationHandler: - static NSTask? - launchedTaskWithExecutableURL_arguments_error_terminationHandler_( - objc.NSURL url, - objc.NSArray arguments, - ffi.Pointer> error, - ObjCBlock_ffiVoid_NSTask? terminationHandler) { - final _ret = _objc_msgSend_597( - _class_NSTask, - _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, - url.pointer, - arguments.pointer, - error, - terminationHandler?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTask.castFromPointer(_ret, retain: true, release: true); + /// init + NSURLSession init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - /// waitUntilExit - void waitUntilExit() { - _objc_msgSend_7(this.pointer, _sel_waitUntilExit); + /// new + static NSURLSession new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_new); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - /// launchPath - objc.NSString? get launchPath { - final _ret = _objc_msgSend_20(this.pointer, _sel_launchPath); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// dataTaskWithRequest:completionHandler: + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_dataTaskWithRequest_completionHandler_, + request.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - /// setLaunchPath: - set launchPath(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setLaunchPath_, value?.pointer ?? ffi.nullptr); + /// dataTaskWithURL:completionHandler: + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_dataTaskWithURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - /// currentDirectoryPath - objc.NSString get currentDirectoryPath { - final _ret = _objc_msgSend_11(this.pointer, _sel_currentDirectoryPath); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// uploadTaskWithRequest:fromFile:completionHandler: + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + objc.NSURL fileURL, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_37obke( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromFile_completionHandler_, + request.ref.pointer, + fileURL.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// setCurrentDirectoryPath: - set currentDirectoryPath(objc.NSString value) { - return _objc_msgSend_12( - this.pointer, _sel_setCurrentDirectoryPath_, value.pointer); + /// uploadTaskWithRequest:fromData:completionHandler: + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + objc.NSData? bodyData, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_37obke( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromData_completionHandler_, + request.ref.pointer, + bodyData?.ref.pointer ?? ffi.nullptr, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// launch - void launch() { - _objc_msgSend_7(this.pointer, _sel_launch); + /// uploadTaskWithResumeData:completionHandler: + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_uploadTaskWithResumeData_completionHandler_, + resumeData.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// launchedTaskWithLaunchPath:arguments: - static NSTask launchedTaskWithLaunchPath_arguments_( - objc.NSString path, objc.NSArray arguments) { - final _ret = _objc_msgSend_598( - _class_NSTask, - _sel_launchedTaskWithLaunchPath_arguments_, - path.pointer, - arguments.pointer); - return NSTask.castFromPointer(_ret, retain: true, release: true); + /// downloadTaskWithRequest:completionHandler: + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithRequest_completionHandler_, + request.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - /// new - static NSTask new1() { - final _ret = _objc_msgSend_19(_class_NSTask, _sel_new); - return NSTask.castFromPointer(_ret, retain: false, release: true); + /// downloadTaskWithURL:completionHandler: + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// downloadTaskWithResumeData:completionHandler: + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithResumeData_completionHandler_, + resumeData.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// allocWithZone: - static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28(_class_NSTask, _sel_allocWithZone_, zone); - return NSTask.castFromPointer(_ret, retain: false, release: true); + static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLSession, _sel_allocWithZone_, zone); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSTask alloc() { - final _ret = _objc_msgSend_19(_class_NSTask, _sel_alloc); - return NSTask.castFromPointer(_ret, retain: false, release: true); + static NSURLSession alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_alloc); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -32295,67 +33063,176 @@ class NSTask extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSTask, + _objc_msgSend_cqxsqq( + _class_NSURLSession, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSURLSession, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSURLSession, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSTask, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSURLSession, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSession, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31( - _class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSURLSession, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSTask, + _objc_msgSend_1tjlcwl( + _class_NSURLSession, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19(_class_NSTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSession, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSURLSession self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLSession retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLSession autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); +late final _sel_target = objc.registerName("target"); +late final _sel_protocolCheckerWithTarget_protocol_ = + objc.registerName("protocolCheckerWithTarget:protocol:"); +late final _sel_initWithTarget_protocol_ = + objc.registerName("initWithTarget:protocol:"); + +/// NSProtocolChecker +class NSProtocolChecker extends objc.NSProxy { + NSProtocolChecker._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSProtocolChecker] that points to the same underlying object as [other]. + NSProtocolChecker.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSProtocolChecker] that wraps the given raw object pointer. + NSProtocolChecker.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSProtocolChecker]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); + } + + /// protocol + objc.Protocol get protocol { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_protocol); + return objc.Protocol.castFromPointer(_ret, retain: true, release: true); + } + + /// target + objc.NSObject? get target { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_target); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + /// protocolCheckerWithTarget:protocol: + static NSProtocolChecker protocolCheckerWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_iq11qg( + _class_NSProtocolChecker, + _sel_protocolCheckerWithTarget_protocol_, + anObject.ref.pointer, + aProtocol.ref.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithTarget:protocol: + NSProtocolChecker initWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithTarget_protocol_, + anObject.ref.pointer, + aProtocol.ref.pointer); + return NSProtocolChecker.castFromPointer(_ret, + retain: false, release: true); + } + + /// alloc + static objc.ObjCObjectBase alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSProtocolChecker, _sel_alloc); + return objc.ObjCObjectBase(_ret, retain: false, release: true); + } + + /// self + NSProtocolChecker self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSProtocolChecker retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSProtocolChecker autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } } late final _class_NSTask = objc.getClass("NSTask"); @@ -32394,7 +33271,7 @@ enum NSTaskTerminationReason { } late final _sel_terminationReason = objc.registerName("terminationReason"); -final _objc_msgSend_594 = objc.msgSendPointer +final _objc_msgSend_19wfngj = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer, @@ -32403,65 +33280,86 @@ final _objc_msgSend_594 = objc.msgSendPointer int Function( ffi.Pointer, ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) + .cast(); void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + ffi.Pointer block, + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSTask_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} -class ObjCBlock_ffiVoid_NSTask extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSTask._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSTask_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTask_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSTask { /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTask castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSTask._(pointer, - retain: retain, release: release); - } + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(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_NSTask.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_NSTask_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSTask_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSTask.fromFunction(void Function(NSTask) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - .cast(), - (ffi.Pointer arg0) => - fn(NSTask.castFromPointer(arg0, retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock fromFunction( + void Function(NSTask) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTask_closureCallable, + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -32472,55 +33370,39 @@ class ObjCBlock_ffiVoid_NSTask extends objc.ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTask.listener(void Function(NSTask) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_NSTask(objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (ffi.Pointer arg0) => fn( - NSTask.castFromPointer(arg0, retain: false, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; + static objc.ObjCBlock listener( + void Function(NSTask) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTask_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => + fn(NSTask.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - void call(NSTask arg0) => pointer.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSTask_CallExtension + on objc.ObjCBlock { + void call(NSTask arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, + ffi.Void Function(ffi.Pointer block, ffi.Pointer arg0)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(pointer, arg0.pointer); + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); } late final _sel_terminationHandler = objc.registerName("terminationHandler"); -final _objc_msgSend_595 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); late final _sel_setTerminationHandler_ = objc.registerName("setTerminationHandler:"); -final _objc_msgSend_596 = 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_launchedTaskWithExecutableURL_arguments_error_terminationHandler_ = objc.registerName( "launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); -final _objc_msgSend_597 = objc.msgSendPointer +final _objc_msgSend_1rgs79u = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -32529,7 +33411,7 @@ final _objc_msgSend_597 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer>, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, @@ -32537,7 +33419,7 @@ final _objc_msgSend_597 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer>, - ffi.Pointer)>(); + ffi.Pointer)>(); late final _sel_waitUntilExit = objc.registerName("waitUntilExit"); late final _sel_launchPath = objc.registerName("launchPath"); late final _sel_setLaunchPath_ = objc.registerName("setLaunchPath:"); @@ -32546,413 +33428,294 @@ late final _sel_setCurrentDirectoryPath_ = late final _sel_launch = objc.registerName("launch"); late final _sel_launchedTaskWithLaunchPath_arguments_ = objc.registerName("launchedTaskWithLaunchPath:arguments:"); -final _objc_msgSend_598 = 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)>(); -/// NSXMLElement -class NSXMLElement extends NSXMLNode { - NSXMLElement._(ffi.Pointer pointer, +/// NSTask +class NSTask extends objc.NSObject { + NSTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSXMLElement] that points to the same underlying object as [other]. - NSXMLElement.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSTask] that points to the same underlying object as [other]. + NSTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSXMLElement] that wraps the given raw object pointer. - NSXMLElement.castFromPointer(ffi.Pointer other, + /// Constructs a [NSTask] that wraps the given raw object pointer. + NSTask.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSXMLElement]. + /// Returns whether [obj] is an instance of [NSTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLElement); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTask); } - /// initWithName: - NSXMLElement initWithName_(objc.NSString name) { + /// init + NSTask init() { final _ret = - _objc_msgSend_63(this.pointer, _sel_initWithName_, name.pointer); - return NSXMLElement.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithName:URI: - NSXMLElement initWithName_URI_(objc.NSString name, objc.NSString? URI) { - final _ret = _objc_msgSend_599(this.pointer, _sel_initWithName_URI_, - name.pointer, URI?.pointer ?? ffi.nullptr); - return NSXMLElement.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithName:stringValue: - NSXMLElement initWithName_stringValue_( - objc.NSString name, objc.NSString? string) { - final _ret = _objc_msgSend_599(this.pointer, _sel_initWithName_stringValue_, - name.pointer, string?.pointer ?? ffi.nullptr); - return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSTask.castFromPointer(_ret, retain: false, release: true); } - /// initWithXMLString:error: - NSXMLElement? initWithXMLString_error_( - objc.NSString string, ffi.Pointer> error) { - final _ret = _objc_msgSend_600( - this.pointer, _sel_initWithXMLString_error_, string.pointer, error); + /// executableURL + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executableURL); return _ret.address == 0 ? null - : NSXMLElement.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithKind:options: - NSXMLElement initWithKind_options_( - NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_601( - this.pointer, _sel_initWithKind_options_, kind.value, options.value); - return NSXMLElement.castFromPointer(_ret, retain: true, release: true); - } - - /// elementsForName: - objc.NSArray elementsForName_(objc.NSString name) { - final _ret = - _objc_msgSend_387(this.pointer, _sel_elementsForName_, name.pointer); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// elementsForLocalName:URI: - objc.NSArray elementsForLocalName_URI_( - objc.NSString localName, objc.NSString? URI) { - final _ret = _objc_msgSend_602(this.pointer, _sel_elementsForLocalName_URI_, - localName.pointer, URI?.pointer ?? ffi.nullptr); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// addAttribute: - void addAttribute_(NSXMLNode attribute) { - _objc_msgSend_618(this.pointer, _sel_addAttribute_, attribute.pointer); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// removeAttributeForName: - void removeAttributeForName_(objc.NSString name) { - _objc_msgSend_108(this.pointer, _sel_removeAttributeForName_, name.pointer); + /// setExecutableURL: + set executableURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setExecutableURL_, + value?.ref.pointer ?? ffi.nullptr); } - /// attributes - objc.NSArray? get attributes { - final _ret = _objc_msgSend_86(this.pointer, _sel_attributes); + /// arguments + objc.NSArray? get arguments { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_arguments); return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setAttributes: - set attributes(objc.NSArray? value) { - return _objc_msgSend_546( - this.pointer, _sel_setAttributes_, value?.pointer ?? ffi.nullptr); - } - - /// setAttributesWithDictionary: - void setAttributesWithDictionary_(objc.NSDictionary attributes) { - _objc_msgSend_639( - this.pointer, _sel_setAttributesWithDictionary_, attributes.pointer); - } - - /// attributeForName: - NSXMLNode? attributeForName_(objc.NSString name) { - final _ret = - _objc_msgSend_622(this.pointer, _sel_attributeForName_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); - } - - /// attributeForLocalName:URI: - NSXMLNode? attributeForLocalName_URI_( - objc.NSString localName, objc.NSString? URI) { - final _ret = _objc_msgSend_640( - this.pointer, - _sel_attributeForLocalName_URI_, - localName.pointer, - URI?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); - } - - /// addNamespace: - void addNamespace_(NSXMLNode aNamespace) { - _objc_msgSend_618(this.pointer, _sel_addNamespace_, aNamespace.pointer); - } - - /// removeNamespaceForPrefix: - void removeNamespaceForPrefix_(objc.NSString name) { - _objc_msgSend_108( - this.pointer, _sel_removeNamespaceForPrefix_, name.pointer); + /// setArguments: + set arguments(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setArguments_, + value?.ref.pointer ?? ffi.nullptr); } - /// namespaces - objc.NSArray? get namespaces { - final _ret = _objc_msgSend_86(this.pointer, _sel_namespaces); + /// environment + objc.NSDictionary? get environment { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_environment); return _ret.address == 0 ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// setNamespaces: - set namespaces(objc.NSArray? value) { - return _objc_msgSend_546( - this.pointer, _sel_setNamespaces_, value?.pointer ?? ffi.nullptr); + /// setEnvironment: + set environment(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEnvironment_, + value?.ref.pointer ?? ffi.nullptr); } - /// namespaceForPrefix: - NSXMLNode? namespaceForPrefix_(objc.NSString name) { + /// currentDirectoryURL + objc.NSURL? get currentDirectoryURL { final _ret = - _objc_msgSend_622(this.pointer, _sel_namespaceForPrefix_, name.pointer); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryURL); return _ret.address == 0 ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// resolveNamespaceForName: - NSXMLNode? resolveNamespaceForName_(objc.NSString name) { - final _ret = _objc_msgSend_622( - this.pointer, _sel_resolveNamespaceForName_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + /// setCurrentDirectoryURL: + set currentDirectoryURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrentDirectoryURL_, + value?.ref.pointer ?? ffi.nullptr); } - /// resolvePrefixForNamespaceURI: - objc.NSString? resolvePrefixForNamespaceURI_(objc.NSString namespaceURI) { - final _ret = _objc_msgSend_42( - this.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.pointer); + /// standardInput + objc.ObjCObjectBase? get standardInput { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standardInput); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// insertChild:atIndex: - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_616( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + /// setStandardInput: + set standardInput(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardInput_, + value?.ref.pointer ?? ffi.nullptr); } - /// insertChildren:atIndex: - void insertChildren_atIndex_(objc.NSArray children, int index) { - _objc_msgSend_617( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + /// standardOutput + objc.ObjCObjectBase? get standardOutput { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standardOutput); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// removeChildAtIndex: - void removeChildAtIndex_(int index) { - _objc_msgSend_422(this.pointer, _sel_removeChildAtIndex_, index); + /// setStandardOutput: + set standardOutput(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardOutput_, + value?.ref.pointer ?? ffi.nullptr); } - /// setChildren: - void setChildren_(objc.NSArray? children) { - _objc_msgSend_269( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + /// standardError + objc.ObjCObjectBase? get standardError { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standardError); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// addChild: - void addChild_(NSXMLNode child) { - _objc_msgSend_618(this.pointer, _sel_addChild_, child.pointer); + /// setStandardError: + set standardError(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardError_, + value?.ref.pointer ?? ffi.nullptr); } - /// replaceChildAtIndex:withNode: - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_619( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + /// launchAndReturnError: + bool launchAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_launchAndReturnError_, error); } - /// normalizeAdjacentTextNodesPreservingCDATA: - void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { - _objc_msgSend_348(this.pointer, - _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); + /// interrupt + void interrupt() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_interrupt); } - /// setAttributesAsDictionary: - void setAttributesAsDictionary_(objc.NSDictionary attributes) { - _objc_msgSend_639( - this.pointer, _sel_setAttributesAsDictionary_, attributes.pointer); + /// terminate + void terminate() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_terminate); } - /// init - NSXMLElement init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + /// suspend + bool suspend() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_suspend); } - /// initWithKind: - NSXMLElement initWithKind_(NSXMLNodeKind kind) { - final _ret = - _objc_msgSend_603(this.pointer, _sel_initWithKind_, kind.value); - return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + /// resume + bool resume() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_resume); } - /// document - static objc.ObjCObjectBase document() { - final _ret = _objc_msgSend_19(_class_NSXMLElement, _sel_document); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// processIdentifier + int get processIdentifier { + return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_processIdentifier); } - /// documentWithRootElement: - static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_604( - _class_NSXMLElement, _sel_documentWithRootElement_, element.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// isRunning + bool get running { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isRunning); } - /// elementWithName: - static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_63( - _class_NSXMLElement, _sel_elementWithName_, name.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// terminationStatus + int get terminationStatus { + return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_terminationStatus); } - /// elementWithName:URI: - static objc.ObjCObjectBase elementWithName_URI_( - objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_605(_class_NSXMLElement, - _sel_elementWithName_URI_, name.pointer, URI.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// terminationReason + NSTaskTerminationReason get terminationReason { + final _ret = + _objc_msgSend_19wfngj(this.ref.pointer, _sel_terminationReason); + return NSTaskTerminationReason.fromValue(_ret); } - /// elementWithName:stringValue: - static objc.ObjCObjectBase elementWithName_stringValue_( - objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_605(_class_NSXMLElement, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// terminationHandler + objc.ObjCBlock? get terminationHandler { + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_terminationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, + retain: true, release: true); } - /// elementWithName:children:attributes: - static objc.ObjCObjectBase elementWithName_children_attributes_( - objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_606( - _class_NSXMLElement, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setTerminationHandler: + set terminationHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setTerminationHandler_, + value?.ref.pointer ?? ffi.nullptr); } - /// attributeWithName:stringValue: - static objc.ObjCObjectBase attributeWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLElement, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// qualityOfService + NSQualityOfService get qualityOfService { + final _ret = _objc_msgSend_17dnyeh(this.ref.pointer, _sel_qualityOfService); + return NSQualityOfService.fromValue(_ret); } - /// attributeWithName:URI:stringValue: - static objc.ObjCObjectBase attributeWithName_URI_stringValue_( - objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_567( - _class_NSXMLElement, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setQualityOfService: + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); } - /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLElement, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// launchedTaskWithExecutableURL:arguments:error:terminationHandler: + static NSTask? + launchedTaskWithExecutableURL_arguments_error_terminationHandler_( + objc.NSURL url, + objc.NSArray arguments, + ffi.Pointer> error, + objc.ObjCBlock? terminationHandler) { + final _ret = _objc_msgSend_1rgs79u( + _class_NSTask, + _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, + url.ref.pointer, + arguments.ref.pointer, + error, + terminationHandler?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTask.castFromPointer(_ret, retain: true, release: true); } - /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605( - _class_NSXMLElement, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// waitUntilExit + void waitUntilExit() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilExit); } - /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_( - objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLElement, _sel_commentWithStringValue_, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// launchPath + objc.NSString? get launchPath { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_launchPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// textWithStringValue: - static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLElement, _sel_textWithStringValue_, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setLaunchPath: + set launchPath(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLaunchPath_, + value?.ref.pointer ?? ffi.nullptr); } - /// DTDNodeWithXMLString: - static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_35( - _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.pointer); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// currentDirectoryPath + objc.NSString get currentDirectoryPath { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// localNameForName: - static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_306( - _class_NSXMLElement, _sel_localNameForName_, name.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setCurrentDirectoryPath: + set currentDirectoryPath(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrentDirectoryPath_, value.ref.pointer); } - /// prefixForName: - static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_42( - _class_NSXMLElement, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// launch + void launch() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_launch); } - /// predefinedNamespaceForPrefix: - static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_622( - _class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + /// launchedTaskWithLaunchPath:arguments: + static NSTask launchedTaskWithLaunchPath_arguments_( + objc.NSString path, objc.NSArray arguments) { + final _ret = _objc_msgSend_iq11qg( + _class_NSTask, + _sel_launchedTaskWithLaunchPath_arguments_, + path.ref.pointer, + arguments.ref.pointer); + return NSTask.castFromPointer(_ret, retain: true, release: true); } /// new - static NSXMLElement new1() { - final _ret = _objc_msgSend_19(_class_NSXMLElement, _sel_new); - return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + static NSTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTask, _sel_new); + return NSTask.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_NSXMLElement, _sel_allocWithZone_, zone); - return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + _objc_msgSend_1b3ihd0(_class_NSTask, _sel_allocWithZone_, zone); + return NSTask.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSXMLElement alloc() { - final _ret = _objc_msgSend_19(_class_NSXMLElement, _sel_alloc); - return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + static NSTask alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSTask, _sel_alloc); + return NSTask.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -32960,104 +33723,89 @@ class NSXMLElement extends NSXMLNode { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSXMLElement, + _objc_msgSend_cqxsqq( + _class_NSTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSXMLElement, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSXMLElement, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSXMLElement, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSXMLElement, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSXMLElement, + _objc_msgSend_1tjlcwl( + _class_NSTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { final _ret = - _objc_msgSend_19(_class_NSXMLElement, _sel_classForKeyedUnarchiver); + _objc_msgSend_1unuoxw(_class_NSTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSTask self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSTask.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSTask retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSTask.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSTask autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSTask.castFromPointer(_ret, retain: true, release: true); + } } -late final _class_NSXMLElement = objc.getClass("NSXMLElement"); -late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); -final _objc_msgSend_599 = 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_stringValue_ = - objc.registerName("initWithName:stringValue:"); -late final _sel_initWithXMLString_error_ = - objc.registerName("initWithXMLString:error:"); -final _objc_msgSend_600 = 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 _class_NSXMLNode = objc.getClass("NSXMLNode"); enum NSXMLNodeKind { NSXMLInvalidKind(0), @@ -33095,6 +33843,16 @@ enum NSXMLNodeKind { }; } +late final _sel_initWithKind_ = objc.registerName("initWithKind:"); +final _objc_msgSend_ayvqtd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + enum NSXMLNodeOptions { NSXMLNodeOptionsNone(0), NSXMLNodeIsCDATA(1), @@ -33163,7 +33921,7 @@ enum NSXMLNodeOptions { late final _sel_initWithKind_options_ = objc.registerName("initWithKind:options:"); -final _objc_msgSend_601 = objc.msgSendPointer +final _objc_msgSend_hddv7u = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -33174,630 +33932,853 @@ final _objc_msgSend_601 = objc.msgSendPointer .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int, int)>(); -late final _sel_elementsForName_ = objc.registerName("elementsForName:"); -late final _sel_elementsForLocalName_URI_ = - objc.registerName("elementsForLocalName:URI:"); -final _objc_msgSend_602 = objc.msgSendPointer +late final _sel_document = objc.registerName("document"); +late final _sel_documentWithRootElement_ = + objc.registerName("documentWithRootElement:"); +late final _sel_elementWithName_ = objc.registerName("elementWithName:"); +late final _sel_elementWithName_URI_ = + objc.registerName("elementWithName:URI:"); +late final _sel_elementWithName_stringValue_ = + objc.registerName("elementWithName:stringValue:"); +late final _sel_elementWithName_children_attributes_ = + objc.registerName("elementWithName:children:attributes:"); +late final _sel_attributeWithName_stringValue_ = + objc.registerName("attributeWithName:stringValue:"); +late final _sel_attributeWithName_URI_stringValue_ = + objc.registerName("attributeWithName:URI:stringValue:"); +late final _sel_namespaceWithName_stringValue_ = + objc.registerName("namespaceWithName:stringValue:"); +late final _sel_processingInstructionWithName_stringValue_ = + objc.registerName("processingInstructionWithName:stringValue:"); +late final _sel_commentWithStringValue_ = + objc.registerName("commentWithStringValue:"); +late final _sel_textWithStringValue_ = + objc.registerName("textWithStringValue:"); +late final _sel_DTDNodeWithXMLString_ = + objc.registerName("DTDNodeWithXMLString:"); +final _objc_msgSend_1edk5dx = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectValue = objc.registerName("objectValue"); +late final _sel_setObjectValue_ = objc.registerName("setObjectValue:"); +late final _sel_stringValue = objc.registerName("stringValue"); +late final _sel_setStringValue_ = objc.registerName("setStringValue:"); +late final _sel_setStringValue_resolvingEntities_ = + objc.registerName("setStringValue:resolvingEntities:"); +late final _sel_index = objc.registerName("index"); +late final _sel_level = objc.registerName("level"); +late final _class_NSXMLDocument = objc.getClass("NSXMLDocument"); +late final _sel_initWithXMLString_options_error_ = + objc.registerName("initWithXMLString:options:error:"); +final _objc_msgSend_1go5rz8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfURL_options_error_ = + objc.registerName("initWithContentsOfURL:options:error:"); +late final _sel_initWithData_options_error_ = + objc.registerName("initWithData:options:error:"); +late final _sel_initWithRootElement_ = + objc.registerName("initWithRootElement:"); +late final _sel_replacementClassForClass_ = + objc.registerName("replacementClassForClass:"); +late final _sel_characterEncoding = objc.registerName("characterEncoding"); +late final _sel_setCharacterEncoding_ = + objc.registerName("setCharacterEncoding:"); +late final _sel_setVersion_ = objc.registerName("setVersion:"); +late final _sel_isStandalone = objc.registerName("isStandalone"); +late final _sel_setStandalone_ = objc.registerName("setStandalone:"); + +enum NSXMLDocumentContentKind { + NSXMLDocumentXMLKind(0), + NSXMLDocumentXHTMLKind(1), + NSXMLDocumentHTMLKind(2), + NSXMLDocumentTextKind(3); + + final int value; + const NSXMLDocumentContentKind(this.value); + + static NSXMLDocumentContentKind fromValue(int value) => switch (value) { + 0 => NSXMLDocumentXMLKind, + 1 => NSXMLDocumentXHTMLKind, + 2 => NSXMLDocumentHTMLKind, + 3 => NSXMLDocumentTextKind, + _ => throw ArgumentError( + "Unknown value for NSXMLDocumentContentKind: $value"), + }; +} + +late final _sel_documentContentKind = objc.registerName("documentContentKind"); +final _objc_msgSend_vx3pa9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDocumentContentKind_ = + objc.registerName("setDocumentContentKind:"); +final _objc_msgSend_zmck60 = 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_setMIMEType_ = objc.registerName("setMIMEType:"); +late final _class_NSXMLDTD = objc.getClass("NSXMLDTD"); +late final _sel_setPublicID_ = objc.registerName("setPublicID:"); +late final _sel_setSystemID_ = objc.registerName("setSystemID:"); +late final _sel_insertChild_atIndex_ = + objc.registerName("insertChild:atIndex:"); +late final _sel_insertChildren_atIndex_ = + objc.registerName("insertChildren:atIndex:"); +late final _sel_removeChildAtIndex_ = objc.registerName("removeChildAtIndex:"); +late final _sel_setChildren_ = objc.registerName("setChildren:"); +late final _sel_addChild_ = objc.registerName("addChild:"); +late final _sel_replaceChildAtIndex_withNode_ = + objc.registerName("replaceChildAtIndex:withNode:"); +final _objc_msgSend_1a4j45m = 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 _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); +late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); -/// NSXMLNode -class NSXMLNode extends objc.NSObject { - NSXMLNode._(ffi.Pointer pointer, +enum NSXMLDTDNodeKind { + NSXMLEntityGeneralKind(1), + NSXMLEntityParsedKind(2), + NSXMLEntityUnparsedKind(3), + NSXMLEntityParameterKind(4), + NSXMLEntityPredefined(5), + NSXMLAttributeCDATAKind(6), + NSXMLAttributeIDKind(7), + NSXMLAttributeIDRefKind(8), + NSXMLAttributeIDRefsKind(9), + NSXMLAttributeEntityKind(10), + NSXMLAttributeEntitiesKind(11), + NSXMLAttributeNMTokenKind(12), + NSXMLAttributeNMTokensKind(13), + NSXMLAttributeEnumerationKind(14), + NSXMLAttributeNotationKind(15), + NSXMLElementDeclarationUndefinedKind(16), + NSXMLElementDeclarationEmptyKind(17), + NSXMLElementDeclarationAnyKind(18), + NSXMLElementDeclarationMixedKind(19), + NSXMLElementDeclarationElementKind(20); + + final int value; + const NSXMLDTDNodeKind(this.value); + + static NSXMLDTDNodeKind fromValue(int value) => switch (value) { + 1 => NSXMLEntityGeneralKind, + 2 => NSXMLEntityParsedKind, + 3 => NSXMLEntityUnparsedKind, + 4 => NSXMLEntityParameterKind, + 5 => NSXMLEntityPredefined, + 6 => NSXMLAttributeCDATAKind, + 7 => NSXMLAttributeIDKind, + 8 => NSXMLAttributeIDRefKind, + 9 => NSXMLAttributeIDRefsKind, + 10 => NSXMLAttributeEntityKind, + 11 => NSXMLAttributeEntitiesKind, + 12 => NSXMLAttributeNMTokenKind, + 13 => NSXMLAttributeNMTokensKind, + 14 => NSXMLAttributeEnumerationKind, + 15 => NSXMLAttributeNotationKind, + 16 => NSXMLElementDeclarationUndefinedKind, + 17 => NSXMLElementDeclarationEmptyKind, + 18 => NSXMLElementDeclarationAnyKind, + 19 => NSXMLElementDeclarationMixedKind, + 20 => NSXMLElementDeclarationElementKind, + _ => throw ArgumentError("Unknown value for NSXMLDTDNodeKind: $value"), + }; +} + +late final _sel_DTDKind = objc.registerName("DTDKind"); +final _objc_msgSend_q8besf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); +final _objc_msgSend_g68b2i = 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_isExternal = objc.registerName("isExternal"); +late final _sel_notationName = objc.registerName("notationName"); +late final _sel_setNotationName_ = objc.registerName("setNotationName:"); +late final _sel_localNameForName_ = objc.registerName("localNameForName:"); +late final _sel_prefixForName_ = objc.registerName("prefixForName:"); +late final _sel_predefinedNamespaceForPrefix_ = + objc.registerName("predefinedNamespaceForPrefix:"); + +/// NSXMLDTDNode +class NSXMLDTDNode extends NSXMLNode { + NSXMLDTDNode._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSXMLNode] that points to the same underlying object as [other]. - NSXMLNode.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSXMLDTDNode] that points to the same underlying object as [other]. + NSXMLDTDNode.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSXMLDTDNode] that wraps the given raw object pointer. + NSXMLDTDNode.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLDTDNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); + } + + /// initWithXMLString: + NSXMLDTDNode? initWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithKind:options: + NSXMLDTDNode initWithKind_options_( + NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); + } + + /// init + NSXMLDTDNode init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); + } + + /// DTDKind + NSXMLDTDNodeKind get DTDKind { + final _ret = _objc_msgSend_q8besf(this.ref.pointer, _sel_DTDKind); + return NSXMLDTDNodeKind.fromValue(_ret); + } + + /// setDTDKind: + set DTDKind(NSXMLDTDNodeKind value) { + return _objc_msgSend_g68b2i( + this.ref.pointer, _sel_setDTDKind_, value.value); + } + + /// isExternal + bool get external1 { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isExternal); + } + + /// publicID + objc.NSString? get publicID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Constructs a [NSXMLNode] that wraps the given raw object pointer. - NSXMLNode.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// setPublicID: + set publicID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPublicID_, value?.ref.pointer ?? ffi.nullptr); + } - /// Returns whether [obj] is an instance of [NSXMLNode]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLNode); + /// systemID + objc.NSString? get systemID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// init - NSXMLNode init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSXMLNode.castFromPointer(_ret, retain: true, release: true); + /// setSystemID: + set systemID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setSystemID_, value?.ref.pointer ?? ffi.nullptr); } - /// initWithKind: - NSXMLNode initWithKind_(NSXMLNodeKind kind) { - final _ret = - _objc_msgSend_603(this.pointer, _sel_initWithKind_, kind.value); - return NSXMLNode.castFromPointer(_ret, retain: true, release: true); + /// notationName + objc.NSString? get notationName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_notationName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// initWithKind:options: - NSXMLNode initWithKind_options_( - NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_601( - this.pointer, _sel_initWithKind_options_, kind.value, options.value); - return NSXMLNode.castFromPointer(_ret, retain: true, release: true); + /// setNotationName: + set notationName(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNotationName_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// initWithKind: + NSXMLDTDNode initWithKind_(NSXMLNodeKind kind) { + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } /// document static objc.ObjCObjectBase document() { - final _ret = _objc_msgSend_19(_class_NSXMLNode, _sel_document); + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLDTDNode, _sel_document); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_604( - _class_NSXMLNode, _sel_documentWithRootElement_, element.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = - _objc_msgSend_63(_class_NSXMLNode, _sel_elementWithName_, name.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: static objc.ObjCObjectBase elementWithName_URI_( objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_605( - _class_NSXMLNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); + final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTDNode, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: static objc.ObjCObjectBase elementWithName_stringValue_( objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_605(_class_NSXMLNode, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: static objc.ObjCObjectBase elementWithName_children_attributes_( objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_606( - _class_NSXMLNode, + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTDNode, _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: static objc.ObjCObjectBase attributeWithName_stringValue_( objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLNode, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: static objc.ObjCObjectBase attributeWithName_URI_stringValue_( objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_567( - _class_NSXMLNode, + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTDNode, _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// namespaceWithName:stringValue: static objc.ObjCObjectBase namespaceWithName_stringValue_( objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLNode, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// processingInstructionWithName:stringValue: static objc.ObjCObjectBase processingInstructionWithName_stringValue_( objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605( - _class_NSXMLNode, + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// commentWithStringValue: static objc.ObjCObjectBase commentWithStringValue_( objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLNode, _sel_commentWithStringValue_, stringValue.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_commentWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// textWithStringValue: static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLNode, _sel_textWithStringValue_, stringValue.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// DTDNodeWithXMLString: static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_35( - _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.ref.pointer); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// kind - NSXMLNodeKind get kind { - final _ret = _objc_msgSend_607(this.pointer, _sel_kind); - return NSXMLNodeKind.fromValue(_ret); + /// localNameForName: + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_localNameForName_, name.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// name - objc.NSString? get name { - final _ret = _objc_msgSend_20(this.pointer, _sel_name); + /// prefixForName: + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_prefixForName_, name.ref.pointer); 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); - } - - /// objectValue - objc.ObjCObjectBase? get objectValue { - final _ret = _objc_msgSend_83(this.pointer, _sel_objectValue); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// setObjectValue: - set objectValue(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setObjectValue_, value?.pointer ?? ffi.nullptr); - } - - /// stringValue - objc.NSString? get stringValue { - final _ret = _objc_msgSend_20(this.pointer, _sel_stringValue); + /// predefinedNamespaceForPrefix: + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_predefinedNamespaceForPrefix_, name.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// setStringValue: - set stringValue(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setStringValue_, value?.pointer ?? ffi.nullptr); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } +} - /// setStringValue:resolvingEntities: - void setStringValue_resolvingEntities_(objc.NSString string, bool resolve) { - _objc_msgSend_608(this.pointer, _sel_setStringValue_resolvingEntities_, - string.pointer, resolve); - } +late final _sel_entityDeclarationForName_ = + objc.registerName("entityDeclarationForName:"); +late final _sel_notationDeclarationForName_ = + objc.registerName("notationDeclarationForName:"); +late final _sel_elementDeclarationForName_ = + objc.registerName("elementDeclarationForName:"); +late final _sel_attributeDeclarationForName_elementName_ = + objc.registerName("attributeDeclarationForName:elementName:"); +late final _sel_predefinedEntityDeclarationForName_ = + objc.registerName("predefinedEntityDeclarationForName:"); - /// index - int get index { - return _objc_msgSend_57(this.pointer, _sel_index); - } +/// NSXMLDTD +class NSXMLDTD extends NSXMLNode { + NSXMLDTD._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// level - int get level { - return _objc_msgSend_57(this.pointer, _sel_level); - } + /// Constructs a [NSXMLDTD] that points to the same underlying object as [other]. + NSXMLDTD.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// rootDocument - NSXMLDocument? get rootDocument { - final _ret = _objc_msgSend_633(this.pointer, _sel_rootDocument); - return _ret.address == 0 - ? null - : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); - } + /// Constructs a [NSXMLDTD] that wraps the given raw object pointer. + NSXMLDTD.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// parent - NSXMLNode? get parent { - final _ret = _objc_msgSend_634(this.pointer, _sel_parent); - return _ret.address == 0 - ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSXMLDTD]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); } - /// childCount - int get childCount { - return _objc_msgSend_57(this.pointer, _sel_childCount); + /// init + NSXMLDTD init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - /// children - objc.NSArray? get children { - final _ret = _objc_msgSend_86(this.pointer, _sel_children); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// initWithKind:options: + NSXMLDTD initWithKind_options_(NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - /// childAtIndex: - NSXMLNode? childAtIndex_(int index) { - final _ret = _objc_msgSend_635(this.pointer, _sel_childAtIndex_, index); + /// initWithContentsOfURL:options:error: + NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, + NSXMLNodeOptions mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_1go5rz8( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_options_error_, + url.ref.pointer, + mask.value, + error); return _ret.address == 0 ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + : NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - /// previousSibling - NSXMLNode? get previousSibling { - final _ret = _objc_msgSend_634(this.pointer, _sel_previousSibling); + /// initWithData:options:error: + NSXMLDTD? initWithData_options_error_(objc.NSData data, NSXMLNodeOptions mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), + _sel_initWithData_options_error_, data.ref.pointer, mask.value, error); return _ret.address == 0 ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + : NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - /// nextSibling - NSXMLNode? get nextSibling { - final _ret = _objc_msgSend_634(this.pointer, _sel_nextSibling); + /// publicID + objc.NSString? get publicID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_publicID); return _ret.address == 0 ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// previousNode - NSXMLNode? get previousNode { - final _ret = _objc_msgSend_634(this.pointer, _sel_previousNode); - return _ret.address == 0 - ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + /// setPublicID: + set publicID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPublicID_, value?.ref.pointer ?? ffi.nullptr); } - /// nextNode - NSXMLNode? get nextNode { - final _ret = _objc_msgSend_634(this.pointer, _sel_nextNode); + /// systemID + objc.NSString? get systemID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_systemID); return _ret.address == 0 ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// detach - void detach() { - _objc_msgSend_7(this.pointer, _sel_detach); + /// setSystemID: + set systemID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setSystemID_, value?.ref.pointer ?? ffi.nullptr); } - /// XPath - objc.NSString? get XPath { - final _ret = _objc_msgSend_20(this.pointer, _sel_XPath); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// insertChild:atIndex: + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_cjm5ga( + this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); } - /// localName - objc.NSString? get localName { - final _ret = _objc_msgSend_20(this.pointer, _sel_localName); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// insertChildren:atIndex: + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, + children.ref.pointer, index); } - /// prefix - objc.NSString? get prefix { - final _ret = _objc_msgSend_20(this.pointer, _sel_prefix); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// removeChildAtIndex: + void removeChildAtIndex_(int index) { + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); } - /// URI - objc.NSString? get URI { - final _ret = _objc_msgSend_20(this.pointer, _sel_URI); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setChildren: + void setChildren_(objc.NSArray? children) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, + children?.ref.pointer ?? ffi.nullptr); } - /// setURI: - set URI(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setURI_, value?.pointer ?? ffi.nullptr); + /// addChild: + void addChild_(NSXMLNode child) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); } - /// localNameForName: - static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_306( - _class_NSXMLNode, _sel_localNameForName_, name.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// replaceChildAtIndex:withNode: + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, + index, node.ref.pointer); } - /// prefixForName: - static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = - _objc_msgSend_42(_class_NSXMLNode, _sel_prefixForName_, name.pointer); + /// entityDeclarationForName: + NSXMLDTDNode? entityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_entityDeclarationForName_, name.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - /// predefinedNamespaceForPrefix: - static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_622( - _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + /// notationDeclarationForName: + NSXMLDTDNode? notationDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_notationDeclarationForName_, name.ref.pointer); return _ret.address == 0 - ? null - : NSXMLNode.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); - } - - /// XMLString - objc.NSString get XMLString { - final _ret = _objc_msgSend_11(this.pointer, _sel_XMLString); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// XMLStringWithOptions: - objc.NSString XMLStringWithOptions_(NSXMLNodeOptions options) { - final _ret = _objc_msgSend_636( - this.pointer, _sel_XMLStringWithOptions_, options.value); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// canonicalXMLStringPreservingComments: - objc.NSString canonicalXMLStringPreservingComments_(bool comments) { - final _ret = _objc_msgSend_637( - this.pointer, _sel_canonicalXMLStringPreservingComments_, comments); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - /// nodesForXPath:error: - objc.NSArray? nodesForXPath_error_( - objc.NSString xpath, ffi.Pointer> error) { - final _ret = _objc_msgSend_290( - this.pointer, _sel_nodesForXPath_error_, xpath.pointer, error); + /// elementDeclarationForName: + NSXMLDTDNode? elementDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_elementDeclarationForName_, name.ref.pointer); return _ret.address == 0 ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - /// objectsForXQuery:constants:error: - objc.NSArray? objectsForXQuery_constants_error_( - objc.NSString xquery, - objc.NSDictionary? constants, - ffi.Pointer> error) { - final _ret = _objc_msgSend_638( - this.pointer, - _sel_objectsForXQuery_constants_error_, - xquery.pointer, - constants?.pointer ?? ffi.nullptr, - error); + /// attributeDeclarationForName:elementName: + NSXMLDTDNode? attributeDeclarationForName_elementName_( + objc.NSString name, objc.NSString elementName) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_attributeDeclarationForName_elementName_, + name.ref.pointer, + elementName.ref.pointer); return _ret.address == 0 ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - /// objectsForXQuery:error: - objc.NSArray? objectsForXQuery_error_( - objc.NSString xquery, ffi.Pointer> error) { - final _ret = _objc_msgSend_290( - this.pointer, _sel_objectsForXQuery_error_, xquery.pointer, error); + /// predefinedEntityDeclarationForName: + static NSXMLDTDNode? predefinedEntityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, + _sel_predefinedEntityDeclarationForName_, name.ref.pointer); return _ret.address == 0 ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - /// new - static NSXMLNode new1() { - final _ret = _objc_msgSend_19(_class_NSXMLNode, _sel_new); - return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + /// initWithKind: + NSXMLDTD initWithKind_(NSXMLNodeKind kind) { + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - /// allocWithZone: - static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28(_class_NSXMLNode, _sel_allocWithZone_, zone); - return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + /// document + static objc.ObjCObjectBase document() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLDTD, _sel_document); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// alloc - static NSXMLNode alloc() { - final _ret = _objc_msgSend_19(_class_NSXMLNode, _sel_alloc); - return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + /// documentWithRootElement: + static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_documentWithRootElement_, element.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - objc.ObjCObjectBase aTarget, - ffi.Pointer aSelector, - objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSXMLNode, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + /// elementWithName: + static objc.ObjCObjectBase elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_elementWithName_, name.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSXMLNode, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// elementWithName:URI: + static objc.ObjCObjectBase elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTD, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); + /// elementWithName:stringValue: + static objc.ObjCObjectBase elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSXMLNode, _sel_useStoredAccessor); + /// elementWithName:children:attributes: + static objc.ObjCObjectBase elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTD, + _sel_elementWithName_children_attributes_, + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSXMLNode, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + /// attributeWithName:stringValue: + static objc.ObjCObjectBase attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSXMLNode, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// attributeWithName:URI:stringValue: + static objc.ObjCObjectBase attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTD, + _sel_attributeWithName_URI_stringValue_, + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSXMLNode, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// namespaceWithName:stringValue: + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_33(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// processingInstructionWithName:stringValue: + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSXMLNode, _sel_classForKeyedUnarchiver); + /// commentWithStringValue: + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// textWithStringValue: + static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// DTDNodeWithXMLString: + static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// localNameForName: + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_localNameForName_, name.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// prefixForName: + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_prefixForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// predefinedNamespaceForPrefix: + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } } -late final _class_NSXMLNode = objc.getClass("NSXMLNode"); -late final _sel_initWithKind_ = objc.registerName("initWithKind:"); -final _objc_msgSend_603 = objc.msgSendPointer +late final _sel_DTD = objc.registerName("DTD"); +late final _sel_setDTD_ = objc.registerName("setDTD:"); +late final _sel_setRootElement_ = objc.registerName("setRootElement:"); +late final _sel_rootElement = objc.registerName("rootElement"); +late final _sel_XMLData = objc.registerName("XMLData"); +late final _sel_XMLDataWithOptions_ = objc.registerName("XMLDataWithOptions:"); +final _objc_msgSend_uvkejp = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_document = objc.registerName("document"); -late final _sel_documentWithRootElement_ = - objc.registerName("documentWithRootElement:"); -final _objc_msgSend_604 = 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_elementWithName_ = objc.registerName("elementWithName:"); -late final _sel_elementWithName_URI_ = - objc.registerName("elementWithName:URI:"); -final _objc_msgSend_605 = 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_elementWithName_stringValue_ = - objc.registerName("elementWithName:stringValue:"); -late final _sel_elementWithName_children_attributes_ = - objc.registerName("elementWithName:children:attributes:"); -final _objc_msgSend_606 = objc.msgSendPointer + ffi.Pointer, int)>(); +late final _sel_objectByApplyingXSLT_arguments_error_ = + objc.registerName("objectByApplyingXSLT:arguments:error:"); +final _objc_msgSend_1lpsn5w = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_attributeWithName_stringValue_ = - objc.registerName("attributeWithName:stringValue:"); -late final _sel_attributeWithName_URI_stringValue_ = - objc.registerName("attributeWithName:URI:stringValue:"); -late final _sel_namespaceWithName_stringValue_ = - objc.registerName("namespaceWithName:stringValue:"); -late final _sel_processingInstructionWithName_stringValue_ = - objc.registerName("processingInstructionWithName:stringValue:"); -late final _sel_commentWithStringValue_ = - objc.registerName("commentWithStringValue:"); -late final _sel_textWithStringValue_ = - objc.registerName("textWithStringValue:"); -late final _sel_DTDNodeWithXMLString_ = - objc.registerName("DTDNodeWithXMLString:"); -final _objc_msgSend_607 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_objectValue = objc.registerName("objectValue"); -late final _sel_setObjectValue_ = objc.registerName("setObjectValue:"); -late final _sel_stringValue = objc.registerName("stringValue"); -late final _sel_setStringValue_ = objc.registerName("setStringValue:"); -late final _sel_setStringValue_resolvingEntities_ = - objc.registerName("setStringValue:resolvingEntities:"); -final _objc_msgSend_608 = 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_index = objc.registerName("index"); -late final _sel_level = objc.registerName("level"); + ffi.Pointer>)>(); +late final _sel_objectByApplyingXSLTString_arguments_error_ = + objc.registerName("objectByApplyingXSLTString:arguments:error:"); +late final _sel_objectByApplyingXSLTAtURL_arguments_error_ = + objc.registerName("objectByApplyingXSLTAtURL:arguments:error:"); +late final _sel_validateAndReturnError_ = + objc.registerName("validateAndReturnError:"); /// NSXMLDocument class NSXMLDocument extends NSXMLNode { @@ -33807,7 +34788,7 @@ class NSXMLDocument extends NSXMLNode { /// Constructs a [NSXMLDocument] that points to the same underlying object as [other]. NSXMLDocument.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSXMLDocument] that wraps the given raw object pointer. NSXMLDocument.castFromPointer(ffi.Pointer other, @@ -33816,72 +34797,74 @@ class NSXMLDocument extends NSXMLNode { /// Returns whether [obj] is an instance of [NSXMLDocument]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); } /// init NSXMLDocument init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithXMLString:options:error: NSXMLDocument? initWithXMLString_options_error_(objc.NSString string, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_609( - this.pointer, + final _ret = _objc_msgSend_1go5rz8( + this.ref.retainAndReturnPointer(), _sel_initWithXMLString_options_error_, - string.pointer, + string.ref.pointer, mask.value, error); return _ret.address == 0 ? null - : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithContentsOfURL:options:error: NSXMLDocument? initWithContentsOfURL_options_error_(objc.NSURL url, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_610( - this.pointer, + final _ret = _objc_msgSend_1go5rz8( + this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_options_error_, - url.pointer, + url.ref.pointer, mask.value, error); return _ret.address == 0 ? null - : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithData:options:error: NSXMLDocument? initWithData_options_error_(objc.NSData data, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_611(this.pointer, - _sel_initWithData_options_error_, data.pointer, mask.value, error); + final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), + _sel_initWithData_options_error_, data.ref.pointer, mask.value, error); return _ret.address == 0 ? null - : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithRootElement: NSXMLDocument initWithRootElement_(NSXMLElement? element) { - final _ret = _objc_msgSend_612(this.pointer, _sel_initWithRootElement_, - element?.pointer ?? ffi.nullptr); - return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithRootElement_, element?.ref.pointer ?? ffi.nullptr); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// replacementClassForClass: static objc.ObjCObjectBase replacementClassForClass_( objc.ObjCObjectBase cls) { - final _ret = _objc_msgSend_613( - _class_NSXMLDocument, _sel_replacementClassForClass_, cls.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_replacementClassForClass_, cls.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// characterEncoding objc.NSString? get characterEncoding { - final _ret = _objc_msgSend_20(this.pointer, _sel_characterEncoding); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_characterEncoding); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -33889,13 +34872,13 @@ class NSXMLDocument extends NSXMLNode { /// setCharacterEncoding: set characterEncoding(objc.NSString? value) { - return _objc_msgSend_21(this.pointer, _sel_setCharacterEncoding_, - value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCharacterEncoding_, + value?.ref.pointer ?? ffi.nullptr); } /// version objc.NSString? get version { - final _ret = _objc_msgSend_20(this.pointer, _sel_version); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_version); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -33903,35 +34886,36 @@ class NSXMLDocument extends NSXMLNode { /// setVersion: set version(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setVersion_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setVersion_, value?.ref.pointer ?? ffi.nullptr); } /// isStandalone bool get standalone { - return _objc_msgSend_13(this.pointer, _sel_isStandalone); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isStandalone); } /// setStandalone: set standalone(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setStandalone_, value); + return _objc_msgSend_117qins(this.ref.pointer, _sel_setStandalone_, value); } /// documentContentKind NSXMLDocumentContentKind get documentContentKind { - final _ret = _objc_msgSend_614(this.pointer, _sel_documentContentKind); + final _ret = + _objc_msgSend_vx3pa9(this.ref.pointer, _sel_documentContentKind); return NSXMLDocumentContentKind.fromValue(_ret); } /// setDocumentContentKind: set documentContentKind(NSXMLDocumentContentKind value) { - return _objc_msgSend_615( - this.pointer, _sel_setDocumentContentKind_, value.value); + return _objc_msgSend_zmck60( + this.ref.pointer, _sel_setDocumentContentKind_, value.value); } /// MIMEType objc.NSString? get MIMEType { - final _ret = _objc_msgSend_20(this.pointer, _sel_MIMEType); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_MIMEType); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -33939,13 +34923,13 @@ class NSXMLDocument extends NSXMLNode { /// setMIMEType: set MIMEType(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setMIMEType_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMIMEType_, value?.ref.pointer ?? ffi.nullptr); } /// DTD NSXMLDTD? get DTD { - final _ret = _objc_msgSend_625(this.pointer, _sel_DTD); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_DTD); return _ret.address == 0 ? null : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); @@ -33953,18 +34937,19 @@ class NSXMLDocument extends NSXMLNode { /// setDTD: set DTD(NSXMLDTD? value) { - return _objc_msgSend_626( - this.pointer, _sel_setDTD_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDTD_, value?.ref.pointer ?? ffi.nullptr); } /// setRootElement: void setRootElement_(NSXMLElement root) { - _objc_msgSend_627(this.pointer, _sel_setRootElement_, root.pointer); + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setRootElement_, root.ref.pointer); } /// rootElement NSXMLElement? rootElement() { - final _ret = _objc_msgSend_628(this.pointer, _sel_rootElement); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_rootElement); return _ret.address == 0 ? null : NSXMLElement.castFromPointer(_ret, retain: true, release: true); @@ -33972,48 +34957,48 @@ class NSXMLDocument extends NSXMLNode { /// insertChild:atIndex: void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_616( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + _objc_msgSend_cjm5ga( + this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); } /// insertChildren:atIndex: void insertChildren_atIndex_(objc.NSArray children, int index) { - _objc_msgSend_617( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, + children.ref.pointer, index); } /// removeChildAtIndex: void removeChildAtIndex_(int index) { - _objc_msgSend_422(this.pointer, _sel_removeChildAtIndex_, index); + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); } /// setChildren: void setChildren_(objc.NSArray? children) { - _objc_msgSend_269( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, + children?.ref.pointer ?? ffi.nullptr); } /// addChild: void addChild_(NSXMLNode child) { - _objc_msgSend_618(this.pointer, _sel_addChild_, child.pointer); + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); } /// replaceChildAtIndex:withNode: void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_619( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, + index, node.ref.pointer); } /// XMLData objc.NSData get XMLData { - final _ret = _objc_msgSend_113(this.pointer, _sel_XMLData); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_XMLData); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// XMLDataWithOptions: objc.NSData XMLDataWithOptions_(NSXMLNodeOptions options) { - final _ret = _objc_msgSend_629( - this.pointer, _sel_XMLDataWithOptions_, options.value); + final _ret = _objc_msgSend_uvkejp( + this.ref.pointer, _sel_XMLDataWithOptions_, options.value); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } @@ -34022,11 +35007,11 @@ class NSXMLDocument extends NSXMLNode { objc.NSData xslt, objc.NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _objc_msgSend_630( - this.pointer, + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, _sel_objectByApplyingXSLT_arguments_error_, - xslt.pointer, - arguments?.pointer ?? ffi.nullptr, + xslt.ref.pointer, + arguments?.ref.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null @@ -34038,11 +35023,11 @@ class NSXMLDocument extends NSXMLNode { objc.NSString xslt, objc.NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _objc_msgSend_631( - this.pointer, + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, _sel_objectByApplyingXSLTString_arguments_error_, - xslt.pointer, - arguments?.pointer ?? ffi.nullptr, + xslt.ref.pointer, + arguments?.ref.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null @@ -34054,11 +35039,11 @@ class NSXMLDocument extends NSXMLNode { objc.NSURL xsltURL, objc.NSDictionary? argument, ffi.Pointer> error) { - final _ret = _objc_msgSend_632( - this.pointer, + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, _sel_objectByApplyingXSLTAtURL_arguments_error_, - xsltURL.pointer, - argument?.pointer ?? ffi.nullptr, + xsltURL.ref.pointer, + argument?.ref.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null @@ -34068,1220 +35053,740 @@ class NSXMLDocument extends NSXMLNode { /// validateAndReturnError: bool validateAndReturnError_( ffi.Pointer> error) { - return _objc_msgSend_39(this.pointer, _sel_validateAndReturnError_, error); + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_validateAndReturnError_, error); } /// initWithKind: NSXMLDocument initWithKind_(NSXMLNodeKind kind) { - final _ret = - _objc_msgSend_603(this.pointer, _sel_initWithKind_, kind.value); - return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithKind:options: NSXMLDocument initWithKind_options_( NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_601( - this.pointer, _sel_initWithKind_options_, kind.value, options.value); - return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// document static objc.ObjCObjectBase document() { - final _ret = _objc_msgSend_19(_class_NSXMLDocument, _sel_document); + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLDocument, _sel_document); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_604( - _class_NSXMLDocument, _sel_documentWithRootElement_, element.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_63( - _class_NSXMLDocument, _sel_elementWithName_, name.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: static objc.ObjCObjectBase elementWithName_URI_( objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_605(_class_NSXMLDocument, - _sel_elementWithName_URI_, name.pointer, URI.pointer); + final _ret = _objc_msgSend_iq11qg(_class_NSXMLDocument, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: static objc.ObjCObjectBase elementWithName_stringValue_( objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_605(_class_NSXMLDocument, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: static objc.ObjCObjectBase elementWithName_children_attributes_( objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_606( + final _ret = _objc_msgSend_aud7dn( _class_NSXMLDocument, _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: static objc.ObjCObjectBase attributeWithName_stringValue_( objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLDocument, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: static objc.ObjCObjectBase attributeWithName_URI_stringValue_( objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_567( + final _ret = _objc_msgSend_aud7dn( _class_NSXMLDocument, _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLDocument, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605( - _class_NSXMLDocument, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_( - objc.NSString stringValue) { - final _ret = _objc_msgSend_63(_class_NSXMLDocument, - _sel_commentWithStringValue_, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// textWithStringValue: - static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLDocument, _sel_textWithStringValue_, stringValue.pointer); + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// DTDNodeWithXMLString: - static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_35( - _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.pointer); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// localNameForName: - static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_306( - _class_NSXMLDocument, _sel_localNameForName_, name.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// prefixForName: - static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_42( - _class_NSXMLDocument, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// predefinedNamespaceForPrefix: - static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_622( - _class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); - } -} - -late final _class_NSXMLDocument = objc.getClass("NSXMLDocument"); -late final _sel_initWithXMLString_options_error_ = - objc.registerName("initWithXMLString:options:error:"); -final _objc_msgSend_609 = 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_initWithContentsOfURL_options_error_ = - objc.registerName("initWithContentsOfURL:options:error:"); -final _objc_msgSend_610 = 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_initWithData_options_error_ = - objc.registerName("initWithData:options:error:"); -final _objc_msgSend_611 = 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_initWithRootElement_ = - objc.registerName("initWithRootElement:"); -final _objc_msgSend_612 = 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_replacementClassForClass_ = - objc.registerName("replacementClassForClass:"); -final _objc_msgSend_613 = 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_characterEncoding = objc.registerName("characterEncoding"); -late final _sel_setCharacterEncoding_ = - objc.registerName("setCharacterEncoding:"); -late final _sel_setVersion_ = objc.registerName("setVersion:"); -late final _sel_isStandalone = objc.registerName("isStandalone"); -late final _sel_setStandalone_ = objc.registerName("setStandalone:"); - -enum NSXMLDocumentContentKind { - NSXMLDocumentXMLKind(0), - NSXMLDocumentXHTMLKind(1), - NSXMLDocumentHTMLKind(2), - NSXMLDocumentTextKind(3); - - final int value; - const NSXMLDocumentContentKind(this.value); - - static NSXMLDocumentContentKind fromValue(int value) => switch (value) { - 0 => NSXMLDocumentXMLKind, - 1 => NSXMLDocumentXHTMLKind, - 2 => NSXMLDocumentHTMLKind, - 3 => NSXMLDocumentTextKind, - _ => throw ArgumentError( - "Unknown value for NSXMLDocumentContentKind: $value"), - }; -} - -late final _sel_documentContentKind = objc.registerName("documentContentKind"); -final _objc_msgSend_614 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDocumentContentKind_ = - objc.registerName("setDocumentContentKind:"); -final _objc_msgSend_615 = 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_setMIMEType_ = objc.registerName("setMIMEType:"); - -/// NSXMLDTD -class NSXMLDTD extends NSXMLNode { - NSXMLDTD._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSXMLDTD] that points to the same underlying object as [other]. - NSXMLDTD.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [NSXMLDTD] that wraps the given raw object pointer. - NSXMLDTD.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSXMLDTD]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); - } - - /// init - NSXMLDTD init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithKind:options: - NSXMLDTD initWithKind_options_(NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_601( - this.pointer, _sel_initWithKind_options_, kind.value, options.value); - return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithContentsOfURL:options:error: - NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, - NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_610( - this.pointer, - _sel_initWithContentsOfURL_options_error_, - url.pointer, - mask.value, - error); - return _ret.address == 0 - ? null - : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithData:options:error: - NSXMLDTD? initWithData_options_error_(objc.NSData data, NSXMLNodeOptions mask, - ffi.Pointer> error) { - final _ret = _objc_msgSend_611(this.pointer, - _sel_initWithData_options_error_, data.pointer, mask.value, error); - return _ret.address == 0 - ? null - : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); - } - - /// 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); - } - - /// setPublicID: - set publicID(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); - } - - /// 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); - } - - /// setSystemID: - set systemID(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); - } - - /// insertChild:atIndex: - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_616( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); - } - - /// insertChildren:atIndex: - void insertChildren_atIndex_(objc.NSArray children, int index) { - _objc_msgSend_617( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); - } - - /// removeChildAtIndex: - void removeChildAtIndex_(int index) { - _objc_msgSend_422(this.pointer, _sel_removeChildAtIndex_, index); + /// namespaceWithName:stringValue: + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// setChildren: - void setChildren_(objc.NSArray? children) { - _objc_msgSend_269( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + /// processingInstructionWithName:stringValue: + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// addChild: - void addChild_(NSXMLNode child) { - _objc_msgSend_618(this.pointer, _sel_addChild_, child.pointer); + /// commentWithStringValue: + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_commentWithStringValue_, stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// replaceChildAtIndex:withNode: - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_619( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + /// textWithStringValue: + static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_textWithStringValue_, stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// entityDeclarationForName: - NSXMLDTDNode? entityDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_623( - this.pointer, _sel_entityDeclarationForName_, name.pointer); + /// DTDNodeWithXMLString: + static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.ref.pointer); return _ret.address == 0 ? null - : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// notationDeclarationForName: - NSXMLDTDNode? notationDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_623( - this.pointer, _sel_notationDeclarationForName_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + /// localNameForName: + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_localNameForName_, name.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// elementDeclarationForName: - NSXMLDTDNode? elementDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_623( - this.pointer, _sel_elementDeclarationForName_, name.pointer); + /// prefixForName: + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_prefixForName_, name.ref.pointer); return _ret.address == 0 ? null - : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// attributeDeclarationForName:elementName: - NSXMLDTDNode? attributeDeclarationForName_elementName_( - objc.NSString name, objc.NSString elementName) { - final _ret = _objc_msgSend_624( - this.pointer, - _sel_attributeDeclarationForName_elementName_, - name.pointer, - elementName.pointer); + /// predefinedNamespaceForPrefix: + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_predefinedNamespaceForPrefix_, name.ref.pointer); return _ret.address == 0 ? null - : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } +} - /// predefinedEntityDeclarationForName: - static NSXMLDTDNode? predefinedEntityDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_623(_class_NSXMLDTD, - _sel_predefinedEntityDeclarationForName_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); +late final _sel_rootDocument = objc.registerName("rootDocument"); +late final _sel_parent = objc.registerName("parent"); +late final _sel_childCount = objc.registerName("childCount"); +late final _sel_children = objc.registerName("children"); +late final _sel_childAtIndex_ = objc.registerName("childAtIndex:"); +late final _sel_previousSibling = objc.registerName("previousSibling"); +late final _sel_nextSibling = objc.registerName("nextSibling"); +late final _sel_previousNode = objc.registerName("previousNode"); +late final _sel_nextNode = objc.registerName("nextNode"); +late final _sel_detach = objc.registerName("detach"); +late final _sel_XPath = objc.registerName("XPath"); +late final _sel_localName = objc.registerName("localName"); +late final _sel_prefix = objc.registerName("prefix"); +late final _sel_URI = objc.registerName("URI"); +late final _sel_setURI_ = objc.registerName("setURI:"); +late final _sel_XMLString = objc.registerName("XMLString"); +late final _sel_XMLStringWithOptions_ = + objc.registerName("XMLStringWithOptions:"); +late final _sel_canonicalXMLStringPreservingComments_ = + objc.registerName("canonicalXMLStringPreservingComments:"); +late final _sel_nodesForXPath_error_ = + objc.registerName("nodesForXPath:error:"); +late final _sel_objectsForXQuery_constants_error_ = + objc.registerName("objectsForXQuery:constants:error:"); +late final _sel_objectsForXQuery_error_ = + objc.registerName("objectsForXQuery:error:"); + +/// NSXMLNode +class NSXMLNode extends objc.NSObject { + NSXMLNode._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLNode] that points to the same underlying object as [other]. + NSXMLNode.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSXMLNode] that wraps the given raw object pointer. + NSXMLNode.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLNode); } - /// initWithKind: - NSXMLDTD initWithKind_(NSXMLNodeKind kind) { + /// init + NSXMLNode init() { final _ret = - _objc_msgSend_603(this.pointer, _sel_initWithKind_, kind.value); - return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithKind: + NSXMLNode initWithKind_(NSXMLNodeKind kind) { + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithKind:options: + NSXMLNode initWithKind_options_( + NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } /// document static objc.ObjCObjectBase document() { - final _ret = _objc_msgSend_19(_class_NSXMLDTD, _sel_document); + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLNode, _sel_document); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_604( - _class_NSXMLDTD, _sel_documentWithRootElement_, element.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = - _objc_msgSend_63(_class_NSXMLDTD, _sel_elementWithName_, name.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: static objc.ObjCObjectBase elementWithName_URI_( objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_605( - _class_NSXMLDTD, _sel_elementWithName_URI_, name.pointer, URI.pointer); + final _ret = _objc_msgSend_iq11qg(_class_NSXMLNode, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: static objc.ObjCObjectBase elementWithName_stringValue_( objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_605(_class_NSXMLDTD, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: static objc.ObjCObjectBase elementWithName_children_attributes_( objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_606( - _class_NSXMLDTD, + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLNode, _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: static objc.ObjCObjectBase attributeWithName_stringValue_( objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLDTD, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: static objc.ObjCObjectBase attributeWithName_URI_stringValue_( objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_567( - _class_NSXMLDTD, + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLNode, _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// namespaceWithName:stringValue: static objc.ObjCObjectBase namespaceWithName_stringValue_( objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLDTD, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// processingInstructionWithName:stringValue: static objc.ObjCObjectBase processingInstructionWithName_stringValue_( objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605( - _class_NSXMLDTD, + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// commentWithStringValue: static objc.ObjCObjectBase commentWithStringValue_( objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, + _sel_commentWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// textWithStringValue: static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// DTDNodeWithXMLString: static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_35( - _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.ref.pointer); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// localNameForName: - static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_306( - _class_NSXMLDTD, _sel_localNameForName_, name.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// kind + NSXMLNodeKind get kind { + final _ret = _objc_msgSend_1edk5dx(this.ref.pointer, _sel_kind); + return NSXMLNodeKind.fromValue(_ret); } - /// prefixForName: - static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = - _objc_msgSend_42(_class_NSXMLDTD, _sel_prefixForName_, name.pointer); + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// predefinedNamespaceForPrefix: - static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_622( - _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.pointer); + /// setName: + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); + } + + /// objectValue + objc.ObjCObjectBase? get objectValue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_objectValue); return _ret.address == 0 ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_NSXMLDTD = objc.getClass("NSXMLDTD"); -late final _sel_setPublicID_ = objc.registerName("setPublicID:"); -late final _sel_setSystemID_ = objc.registerName("setSystemID:"); -late final _sel_insertChild_atIndex_ = - objc.registerName("insertChild:atIndex:"); -final _objc_msgSend_616 = 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_insertChildren_atIndex_ = - objc.registerName("insertChildren:atIndex:"); -final _objc_msgSend_617 = 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_removeChildAtIndex_ = objc.registerName("removeChildAtIndex:"); -late final _sel_setChildren_ = objc.registerName("setChildren:"); -late final _sel_addChild_ = objc.registerName("addChild:"); -final _objc_msgSend_618 = 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_replaceChildAtIndex_withNode_ = - objc.registerName("replaceChildAtIndex:withNode:"); -final _objc_msgSend_619 = 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)>(); - -/// NSXMLDTDNode -class NSXMLDTDNode extends NSXMLNode { - NSXMLDTDNode._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSXMLDTDNode] that points to the same underlying object as [other]. - NSXMLDTDNode.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [NSXMLDTDNode] that wraps the given raw object pointer. - NSXMLDTDNode.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSXMLDTDNode]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); + /// setObjectValue: + set objectValue(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setObjectValue_, + value?.ref.pointer ?? ffi.nullptr); } - /// initWithXMLString: - NSXMLDTDNode? initWithXMLString_(objc.NSString string) { - final _ret = - _objc_msgSend_35(this.pointer, _sel_initWithXMLString_, string.pointer); + /// stringValue + objc.NSString? get stringValue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_stringValue); return _ret.address == 0 ? null - : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// initWithKind:options: - NSXMLDTDNode initWithKind_options_( - NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_601( - this.pointer, _sel_initWithKind_options_, kind.value, options.value); - return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + /// setStringValue: + set stringValue(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStringValue_, + value?.ref.pointer ?? ffi.nullptr); } - /// init - NSXMLDTDNode init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + /// setStringValue:resolvingEntities: + void setStringValue_resolvingEntities_(objc.NSString string, bool resolve) { + _objc_msgSend_1n1qwdd(this.ref.pointer, + _sel_setStringValue_resolvingEntities_, string.ref.pointer, resolve); } - /// DTDKind - NSXMLDTDNodeKind get DTDKind { - final _ret = _objc_msgSend_620(this.pointer, _sel_DTDKind); - return NSXMLDTDNodeKind.fromValue(_ret); + /// index + int get index { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_index); + } + + /// level + int get level { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_level); + } + + /// rootDocument + NSXMLDocument? get rootDocument { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_rootDocument); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - /// setDTDKind: - set DTDKind(NSXMLDTDNodeKind value) { - return _objc_msgSend_621(this.pointer, _sel_setDTDKind_, value.value); + /// parent + NSXMLNode? get parent { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_parent); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// isExternal - bool get external1 { - return _objc_msgSend_13(this.pointer, _sel_isExternal); + /// childCount + int get childCount { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_childCount); } - /// publicID - objc.NSString? get publicID { - final _ret = _objc_msgSend_20(this.pointer, _sel_publicID); + /// children + objc.NSArray? get children { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_children); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setPublicID: - set publicID(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + /// childAtIndex: + NSXMLNode? childAtIndex_(int index) { + final _ret = + _objc_msgSend_ehxl2g(this.ref.pointer, _sel_childAtIndex_, index); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// systemID - objc.NSString? get systemID { - final _ret = _objc_msgSend_20(this.pointer, _sel_systemID); + /// previousSibling + NSXMLNode? get previousSibling { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_previousSibling); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// setSystemID: - set systemID(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); + /// nextSibling + NSXMLNode? get nextSibling { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_nextSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// notationName - objc.NSString? get notationName { - final _ret = _objc_msgSend_20(this.pointer, _sel_notationName); + /// previousNode + NSXMLNode? get previousNode { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_previousNode); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// setNotationName: - set notationName(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setNotationName_, value?.pointer ?? ffi.nullptr); + /// nextNode + NSXMLNode? get nextNode { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_nextNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// initWithKind: - NSXMLDTDNode initWithKind_(NSXMLNodeKind kind) { - final _ret = - _objc_msgSend_603(this.pointer, _sel_initWithKind_, kind.value); - return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + /// detach + void detach() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_detach); } - /// document - static objc.ObjCObjectBase document() { - final _ret = _objc_msgSend_19(_class_NSXMLDTDNode, _sel_document); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// XPath + objc.NSString? get XPath { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_XPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// documentWithRootElement: - static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_604( - _class_NSXMLDTDNode, _sel_documentWithRootElement_, element.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// localName + objc.NSString? get localName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// elementWithName: - static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_63( - _class_NSXMLDTDNode, _sel_elementWithName_, name.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// prefix + objc.NSString? get prefix { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_prefix); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// elementWithName:URI: - static objc.ObjCObjectBase elementWithName_URI_( - objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_605(_class_NSXMLDTDNode, - _sel_elementWithName_URI_, name.pointer, URI.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// URI + objc.NSString? get URI { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URI); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// elementWithName:stringValue: - static objc.ObjCObjectBase elementWithName_stringValue_( - objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_605(_class_NSXMLDTDNode, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setURI: + set URI(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURI_, value?.ref.pointer ?? ffi.nullptr); } - /// elementWithName:children:attributes: - static objc.ObjCObjectBase elementWithName_children_attributes_( - objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_606( - _class_NSXMLDTDNode, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// localNameForName: + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_localNameForName_, name.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// attributeWithName:stringValue: - static objc.ObjCObjectBase attributeWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLDTDNode, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// prefixForName: + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_prefixForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// attributeWithName:URI:stringValue: - static objc.ObjCObjectBase attributeWithName_URI_stringValue_( - objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_567( - _class_NSXMLDTDNode, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// predefinedNamespaceForPrefix: + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605(_class_NSXMLDTDNode, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// description + objc.NSString get description { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_( - objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_605( - _class_NSXMLDTDNode, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// XMLString + objc.NSString get XMLString { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_XMLString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_( - objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// XMLStringWithOptions: + objc.NSString XMLStringWithOptions_(NSXMLNodeOptions options) { + final _ret = _objc_msgSend_uvkejp( + this.ref.pointer, _sel_XMLStringWithOptions_, options.value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// textWithStringValue: - static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_63( - _class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// canonicalXMLStringPreservingComments: + objc.NSString canonicalXMLStringPreservingComments_(bool comments) { + final _ret = _objc_msgSend_1upz917( + this.ref.pointer, _sel_canonicalXMLStringPreservingComments_, comments); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// DTDNodeWithXMLString: - static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_35( - _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.pointer); + /// nodesForXPath:error: + objc.NSArray? nodesForXPath_error_( + objc.NSString xpath, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh( + this.ref.pointer, _sel_nodesForXPath_error_, xpath.ref.pointer, error); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// localNameForName: - static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_306( - _class_NSXMLDTDNode, _sel_localNameForName_, name.pointer); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// prefixForName: - static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_42( - _class_NSXMLDTDNode, _sel_prefixForName_, name.pointer); + /// objectsForXQuery:constants:error: + objc.NSArray? objectsForXQuery_constants_error_( + objc.NSString xquery, + objc.NSDictionary? constants, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, + _sel_objectsForXQuery_constants_error_, + xquery.ref.pointer, + constants?.ref.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// predefinedNamespaceForPrefix: - static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_622( - _class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + /// objectsForXQuery:error: + objc.NSArray? objectsForXQuery_error_( + objc.NSString xquery, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_objectsForXQuery_error_, xquery.ref.pointer, error); return _ret.address == 0 ? null - : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} -late final _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); -late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); + /// new + static NSXMLNode new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLNode, _sel_new); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } -enum NSXMLDTDNodeKind { - NSXMLEntityGeneralKind(1), - NSXMLEntityParsedKind(2), - NSXMLEntityUnparsedKind(3), - NSXMLEntityParameterKind(4), - NSXMLEntityPredefined(5), - NSXMLAttributeCDATAKind(6), - NSXMLAttributeIDKind(7), - NSXMLAttributeIDRefKind(8), - NSXMLAttributeIDRefsKind(9), - NSXMLAttributeEntityKind(10), - NSXMLAttributeEntitiesKind(11), - NSXMLAttributeNMTokenKind(12), - NSXMLAttributeNMTokensKind(13), - NSXMLAttributeEnumerationKind(14), - NSXMLAttributeNotationKind(15), - NSXMLElementDeclarationUndefinedKind(16), - NSXMLElementDeclarationEmptyKind(17), - NSXMLElementDeclarationAnyKind(18), - NSXMLElementDeclarationMixedKind(19), - NSXMLElementDeclarationElementKind(20); + /// allocWithZone: + static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSXMLNode, _sel_allocWithZone_, zone); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } - final int value; - const NSXMLDTDNodeKind(this.value); + /// alloc + static NSXMLNode alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLNode, _sel_alloc); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } - static NSXMLDTDNodeKind fromValue(int value) => switch (value) { - 1 => NSXMLEntityGeneralKind, - 2 => NSXMLEntityParsedKind, - 3 => NSXMLEntityUnparsedKind, - 4 => NSXMLEntityParameterKind, - 5 => NSXMLEntityPredefined, - 6 => NSXMLAttributeCDATAKind, - 7 => NSXMLAttributeIDKind, - 8 => NSXMLAttributeIDRefKind, - 9 => NSXMLAttributeIDRefsKind, - 10 => NSXMLAttributeEntityKind, - 11 => NSXMLAttributeEntitiesKind, - 12 => NSXMLAttributeNMTokenKind, - 13 => NSXMLAttributeNMTokensKind, - 14 => NSXMLAttributeEnumerationKind, - 15 => NSXMLAttributeNotationKind, - 16 => NSXMLElementDeclarationUndefinedKind, - 17 => NSXMLElementDeclarationEmptyKind, - 18 => NSXMLElementDeclarationAnyKind, - 19 => NSXMLElementDeclarationMixedKind, - 20 => NSXMLElementDeclarationElementKind, - _ => throw ArgumentError("Unknown value for NSXMLDTDNodeKind: $value"), - }; -} + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } -late final _sel_DTDKind = objc.registerName("DTDKind"); -final _objc_msgSend_620 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); -final _objc_msgSend_621 = 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_isExternal = objc.registerName("isExternal"); -late final _sel_notationName = objc.registerName("notationName"); -late final _sel_setNotationName_ = objc.registerName("setNotationName:"); -late final _sel_localNameForName_ = objc.registerName("localNameForName:"); -late final _sel_prefixForName_ = objc.registerName("prefixForName:"); -late final _sel_predefinedNamespaceForPrefix_ = - objc.registerName("predefinedNamespaceForPrefix:"); -final _objc_msgSend_622 = 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_entityDeclarationForName_ = - objc.registerName("entityDeclarationForName:"); -final _objc_msgSend_623 = 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_notationDeclarationForName_ = - objc.registerName("notationDeclarationForName:"); -late final _sel_elementDeclarationForName_ = - objc.registerName("elementDeclarationForName:"); -late final _sel_attributeDeclarationForName_elementName_ = - objc.registerName("attributeDeclarationForName:elementName:"); -final _objc_msgSend_624 = 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_predefinedEntityDeclarationForName_ = - objc.registerName("predefinedEntityDeclarationForName:"); -late final _sel_DTD = objc.registerName("DTD"); -final _objc_msgSend_625 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDTD_ = objc.registerName("setDTD:"); -final _objc_msgSend_626 = 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_setRootElement_ = objc.registerName("setRootElement:"); -final _objc_msgSend_627 = 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_rootElement = objc.registerName("rootElement"); -final _objc_msgSend_628 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_XMLData = objc.registerName("XMLData"); -late final _sel_XMLDataWithOptions_ = objc.registerName("XMLDataWithOptions:"); -final _objc_msgSend_629 = 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_objectByApplyingXSLT_arguments_error_ = - objc.registerName("objectByApplyingXSLT:arguments:error:"); -final _objc_msgSend_630 = 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_objectByApplyingXSLTString_arguments_error_ = - objc.registerName("objectByApplyingXSLTString:arguments:error:"); -final _objc_msgSend_631 = 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_objectByApplyingXSLTAtURL_arguments_error_ = - objc.registerName("objectByApplyingXSLTAtURL:arguments:error:"); -final _objc_msgSend_632 = 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_validateAndReturnError_ = - objc.registerName("validateAndReturnError:"); -late final _sel_rootDocument = objc.registerName("rootDocument"); -final _objc_msgSend_633 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_parent = objc.registerName("parent"); -final _objc_msgSend_634 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_childCount = objc.registerName("childCount"); -late final _sel_children = objc.registerName("children"); -late final _sel_childAtIndex_ = objc.registerName("childAtIndex:"); -final _objc_msgSend_635 = 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_previousSibling = objc.registerName("previousSibling"); -late final _sel_nextSibling = objc.registerName("nextSibling"); -late final _sel_previousNode = objc.registerName("previousNode"); -late final _sel_nextNode = objc.registerName("nextNode"); -late final _sel_detach = objc.registerName("detach"); -late final _sel_XPath = objc.registerName("XPath"); -late final _sel_localName = objc.registerName("localName"); -late final _sel_prefix = objc.registerName("prefix"); -late final _sel_URI = objc.registerName("URI"); -late final _sel_setURI_ = objc.registerName("setURI:"); -late final _sel_XMLString = objc.registerName("XMLString"); -late final _sel_XMLStringWithOptions_ = - objc.registerName("XMLStringWithOptions:"); -final _objc_msgSend_636 = 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_canonicalXMLStringPreservingComments_ = - objc.registerName("canonicalXMLStringPreservingComments:"); -final _objc_msgSend_637 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, bool)>(); -late final _sel_nodesForXPath_error_ = - objc.registerName("nodesForXPath:error:"); -late final _sel_objectsForXQuery_constants_error_ = - objc.registerName("objectsForXQuery:constants:error:"); -final _objc_msgSend_638 = 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_objectsForXQuery_error_ = - objc.registerName("objectsForXQuery:error:"); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSXMLNode, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSXMLNode, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSXMLNode, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSXMLNode, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSXMLNode self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSXMLNode retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSXMLNode autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLElement = objc.getClass("NSXMLElement"); +late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); +late final _sel_initWithName_stringValue_ = + objc.registerName("initWithName:stringValue:"); +late final _sel_initWithXMLString_error_ = + objc.registerName("initWithXMLString:error:"); +late final _sel_elementsForName_ = objc.registerName("elementsForName:"); +late final _sel_elementsForLocalName_URI_ = + objc.registerName("elementsForLocalName:URI:"); late final _sel_addAttribute_ = objc.registerName("addAttribute:"); late final _sel_removeAttributeForName_ = objc.registerName("removeAttributeForName:"); @@ -35289,33 +35794,9 @@ late final _sel_attributes = objc.registerName("attributes"); late final _sel_setAttributes_ = objc.registerName("setAttributes:"); late final _sel_setAttributesWithDictionary_ = objc.registerName("setAttributesWithDictionary:"); -final _objc_msgSend_639 = 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_attributeForName_ = objc.registerName("attributeForName:"); late final _sel_attributeForLocalName_URI_ = objc.registerName("attributeForLocalName:URI:"); -final _objc_msgSend_640 = 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_addNamespace_ = objc.registerName("addNamespace:"); late final _sel_removeNamespaceForPrefix_ = objc.registerName("removeNamespaceForPrefix:"); @@ -35331,230 +35812,644 @@ late final _sel_normalizeAdjacentTextNodesPreservingCDATA_ = late final _sel_setAttributesAsDictionary_ = objc.registerName("setAttributesAsDictionary:"); -/// NSScriptClassDescription -class NSScriptClassDescription extends NSClassDescription { - NSScriptClassDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +/// NSXMLElement +class NSXMLElement extends NSXMLNode { + NSXMLElement._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLElement] that points to the same underlying object as [other]. + NSXMLElement.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSXMLElement] that wraps the given raw object pointer. + NSXMLElement.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLElement]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLElement); + } + + /// initWithName: + NSXMLElement initWithName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithName_, name.ref.pointer); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithName:URI: + NSXMLElement initWithName_URI_(objc.NSString name, objc.NSString? URI) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithName_URI_, + name.ref.pointer, + URI?.ref.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithName:stringValue: + NSXMLElement initWithName_stringValue_( + objc.NSString name, objc.NSString? string) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithName_stringValue_, + name.ref.pointer, + string?.ref.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithXMLString:error: + NSXMLElement? initWithXMLString_error_( + objc.NSString string, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.retainAndReturnPointer(), + _sel_initWithXMLString_error_, string.ref.pointer, error); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithKind:options: + NSXMLElement initWithKind_options_( + NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } + + /// elementsForName: + objc.NSArray elementsForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_elementsForName_, name.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// elementsForLocalName:URI: + objc.NSArray elementsForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_elementsForLocalName_URI_, + localName.ref.pointer, + URI?.ref.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// addAttribute: + void addAttribute_(NSXMLNode attribute) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addAttribute_, attribute.ref.pointer); + } + + /// removeAttributeForName: + void removeAttributeForName_(objc.NSString name) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeAttributeForName_, name.ref.pointer); + } + + /// attributes + objc.NSArray? get attributes { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributes); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setAttributes: + set attributes(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributes_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// setAttributesWithDictionary: + void setAttributesWithDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesWithDictionary_, + attributes.ref.pointer); + } + + /// attributeForName: + NSXMLNode? attributeForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_attributeForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + /// attributeForLocalName:URI: + NSXMLNode? attributeForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_attributeForLocalName_URI_, + localName.ref.pointer, + URI?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + /// addNamespace: + void addNamespace_(NSXMLNode aNamespace) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addNamespace_, aNamespace.ref.pointer); + } + + /// removeNamespaceForPrefix: + void removeNamespaceForPrefix_(objc.NSString name) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeNamespaceForPrefix_, name.ref.pointer); + } + + /// namespaces + objc.NSArray? get namespaces { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_namespaces); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// setNamespaces: + set namespaces(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNamespaces_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// namespaceForPrefix: + NSXMLNode? namespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_namespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + /// resolveNamespaceForName: + NSXMLNode? resolveNamespaceForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_resolveNamespaceForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + /// resolvePrefixForNamespaceURI: + objc.NSString? resolvePrefixForNamespaceURI_(objc.NSString namespaceURI) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_resolvePrefixForNamespaceURI_, namespaceURI.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// insertChild:atIndex: + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_cjm5ga( + this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); + } + + /// insertChildren:atIndex: + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, + children.ref.pointer, index); + } + + /// removeChildAtIndex: + void removeChildAtIndex_(int index) { + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); + } + + /// setChildren: + void setChildren_(objc.NSArray? children) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, + children?.ref.pointer ?? ffi.nullptr); + } + + /// addChild: + void addChild_(NSXMLNode child) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); + } + + /// replaceChildAtIndex:withNode: + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, + index, node.ref.pointer); + } + + /// normalizeAdjacentTextNodesPreservingCDATA: + void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { + _objc_msgSend_117qins(this.ref.pointer, + _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); + } + + /// setAttributesAsDictionary: + void setAttributesAsDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesAsDictionary_, + attributes.ref.pointer); + } + + /// init + NSXMLElement init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithKind: + NSXMLElement initWithKind_(NSXMLNodeKind kind) { + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } + + /// document + static objc.ObjCObjectBase document() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLElement, _sel_document); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// documentWithRootElement: + static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_documentWithRootElement_, element.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// elementWithName: + static objc.ObjCObjectBase elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_elementWithName_, name.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } - /// Constructs a [NSScriptClassDescription] that points to the same underlying object as [other]. - NSScriptClassDescription.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// elementWithName:URI: + static objc.ObjCObjectBase elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_iq11qg(_class_NSXMLElement, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } - /// Constructs a [NSScriptClassDescription] that wraps the given raw object pointer. - NSScriptClassDescription.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// elementWithName:stringValue: + static objc.ObjCObjectBase elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } - /// Returns whether [obj] is an instance of [NSScriptClassDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); + /// elementWithName:children:attributes: + static objc.ObjCObjectBase elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLElement, + _sel_elementWithName_children_attributes_, + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// classDescriptionForClass: - static NSClassDescription? classDescriptionForClass_( - objc.ObjCObjectBase aClass) { - final _ret = _objc_msgSend_692(_class_NSScriptClassDescription, - _sel_classDescriptionForClass_, aClass.pointer); - return _ret.address == 0 - ? null - : NSClassDescription.castFromPointer(_ret, retain: true, release: true); + /// attributeWithName:stringValue: + static objc.ObjCObjectBase attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// initWithSuiteName:className:dictionary: - NSScriptClassDescription? initWithSuiteName_className_dictionary_( - objc.NSString suiteName, - objc.NSString className, - objc.NSDictionary? classDeclaration) { - final _ret = _objc_msgSend_642( - this.pointer, - _sel_initWithSuiteName_className_dictionary_, - suiteName.pointer, - className.pointer, - classDeclaration?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptClassDescription.castFromPointer(_ret, - retain: true, release: true); + /// attributeWithName:URI:stringValue: + static objc.ObjCObjectBase attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLElement, + _sel_attributeWithName_URI_stringValue_, + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// suiteName - objc.NSString? get suiteName { - final _ret = _objc_msgSend_20(this.pointer, _sel_suiteName); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// namespaceWithName:stringValue: + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// className - objc.NSString? get className { - final _ret = _objc_msgSend_20(this.pointer, _sel_className); + /// processingInstructionWithName:stringValue: + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// commentWithStringValue: + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_commentWithStringValue_, stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// textWithStringValue: + static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_textWithStringValue_, stringValue.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// DTDNodeWithXMLString: + static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// implementationClassName - objc.NSString? get implementationClassName { - final _ret = _objc_msgSend_20(this.pointer, _sel_implementationClassName); + /// localNameForName: + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_localNameForName_, name.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// prefixForName: + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_prefixForName_, name.ref.pointer); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// superclassDescription - NSScriptClassDescription? get superclassDescription { - final _ret = _objc_msgSend_643(this.pointer, _sel_superclassDescription); + /// predefinedNamespaceForPrefix: + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_predefinedNamespaceForPrefix_, name.ref.pointer); return _ret.address == 0 ? null - : NSScriptClassDescription.castFromPointer(_ret, - retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// appleEventCode - int get appleEventCode { - return _objc_msgSend_644(this.pointer, _sel_appleEventCode); + /// new + static NSXMLElement new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLElement, _sel_new); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - /// matchesAppleEventCode: - bool matchesAppleEventCode_(int appleEventCode) { - return _objc_msgSend_645( - this.pointer, _sel_matchesAppleEventCode_, appleEventCode); + /// allocWithZone: + static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSXMLElement, _sel_allocWithZone_, zone); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - /// supportsCommand: - bool supportsCommand_(NSScriptCommandDescription commandDescription) { - return _objc_msgSend_687( - this.pointer, _sel_supportsCommand_, commandDescription.pointer); + /// alloc + static NSXMLElement alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSXMLElement, _sel_alloc); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - /// selectorForCommand: - ffi.Pointer selectorForCommand_( - NSScriptCommandDescription commandDescription) { - return _objc_msgSend_688( - this.pointer, _sel_selectorForCommand_, commandDescription.pointer); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } - /// typeForKey: - objc.NSString? typeForKey_(objc.NSString key) { - final _ret = _objc_msgSend_42(this.pointer, _sel_typeForKey_, key.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } - /// classDescriptionForKey: - NSScriptClassDescription? classDescriptionForKey_(objc.NSString key) { - final _ret = _objc_msgSend_689( - this.pointer, _sel_classDescriptionForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSScriptClassDescription.castFromPointer(_ret, - retain: true, release: true); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); } - /// appleEventCodeForKey: - int appleEventCodeForKey_(objc.NSString key) { - return _objc_msgSend_646( - this.pointer, _sel_appleEventCodeForKey_, key.pointer); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_NSXMLElement, _sel_useStoredAccessor); } - /// keyWithAppleEventCode: - objc.NSString? keyWithAppleEventCode_(int appleEventCode) { - final _ret = _objc_msgSend_690( - this.pointer, _sel_keyWithAppleEventCode_, appleEventCode); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// defaultSubcontainerAttributeKey - objc.NSString? get defaultSubcontainerAttributeKey { - final _ret = - _objc_msgSend_20(this.pointer, _sel_defaultSubcontainerAttributeKey); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSXMLElement, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSXMLElement, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLElement, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// self + NSXMLElement self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSXMLElement retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSXMLElement autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSHost = objc.getClass("NSHost"); +late final _sel_currentHost = objc.registerName("currentHost"); +late final _sel_hostWithName_ = objc.registerName("hostWithName:"); +late final _sel_hostWithAddress_ = objc.registerName("hostWithAddress:"); +late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); +late final _sel_names = objc.registerName("names"); +late final _sel_address = objc.registerName("address"); +late final _sel_localizedName = objc.registerName("localizedName"); +late final _sel_setHostCacheEnabled_ = + objc.registerName("setHostCacheEnabled:"); +late final _sel_isHostCacheEnabled = objc.registerName("isHostCacheEnabled"); +late final _sel_flushHostCache = objc.registerName("flushHostCache"); + +/// NSHost +class NSHost extends objc.NSObject { + NSHost._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSHost] that points to the same underlying object as [other]. + NSHost.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSHost] that wraps the given raw object pointer. + NSHost.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHost); + } + + /// currentHost + static NSHost currentHost() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHost, _sel_currentHost); + return NSHost.castFromPointer(_ret, retain: true, release: true); + } + + /// hostWithName: + static NSHost hostWithName_(objc.NSString? name) { + final _ret = _objc_msgSend_juohf7( + _class_NSHost, _sel_hostWithName_, name?.ref.pointer ?? ffi.nullptr); + return NSHost.castFromPointer(_ret, retain: true, release: true); + } + + /// hostWithAddress: + static NSHost hostWithAddress_(objc.NSString address) { + final _ret = _objc_msgSend_juohf7( + _class_NSHost, _sel_hostWithAddress_, address.ref.pointer); + return NSHost.castFromPointer(_ret, retain: true, release: true); + } + + /// isEqualToHost: + bool isEqualToHost_(NSHost aHost) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqualToHost_, aHost.ref.pointer); + } + + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// isLocationRequiredToCreateForKey: - bool isLocationRequiredToCreateForKey_(objc.NSString toManyRelationshipKey) { - return _objc_msgSend_31(this.pointer, - _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.pointer); - } - - /// hasPropertyForKey: - bool hasPropertyForKey_(objc.NSString key) { - return _objc_msgSend_31(this.pointer, _sel_hasPropertyForKey_, key.pointer); + /// names + objc.NSArray get names { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_names); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// hasOrderedToManyRelationshipForKey: - bool hasOrderedToManyRelationshipForKey_(objc.NSString key) { - return _objc_msgSend_31( - this.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.pointer); + /// address + objc.NSString? get address { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_address); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// hasReadablePropertyForKey: - bool hasReadablePropertyForKey_(objc.NSString key) { - return _objc_msgSend_31( - this.pointer, _sel_hasReadablePropertyForKey_, key.pointer); + /// addresses + objc.NSArray get addresses { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_addresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// hasWritablePropertyForKey: - bool hasWritablePropertyForKey_(objc.NSString key) { - return _objc_msgSend_31( - this.pointer, _sel_hasWritablePropertyForKey_, key.pointer); + /// localizedName + objc.NSString? get localizedName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// isReadOnlyKey: - bool isReadOnlyKey_(objc.NSString key) { - return _objc_msgSend_31(this.pointer, _sel_isReadOnlyKey_, key.pointer); + /// setHostCacheEnabled: + static void setHostCacheEnabled_(bool flag) { + _objc_msgSend_117qins(_class_NSHost, _sel_setHostCacheEnabled_, flag); } - /// registerClassDescription:forClass: - static void registerClassDescription_forClass_( - NSClassDescription description, objc.ObjCObjectBase aClass) { - _objc_msgSend_691( - _class_NSScriptClassDescription, - _sel_registerClassDescription_forClass_, - description.pointer, - aClass.pointer); + /// isHostCacheEnabled + static bool isHostCacheEnabled() { + return _objc_msgSend_olxnu1(_class_NSHost, _sel_isHostCacheEnabled); } - /// invalidateClassDescriptionCache - static void invalidateClassDescriptionCache() { - _objc_msgSend_7( - _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); + /// flushHostCache + static void flushHostCache() { + _objc_msgSend_ksby9f(_class_NSHost, _sel_flushHostCache); } /// init - NSScriptClassDescription init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSScriptClassDescription.castFromPointer(_ret, - retain: true, release: true); + NSHost init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSHost.castFromPointer(_ret, retain: false, release: true); } /// new - static NSScriptClassDescription new1() { - final _ret = _objc_msgSend_19(_class_NSScriptClassDescription, _sel_new); - return NSScriptClassDescription.castFromPointer(_ret, - retain: false, release: true); + static NSHost new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHost, _sel_new); + return NSHost.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSScriptClassDescription, _sel_allocWithZone_, zone); - return NSScriptClassDescription.castFromPointer(_ret, - retain: false, release: true); + static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSHost, _sel_allocWithZone_, zone); + return NSHost.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSScriptClassDescription alloc() { - final _ret = _objc_msgSend_19(_class_NSScriptClassDescription, _sel_alloc); - return NSScriptClassDescription.castFromPointer(_ret, - retain: false, release: true); + static NSHost alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHost, _sel_alloc); + return NSHost.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -35562,293 +36457,206 @@ class NSScriptClassDescription extends NSClassDescription { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSScriptClassDescription, + _objc_msgSend_cqxsqq( + _class_NSHost, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSScriptClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSHost, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSScriptClassDescription, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSHost, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSScriptClassDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSHost, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSScriptClassDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSHost, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSScriptClassDescription, + _objc_msgSend_1tjlcwl( + _class_NSHost, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSHost, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSHost, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + NSHost self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return NSHost.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSHost retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return NSHost.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSHost autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return NSHost.castFromPointer(_ret, retain: true, release: true); + } } -late final _class_NSScriptClassDescription = - objc.getClass("NSScriptClassDescription"); +late final _class_NSClassDescription = objc.getClass("NSClassDescription"); +late final _sel_registerClassDescription_forClass_ = + objc.registerName("registerClassDescription:forClass:"); +late final _sel_invalidateClassDescriptionCache = + objc.registerName("invalidateClassDescriptionCache"); late final _sel_classDescriptionForClass_ = objc.registerName("classDescriptionForClass:"); -final _objc_msgSend_641 = 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_initWithSuiteName_className_dictionary_ = - objc.registerName("initWithSuiteName:className:dictionary:"); -final _objc_msgSend_642 = 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_suiteName = objc.registerName("suiteName"); -late final _sel_className = objc.registerName("className"); -late final _sel_implementationClassName = - objc.registerName("implementationClassName"); -late final _sel_superclassDescription = - objc.registerName("superclassDescription"); -final _objc_msgSend_643 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_appleEventCode = objc.registerName("appleEventCode"); -final _objc_msgSend_644 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_matchesAppleEventCode_ = - objc.registerName("matchesAppleEventCode:"); -final _objc_msgSend_645 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); +late final _sel_attributeKeys = objc.registerName("attributeKeys"); +late final _sel_toOneRelationshipKeys = + objc.registerName("toOneRelationshipKeys"); +late final _sel_toManyRelationshipKeys = + objc.registerName("toManyRelationshipKeys"); +late final _sel_inverseForRelationshipKey_ = + objc.registerName("inverseForRelationshipKey:"); -/// NSScriptCommandDescription -class NSScriptCommandDescription extends objc.NSObject { - NSScriptCommandDescription._(ffi.Pointer pointer, +/// NSClassDescription +class NSClassDescription extends objc.NSObject { + NSClassDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSScriptCommandDescription] that points to the same underlying object as [other]. - NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSClassDescription] that points to the same underlying object as [other]. + NSClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSScriptCommandDescription] that wraps the given raw object pointer. - NSScriptCommandDescription.castFromPointer(ffi.Pointer other, + /// Constructs a [NSClassDescription] that wraps the given raw object pointer. + NSClassDescription.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. + /// Returns whether [obj] is an instance of [NSClassDescription]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); - } - - /// init - NSScriptCommandDescription init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSScriptCommandDescription.castFromPointer(_ret, - retain: true, release: true); - } - - /// initWithSuiteName:commandName:dictionary: - NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( - objc.NSString suiteName, - objc.NSString commandName, - objc.NSDictionary? commandDeclaration) { - final _ret = _objc_msgSend_642( - this.pointer, - _sel_initWithSuiteName_commandName_dictionary_, - suiteName.pointer, - commandName.pointer, - commandDeclaration?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptCommandDescription.castFromPointer(_ret, - retain: true, release: true); - } - - /// initWithCoder: - NSScriptCommandDescription? initWithCoder_(objc.NSCoder inCoder) { - final _ret = - _objc_msgSend_239(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptCommandDescription.castFromPointer(_ret, - retain: true, release: true); - } - - /// suiteName - objc.NSString get suiteName { - final _ret = _objc_msgSend_11(this.pointer, _sel_suiteName); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// commandName - objc.NSString get commandName { - final _ret = _objc_msgSend_11(this.pointer, _sel_commandName); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// appleEventClassCode - int get appleEventClassCode { - return _objc_msgSend_644(this.pointer, _sel_appleEventClassCode); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSClassDescription); } - /// appleEventCode - int get appleEventCode { - return _objc_msgSend_644(this.pointer, _sel_appleEventCode); + /// registerClassDescription:forClass: + static void registerClassDescription_forClass_( + NSClassDescription description, objc.ObjCObjectBase aClass) { + _objc_msgSend_1tjlcwl( + _class_NSClassDescription, + _sel_registerClassDescription_forClass_, + description.ref.pointer, + aClass.ref.pointer); } - /// commandClassName - objc.NSString get commandClassName { - final _ret = _objc_msgSend_11(this.pointer, _sel_commandClassName); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// invalidateClassDescriptionCache + static void invalidateClassDescriptionCache() { + _objc_msgSend_ksby9f( + _class_NSClassDescription, _sel_invalidateClassDescriptionCache); } - /// returnType - objc.NSString? get returnType { - final _ret = _objc_msgSend_20(this.pointer, _sel_returnType); + /// classDescriptionForClass: + static NSClassDescription? classDescriptionForClass_( + objc.ObjCObjectBase aClass) { + final _ret = _objc_msgSend_juohf7(_class_NSClassDescription, + _sel_classDescriptionForClass_, aClass.ref.pointer); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// appleEventCodeForReturnType - int get appleEventCodeForReturnType { - return _objc_msgSend_644(this.pointer, _sel_appleEventCodeForReturnType); + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); } - /// argumentNames - objc.NSArray get argumentNames { - final _ret = _objc_msgSend_33(this.pointer, _sel_argumentNames); + /// attributeKeys + objc.NSArray get attributeKeys { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributeKeys); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// typeForArgumentWithName: - objc.NSString? typeForArgumentWithName_(objc.NSString argumentName) { - final _ret = _objc_msgSend_42( - this.pointer, _sel_typeForArgumentWithName_, argumentName.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// appleEventCodeForArgumentWithName: - int appleEventCodeForArgumentWithName_(objc.NSString argumentName) { - return _objc_msgSend_646(this.pointer, - _sel_appleEventCodeForArgumentWithName_, argumentName.pointer); + /// toOneRelationshipKeys + objc.NSArray get toOneRelationshipKeys { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_toOneRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// isOptionalArgumentWithName: - bool isOptionalArgumentWithName_(objc.NSString argumentName) { - return _objc_msgSend_31( - this.pointer, _sel_isOptionalArgumentWithName_, argumentName.pointer); + /// toManyRelationshipKeys + objc.NSArray get toManyRelationshipKeys { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_toManyRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// createCommandInstance - NSScriptCommand createCommandInstance() { - final _ret = _objc_msgSend_685(this.pointer, _sel_createCommandInstance); - return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + /// inverseForRelationshipKey: + objc.NSString? inverseForRelationshipKey_(objc.NSString relationshipKey) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_inverseForRelationshipKey_, relationshipKey.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// createCommandInstanceWithZone: - NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_686( - this.pointer, _sel_createCommandInstanceWithZone_, zone); - return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + /// init + NSClassDescription init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSScriptCommandDescription new1() { - final _ret = _objc_msgSend_19(_class_NSScriptCommandDescription, _sel_new); - return NSScriptCommandDescription.castFromPointer(_ret, + static NSClassDescription new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSClassDescription, _sel_new); + return NSClassDescription.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); - return NSScriptCommandDescription.castFromPointer(_ret, + static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSClassDescription, _sel_allocWithZone_, zone); + return NSClassDescription.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSScriptCommandDescription alloc() { - final _ret = - _objc_msgSend_19(_class_NSScriptCommandDescription, _sel_alloc); - return NSScriptCommandDescription.castFromPointer(_ret, + static NSClassDescription alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSClassDescription, _sel_alloc); + return NSClassDescription.castFromPointer(_ret, retain: false, release: true); } @@ -35857,642 +36665,877 @@ class NSScriptCommandDescription extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSScriptCommandDescription, + _objc_msgSend_cqxsqq( + _class_NSClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSScriptCommandDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13(_class_NSScriptCommandDescription, - _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSScriptCommandDescription, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSClassDescription, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSScriptCommandDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSScriptCommandDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSClassDescription, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } +} + +late final _class_NSScriptClassDescription = + objc.getClass("NSScriptClassDescription"); +late final _sel_initWithSuiteName_className_dictionary_ = + objc.registerName("initWithSuiteName:className:dictionary:"); +late final _sel_suiteName = objc.registerName("suiteName"); +late final _sel_className = objc.registerName("className"); +late final _sel_implementationClassName = + objc.registerName("implementationClassName"); +late final _sel_superclassDescription = + objc.registerName("superclassDescription"); +late final _sel_appleEventCode = objc.registerName("appleEventCode"); +final _objc_msgSend_dzloj4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_matchesAppleEventCode_ = + objc.registerName("matchesAppleEventCode:"); +final _objc_msgSend_1n8vqu1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _class_NSScriptCommandDescription = + objc.getClass("NSScriptCommandDescription"); +late final _sel_initWithSuiteName_commandName_dictionary_ = + objc.registerName("initWithSuiteName:commandName:dictionary:"); +late final _sel_commandName = objc.registerName("commandName"); +late final _sel_appleEventClassCode = objc.registerName("appleEventClassCode"); +late final _sel_commandClassName = objc.registerName("commandClassName"); +late final _sel_returnType = objc.registerName("returnType"); +late final _sel_appleEventCodeForReturnType = + objc.registerName("appleEventCodeForReturnType"); +late final _sel_argumentNames = objc.registerName("argumentNames"); +late final _sel_typeForArgumentWithName_ = + objc.registerName("typeForArgumentWithName:"); +late final _sel_appleEventCodeForArgumentWithName_ = + objc.registerName("appleEventCodeForArgumentWithName:"); +final _objc_msgSend_t2sarz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isOptionalArgumentWithName_ = + objc.registerName("isOptionalArgumentWithName:"); +late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); +late final _sel_initWithCommandDescription_ = + objc.registerName("initWithCommandDescription:"); +late final _sel_commandDescription = objc.registerName("commandDescription"); +late final _sel_directParameter = objc.registerName("directParameter"); +late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); +late final _class_NSScriptObjectSpecifier = + objc.getClass("NSScriptObjectSpecifier"); +late final _class_NSAppleEventDescriptor = + objc.getClass("NSAppleEventDescriptor"); +late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); +late final _sel_descriptorWithDescriptorType_bytes_length_ = + objc.registerName("descriptorWithDescriptorType:bytes:length:"); +final _objc_msgSend_unctjf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); +late final _sel_descriptorWithDescriptorType_data_ = + objc.registerName("descriptorWithDescriptorType:data:"); +final _objc_msgSend_1k5vjgv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_descriptorWithBoolean_ = + objc.registerName("descriptorWithBoolean:"); +late final _sel_descriptorWithEnumCode_ = + objc.registerName("descriptorWithEnumCode:"); +late final _sel_descriptorWithInt32_ = + objc.registerName("descriptorWithInt32:"); +late final _sel_descriptorWithDouble_ = + objc.registerName("descriptorWithDouble:"); +late final _sel_descriptorWithTypeCode_ = + objc.registerName("descriptorWithTypeCode:"); +late final _sel_descriptorWithString_ = + objc.registerName("descriptorWithString:"); +late final _sel_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); +late final _sel_descriptorWithFileURL_ = + objc.registerName("descriptorWithFileURL:"); +late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +final _objc_msgSend_1iwlq4o = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int, + int)>(); +late final _sel_listDescriptor = objc.registerName("listDescriptor"); +late final _sel_recordDescriptor = objc.registerName("recordDescriptor"); +late final _sel_currentProcessDescriptor = + objc.registerName("currentProcessDescriptor"); +late final _sel_descriptorWithProcessIdentifier_ = + objc.registerName("descriptorWithProcessIdentifier:"); +late final _sel_descriptorWithBundleIdentifier_ = + objc.registerName("descriptorWithBundleIdentifier:"); +late final _sel_descriptorWithApplicationURL_ = + objc.registerName("descriptorWithApplicationURL:"); + +final class OpaqueAEDataStorageType extends ffi.Opaque {} + +@ffi.Packed(2) +final class AEDesc extends ffi.Struct { + @ffi.UnsignedInt() + external int descriptorType; + + external ffi.Pointer> dataHandle; +} + +late final _sel_initWithAEDescNoCopy_ = + objc.registerName("initWithAEDescNoCopy:"); +final _objc_msgSend_10xxpbh = 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_initWithDescriptorType_bytes_length_ = + objc.registerName("initWithDescriptorType:bytes:length:"); +late final _sel_initWithDescriptorType_data_ = + objc.registerName("initWithDescriptorType:data:"); +late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +late final _sel_initListDescriptor = objc.registerName("initListDescriptor"); +late final _sel_initRecordDescriptor = + objc.registerName("initRecordDescriptor"); +late final _sel_aeDesc = objc.registerName("aeDesc"); +final _objc_msgSend_jg6irx = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorType = objc.registerName("descriptorType"); +late final _sel_booleanValue = objc.registerName("booleanValue"); +final _objc_msgSend_1cswds = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_enumCodeValue = objc.registerName("enumCodeValue"); +late final _sel_int32Value = objc.registerName("int32Value"); +late final _sel_typeCodeValue = objc.registerName("typeCodeValue"); +late final _sel_dateValue = objc.registerName("dateValue"); +late final _sel_fileURLValue = objc.registerName("fileURLValue"); +late final _sel_eventClass = objc.registerName("eventClass"); +late final _sel_eventID = objc.registerName("eventID"); +late final _sel_returnID = objc.registerName("returnID"); +late final _sel_transactionID = objc.registerName("transactionID"); +late final _sel_setParamDescriptor_forKeyword_ = + objc.registerName("setParamDescriptor:forKeyword:"); +final _objc_msgSend_1dzwu6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_paramDescriptorForKeyword_ = + objc.registerName("paramDescriptorForKeyword:"); +late final _sel_removeParamDescriptorWithKeyword_ = + objc.registerName("removeParamDescriptorWithKeyword:"); +final _objc_msgSend_l6g8fv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAttributeDescriptor_forKeyword_ = + objc.registerName("setAttributeDescriptor:forKeyword:"); +late final _sel_attributeDescriptorForKeyword_ = + objc.registerName("attributeDescriptorForKeyword:"); - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSScriptCommandDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } +enum NSAppleEventSendOptions { + NSAppleEventSendNoReply(1), + NSAppleEventSendQueueReply(2), + NSAppleEventSendWaitForReply(3), + NSAppleEventSendNeverInteract(16), + NSAppleEventSendCanInteract(32), + NSAppleEventSendAlwaysInteract(48), + NSAppleEventSendCanSwitchLayer(64), + NSAppleEventSendDontRecord(4096), + NSAppleEventSendDontExecute(8192), + NSAppleEventSendDontAnnotate(65536), + NSAppleEventSendDefaultOptions(35); - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSAppleEventSendOptions(this.value); - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } + static NSAppleEventSendOptions fromValue(int value) => switch (value) { + 1 => NSAppleEventSendNoReply, + 2 => NSAppleEventSendQueueReply, + 3 => NSAppleEventSendWaitForReply, + 16 => NSAppleEventSendNeverInteract, + 32 => NSAppleEventSendCanInteract, + 48 => NSAppleEventSendAlwaysInteract, + 64 => NSAppleEventSendCanSwitchLayer, + 4096 => NSAppleEventSendDontRecord, + 8192 => NSAppleEventSendDontExecute, + 65536 => NSAppleEventSendDontAnnotate, + 35 => NSAppleEventSendDefaultOptions, + _ => throw ArgumentError( + "Unknown value for NSAppleEventSendOptions: $value"), + }; } -late final _class_NSScriptCommandDescription = - objc.getClass("NSScriptCommandDescription"); -late final _sel_initWithSuiteName_commandName_dictionary_ = - objc.registerName("initWithSuiteName:commandName:dictionary:"); -late final _sel_commandName = objc.registerName("commandName"); -late final _sel_appleEventClassCode = objc.registerName("appleEventClassCode"); -late final _sel_commandClassName = objc.registerName("commandClassName"); -late final _sel_returnType = objc.registerName("returnType"); -late final _sel_appleEventCodeForReturnType = - objc.registerName("appleEventCodeForReturnType"); -late final _sel_argumentNames = objc.registerName("argumentNames"); -late final _sel_typeForArgumentWithName_ = - objc.registerName("typeForArgumentWithName:"); -late final _sel_appleEventCodeForArgumentWithName_ = - objc.registerName("appleEventCodeForArgumentWithName:"); -final _objc_msgSend_646 = objc.msgSendPointer +late final _sel_sendEventWithOptions_timeout_error_ = + objc.registerName("sendEventWithOptions:timeout:error:"); +final _objc_msgSend_19xj9w = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedInt Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + double, + ffi.Pointer>)>(); +late final _sel_isRecordDescriptor = objc.registerName("isRecordDescriptor"); +late final _sel_numberOfItems = objc.registerName("numberOfItems"); +late final _sel_insertDescriptor_atIndex_ = + objc.registerName("insertDescriptor:atIndex:"); +final _objc_msgSend_da94db = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); +late final _sel_removeDescriptorAtIndex_ = + objc.registerName("removeDescriptorAtIndex:"); +late final _sel_setDescriptor_forKeyword_ = + objc.registerName("setDescriptor:forKeyword:"); +late final _sel_descriptorForKeyword_ = + objc.registerName("descriptorForKeyword:"); +late final _sel_removeDescriptorWithKeyword_ = + objc.registerName("removeDescriptorWithKeyword:"); +late final _sel_keywordForDescriptorAtIndex_ = + objc.registerName("keywordForDescriptorAtIndex:"); +final _objc_msgSend_hkgvph = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .asFunction< int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isOptionalArgumentWithName_ = - objc.registerName("isOptionalArgumentWithName:"); + ffi.Pointer, int)>(); +late final _sel_coerceToDescriptorType_ = + objc.registerName("coerceToDescriptorType:"); -/// NSScriptCommand -class NSScriptCommand extends objc.NSObject { - NSScriptCommand._(ffi.Pointer pointer, +/// NSAppleEventDescriptor +class NSAppleEventDescriptor extends objc.NSObject { + NSAppleEventDescriptor._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSScriptCommand] that points to the same underlying object as [other]. - NSScriptCommand.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSAppleEventDescriptor] that points to the same underlying object as [other]. + NSAppleEventDescriptor.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSScriptCommand] that wraps the given raw object pointer. - NSScriptCommand.castFromPointer(ffi.Pointer other, + /// Constructs a [NSAppleEventDescriptor] that wraps the given raw object pointer. + NSAppleEventDescriptor.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSScriptCommand]. + /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); - } - - /// initWithCommandDescription: - NSScriptCommand initWithCommandDescription_( - NSScriptCommandDescription commandDef) { - final _ret = _objc_msgSend_647( - this.pointer, _sel_initWithCommandDescription_, commandDef.pointer); - return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithCoder: - NSScriptCommand? initWithCoder_(objc.NSCoder inCoder) { - final _ret = - _objc_msgSend_239(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); } - /// commandDescription - NSScriptCommandDescription get commandDescription { - final _ret = _objc_msgSend_648(this.pointer, _sel_commandDescription); - return NSScriptCommandDescription.castFromPointer(_ret, + /// nullDescriptor + static NSAppleEventDescriptor nullDescriptor() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_nullDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// directParameter - objc.ObjCObjectBase? get directParameter { - final _ret = _objc_msgSend_83(this.pointer, _sel_directParameter); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// setDirectParameter: - set directParameter(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setDirectParameter_, value?.pointer ?? ffi.nullptr); - } - - /// receiversSpecifier - NSScriptObjectSpecifier? get receiversSpecifier { - final _ret = _objc_msgSend_677(this.pointer, _sel_receiversSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); - } - - /// setReceiversSpecifier: - set receiversSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_678(this.pointer, _sel_setReceiversSpecifier_, - value?.pointer ?? ffi.nullptr); - } - - /// evaluatedReceivers - objc.ObjCObjectBase? get evaluatedReceivers { - final _ret = _objc_msgSend_83(this.pointer, _sel_evaluatedReceivers); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// arguments - objc.NSDictionary? get arguments { - final _ret = _objc_msgSend_82(this.pointer, _sel_arguments); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } - - /// setArguments: - set arguments(objc.NSDictionary? value) { - return _objc_msgSend_187( - this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); - } - - /// evaluatedArguments - objc.NSDictionary? get evaluatedArguments { - final _ret = _objc_msgSend_82(this.pointer, _sel_evaluatedArguments); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } - - /// isWellFormed - bool get wellFormed { - return _objc_msgSend_13(this.pointer, _sel_isWellFormed); - } - - /// performDefaultImplementation - objc.ObjCObjectBase? performDefaultImplementation() { - final _ret = - _objc_msgSend_83(this.pointer, _sel_performDefaultImplementation); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// executeCommand - objc.ObjCObjectBase? executeCommand() { - final _ret = _objc_msgSend_83(this.pointer, _sel_executeCommand); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// scriptErrorNumber - int get scriptErrorNumber { - return _objc_msgSend_123(this.pointer, _sel_scriptErrorNumber); - } - - /// setScriptErrorNumber: - set scriptErrorNumber(int value) { - return _objc_msgSend_142(this.pointer, _sel_setScriptErrorNumber_, value); - } - - /// scriptErrorOffendingObjectDescriptor - NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { - final _ret = _objc_msgSend_682( - this.pointer, _sel_scriptErrorOffendingObjectDescriptor); + /// descriptorWithDescriptorType:bytes:length: + static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_unctjf( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// setScriptErrorOffendingObjectDescriptor: - set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_683( - this.pointer, - _sel_setScriptErrorOffendingObjectDescriptor_, - value?.pointer ?? ffi.nullptr); - } - - /// scriptErrorExpectedTypeDescriptor - NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { - final _ret = - _objc_msgSend_682(this.pointer, _sel_scriptErrorExpectedTypeDescriptor); + /// descriptorWithDescriptorType:data: + static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_1k5vjgv( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_data_, + descriptorType, + data?.ref.pointer ?? ffi.nullptr); return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// setScriptErrorExpectedTypeDescriptor: - set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_683( - this.pointer, - _sel_setScriptErrorExpectedTypeDescriptor_, - value?.pointer ?? ffi.nullptr); + /// descriptorWithBoolean: + static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { + final _ret = _objc_msgSend_1ar9f5m( + _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// scriptErrorString - objc.NSString? get scriptErrorString { - final _ret = _objc_msgSend_20(this.pointer, _sel_scriptErrorString); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// descriptorWithEnumCode: + static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { + final _ret = _objc_msgSend_pxgym4(_class_NSAppleEventDescriptor, + _sel_descriptorWithEnumCode_, enumerator); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// setScriptErrorString: - set scriptErrorString(objc.NSString? value) { - return _objc_msgSend_21(this.pointer, _sel_setScriptErrorString_, - value?.pointer ?? ffi.nullptr); + /// descriptorWithInt32: + static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { + final _ret = _objc_msgSend_105o5we( + _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// currentCommand - static NSScriptCommand? currentCommand() { - final _ret = _objc_msgSend_684(_class_NSScriptCommand, _sel_currentCommand); - return _ret.address == 0 - ? null - : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + /// descriptorWithDouble: + static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { + final _ret = _objc_msgSend_m7jc8y( + _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// appleEvent - NSAppleEventDescriptor? get appleEvent { - final _ret = _objc_msgSend_682(this.pointer, _sel_appleEvent); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// descriptorWithTypeCode: + static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { + final _ret = _objc_msgSend_pxgym4( + _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// suspendExecution - void suspendExecution() { - _objc_msgSend_7(this.pointer, _sel_suspendExecution); + /// descriptorWithString: + static NSAppleEventDescriptor descriptorWithString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithString_, string.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// resumeExecutionWithResult: - void resumeExecutionWithResult_(objc.ObjCObjectBase? result) { - _objc_msgSend_226(this.pointer, _sel_resumeExecutionWithResult_, - result?.pointer ?? ffi.nullptr); + /// descriptorWithDate: + static NSAppleEventDescriptor descriptorWithDate_(objc.NSDate date) { + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithDate_, date.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// init - NSScriptCommand init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + /// descriptorWithFileURL: + static NSAppleEventDescriptor descriptorWithFileURL_(objc.NSURL fileURL) { + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithFileURL_, fileURL.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// new - static NSScriptCommand new1() { - final _ret = _objc_msgSend_19(_class_NSScriptCommand, _sel_new); - return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + /// appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID: + static NSAppleEventDescriptor + appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_1iwlq4o( + _class_NSAppleEventDescriptor, + _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.ref.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// allocWithZone: - static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSScriptCommand, _sel_allocWithZone_, zone); - return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + /// listDescriptor + static NSAppleEventDescriptor listDescriptor() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_listDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// alloc - static NSScriptCommand alloc() { - final _ret = _objc_msgSend_19(_class_NSScriptCommand, _sel_alloc); - return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + /// recordDescriptor + static NSAppleEventDescriptor recordDescriptor() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_recordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - objc.ObjCObjectBase aTarget, - ffi.Pointer aSelector, - objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSScriptCommand, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + /// currentProcessDescriptor + static NSAppleEventDescriptor currentProcessDescriptor() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSScriptCommand, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// descriptorWithProcessIdentifier: + static NSAppleEventDescriptor descriptorWithProcessIdentifier_( + int processIdentifier) { + final _ret = _objc_msgSend_105o5we(_class_NSAppleEventDescriptor, + _sel_descriptorWithProcessIdentifier_, processIdentifier); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); + /// descriptorWithBundleIdentifier: + static NSAppleEventDescriptor descriptorWithBundleIdentifier_( + objc.NSString bundleIdentifier) { + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithBundleIdentifier_, bundleIdentifier.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSScriptCommand, _sel_useStoredAccessor); + /// descriptorWithApplicationURL: + static NSAppleEventDescriptor descriptorWithApplicationURL_( + objc.NSURL applicationURL) { + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithApplicationURL_, applicationURL.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSScriptCommand, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + /// initWithAEDescNoCopy: + NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { + final _ret = _objc_msgSend_10xxpbh( + this.ref.retainAndReturnPointer(), _sel_initWithAEDescNoCopy_, aeDesc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSScriptCommand, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// initWithDescriptorType:bytes:length: + NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_unctjf( + this.ref.retainAndReturnPointer(), + _sel_initWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSScriptCommand, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// initWithDescriptorType:data: + NSAppleEventDescriptor? initWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_1k5vjgv( + this.ref.retainAndReturnPointer(), + _sel_initWithDescriptorType_data_, + descriptorType, + data?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// initWithEventClass:eventID:targetDescriptor:returnID:transactionID: + NSAppleEventDescriptor + initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_1iwlq4o( + this.ref.retainAndReturnPointer(), + _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.ref.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// initListDescriptor + NSAppleEventDescriptor initListDescriptor() { + final _ret = _objc_msgSend_1unuoxw( + this.ref.retainAndReturnPointer(), _sel_initListDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } -} -late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); -late final _sel_initWithCommandDescription_ = - objc.registerName("initWithCommandDescription:"); -final _objc_msgSend_647 = 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_commandDescription = objc.registerName("commandDescription"); -final _objc_msgSend_648 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_directParameter = objc.registerName("directParameter"); -late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); + /// initRecordDescriptor + NSAppleEventDescriptor initRecordDescriptor() { + final _ret = _objc_msgSend_1unuoxw( + this.ref.retainAndReturnPointer(), _sel_initRecordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } -/// NSScriptObjectSpecifier -class NSScriptObjectSpecifier extends objc.NSObject { - NSScriptObjectSpecifier._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// aeDesc + ffi.Pointer get aeDesc { + return _objc_msgSend_jg6irx(this.ref.pointer, _sel_aeDesc); + } - /// Constructs a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. - NSScriptObjectSpecifier.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// descriptorType + int get descriptorType { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_descriptorType); + } - /// Constructs a [NSScriptObjectSpecifier] that wraps the given raw object pointer. - NSScriptObjectSpecifier.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// data + objc.NSData get data { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } - /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); + /// booleanValue + int get booleanValue { + return _objc_msgSend_1cswds(this.ref.pointer, _sel_booleanValue); } - /// objectSpecifierWithDescriptor: - static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( - NSAppleEventDescriptor descriptor) { - final _ret = _objc_msgSend_674(_class_NSScriptObjectSpecifier, - _sel_objectSpecifierWithDescriptor_, descriptor.pointer); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); + /// enumCodeValue + int get enumCodeValue { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_enumCodeValue); } - /// initWithContainerSpecifier:key: - NSScriptObjectSpecifier initWithContainerSpecifier_key_( - NSScriptObjectSpecifier container, objc.NSString property) { - final _ret = _objc_msgSend_675( - this.pointer, - _sel_initWithContainerSpecifier_key_, - container.pointer, - property.pointer); - return NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); + /// int32Value + int get int32Value { + return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_int32Value); } - /// initWithContainerClassDescription:containerSpecifier:key: - NSScriptObjectSpecifier - initWithContainerClassDescription_containerSpecifier_key_( - NSScriptClassDescription classDesc, - NSScriptObjectSpecifier? container, - objc.NSString property) { - final _ret = _objc_msgSend_676( - this.pointer, - _sel_initWithContainerClassDescription_containerSpecifier_key_, - classDesc.pointer, - container?.pointer ?? ffi.nullptr, - property.pointer); - return NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); + /// doubleValue + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_doubleValue) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_doubleValue); } - /// initWithCoder: - NSScriptObjectSpecifier? initWithCoder_(objc.NSCoder inCoder) { - final _ret = - _objc_msgSend_239(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); + /// typeCodeValue + int get typeCodeValue { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_typeCodeValue); } - /// childSpecifier - NSScriptObjectSpecifier? get childSpecifier { - final _ret = _objc_msgSend_677(this.pointer, _sel_childSpecifier); + /// stringValue + objc.NSString? get stringValue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_stringValue); return _ret.address == 0 ? null - : NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setChildSpecifier: - set childSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_678( - this.pointer, _sel_setChildSpecifier_, value?.pointer ?? ffi.nullptr); + /// dateValue + objc.NSDate? get dateValue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dateValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// containerSpecifier - NSScriptObjectSpecifier? get containerSpecifier { - final _ret = _objc_msgSend_677(this.pointer, _sel_containerSpecifier); + /// fileURLValue + objc.NSURL? get fileURLValue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileURLValue); return _ret.address == 0 ? null - : NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// setContainerSpecifier: - set containerSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_678(this.pointer, _sel_setContainerSpecifier_, - value?.pointer ?? ffi.nullptr); + /// eventClass + int get eventClass { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_eventClass); } - /// containerIsObjectBeingTested - bool get containerIsObjectBeingTested { - return _objc_msgSend_13(this.pointer, _sel_containerIsObjectBeingTested); + /// eventID + int get eventID { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_eventID); } - /// setContainerIsObjectBeingTested: - set containerIsObjectBeingTested(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setContainerIsObjectBeingTested_, value); + /// returnID + int get returnID { + return _objc_msgSend_157j54x(this.ref.pointer, _sel_returnID); } - /// containerIsRangeContainerObject - bool get containerIsRangeContainerObject { - return _objc_msgSend_13(this.pointer, _sel_containerIsRangeContainerObject); + /// transactionID + int get transactionID { + return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_transactionID); } - /// setContainerIsRangeContainerObject: - set containerIsRangeContainerObject(bool value) { - return _objc_msgSend_14( - this.pointer, _sel_setContainerIsRangeContainerObject_, value); + /// setParamDescriptor:forKeyword: + void setParamDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_1dzwu6(this.ref.pointer, _sel_setParamDescriptor_forKeyword_, + descriptor.ref.pointer, keyword); } - /// key - objc.NSString get key { - final _ret = _objc_msgSend_11(this.pointer, _sel_key); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// paramDescriptorForKeyword: + NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_paramDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// setKey: - set key(objc.NSString value) { - return _objc_msgSend_12(this.pointer, _sel_setKey_, value.pointer); + /// removeParamDescriptorWithKeyword: + void removeParamDescriptorWithKeyword_(int keyword) { + _objc_msgSend_l6g8fv( + this.ref.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); } - /// containerClassDescription - NSScriptClassDescription? get containerClassDescription { - final _ret = - _objc_msgSend_643(this.pointer, _sel_containerClassDescription); + /// setAttributeDescriptor:forKeyword: + void setAttributeDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_1dzwu6( + this.ref.pointer, + _sel_setAttributeDescriptor_forKeyword_, + descriptor.ref.pointer, + keyword); + } + + /// attributeDescriptorForKeyword: + NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_attributeDescriptorForKeyword_, keyword); return _ret.address == 0 ? null - : NSScriptClassDescription.castFromPointer(_ret, + : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// setContainerClassDescription: - set containerClassDescription(NSScriptClassDescription? value) { - return _objc_msgSend_679(this.pointer, _sel_setContainerClassDescription_, - value?.pointer ?? ffi.nullptr); - } - - /// keyClassDescription - NSScriptClassDescription? get keyClassDescription { - final _ret = _objc_msgSend_643(this.pointer, _sel_keyClassDescription); + /// sendEventWithOptions:timeout:error: + NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( + NSAppleEventSendOptions sendOptions, + double timeoutInSeconds, + ffi.Pointer> error) { + final _ret = _objc_msgSend_19xj9w( + this.ref.pointer, + _sel_sendEventWithOptions_timeout_error_, + sendOptions.value, + timeoutInSeconds, + error); return _ret.address == 0 ? null - : NSScriptClassDescription.castFromPointer(_ret, + : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// indicesOfObjectsByEvaluatingWithContainer:count: - ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( - objc.ObjCObjectBase container, ffi.Pointer count) { - return _objc_msgSend_680( - this.pointer, - _sel_indicesOfObjectsByEvaluatingWithContainer_count_, - container.pointer, - count); + /// isRecordDescriptor + bool get isRecordDescriptor { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isRecordDescriptor); } - /// objectsByEvaluatingWithContainers: - objc.ObjCObjectBase? objectsByEvaluatingWithContainers_( - objc.ObjCObjectBase containers) { - final _ret = _objc_msgSend_681(this.pointer, - _sel_objectsByEvaluatingWithContainers_, containers.pointer); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// numberOfItems + int get numberOfItems { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_numberOfItems); } - /// objectsByEvaluatingSpecifier - objc.ObjCObjectBase? get objectsByEvaluatingSpecifier { + /// insertDescriptor:atIndex: + void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { + _objc_msgSend_da94db(this.ref.pointer, _sel_insertDescriptor_atIndex_, + descriptor.ref.pointer, index); + } + + /// descriptorAtIndex: + NSAppleEventDescriptor? descriptorAtIndex_(int index) { final _ret = - _objc_msgSend_83(this.pointer, _sel_objectsByEvaluatingSpecifier); + _objc_msgSend_crtxa9(this.ref.pointer, _sel_descriptorAtIndex_, index); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// evaluationErrorNumber - int get evaluationErrorNumber { - return _objc_msgSend_123(this.pointer, _sel_evaluationErrorNumber); + /// removeDescriptorAtIndex: + void removeDescriptorAtIndex_(int index) { + _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_removeDescriptorAtIndex_, index); } - /// setEvaluationErrorNumber: - set evaluationErrorNumber(int value) { - return _objc_msgSend_142( - this.pointer, _sel_setEvaluationErrorNumber_, value); + /// setDescriptor:forKeyword: + void setDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_1dzwu6(this.ref.pointer, _sel_setDescriptor_forKeyword_, + descriptor.ref.pointer, keyword); } - /// evaluationErrorSpecifier - NSScriptObjectSpecifier? get evaluationErrorSpecifier { - final _ret = _objc_msgSend_677(this.pointer, _sel_evaluationErrorSpecifier); + /// descriptorForKeyword: + NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_descriptorForKeyword_, keyword); return _ret.address == 0 ? null - : NSScriptObjectSpecifier.castFromPointer(_ret, + : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// descriptor - NSAppleEventDescriptor? get descriptor { - final _ret = _objc_msgSend_682(this.pointer, _sel_descriptor); + /// removeDescriptorWithKeyword: + void removeDescriptorWithKeyword_(int keyword) { + _objc_msgSend_l6g8fv( + this.ref.pointer, _sel_removeDescriptorWithKeyword_, keyword); + } + + /// keywordForDescriptorAtIndex: + int keywordForDescriptorAtIndex_(int index) { + return _objc_msgSend_hkgvph( + this.ref.pointer, _sel_keywordForDescriptorAtIndex_, index); + } + + /// coerceToDescriptorType: + NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_coerceToDescriptorType_, descriptorType); return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, @@ -36500,31 +37543,33 @@ class NSScriptObjectSpecifier extends objc.NSObject { } /// init - NSScriptObjectSpecifier init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSScriptObjectSpecifier.castFromPointer(_ret, - retain: true, release: true); + NSAppleEventDescriptor init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSScriptObjectSpecifier new1() { - final _ret = _objc_msgSend_19(_class_NSScriptObjectSpecifier, _sel_new); - return NSScriptObjectSpecifier.castFromPointer(_ret, + static NSAppleEventDescriptor new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_new); + return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); - return NSScriptObjectSpecifier.castFromPointer(_ret, + static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); + return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSScriptObjectSpecifier alloc() { - final _ret = _objc_msgSend_19(_class_NSScriptObjectSpecifier, _sel_alloc); - return NSScriptObjectSpecifier.castFromPointer(_ret, + static NSAppleEventDescriptor alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_alloc); + return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); } @@ -36533,578 +37578,751 @@ class NSScriptObjectSpecifier extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSScriptObjectSpecifier, + _objc_msgSend_cqxsqq( + _class_NSAppleEventDescriptor, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSScriptObjectSpecifier, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSAppleEventDescriptor, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_NSAppleEventDescriptor, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSScriptObjectSpecifier, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSScriptObjectSpecifier, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSAppleEventDescriptor, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSScriptObjectSpecifier, + _objc_msgSend_1tjlcwl( + _class_NSAppleEventDescriptor, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSAppleEventDescriptor, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + NSAppleEventDescriptor? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } } -late final _class_NSScriptObjectSpecifier = - objc.getClass("NSScriptObjectSpecifier"); +late final _sel_objectSpecifierWithDescriptor_ = + objc.registerName("objectSpecifierWithDescriptor:"); +late final _sel_initWithContainerSpecifier_key_ = + objc.registerName("initWithContainerSpecifier:key:"); +late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc + .registerName("initWithContainerClassDescription:containerSpecifier:key:"); +late final _sel_childSpecifier = objc.registerName("childSpecifier"); +late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); +late final _sel_containerSpecifier = objc.registerName("containerSpecifier"); +late final _sel_setContainerSpecifier_ = + objc.registerName("setContainerSpecifier:"); +late final _sel_containerIsObjectBeingTested = + objc.registerName("containerIsObjectBeingTested"); +late final _sel_setContainerIsObjectBeingTested_ = + objc.registerName("setContainerIsObjectBeingTested:"); +late final _sel_containerIsRangeContainerObject = + objc.registerName("containerIsRangeContainerObject"); +late final _sel_setContainerIsRangeContainerObject_ = + objc.registerName("setContainerIsRangeContainerObject:"); +late final _sel_key = objc.registerName("key"); +late final _sel_setKey_ = objc.registerName("setKey:"); +late final _sel_containerClassDescription = + objc.registerName("containerClassDescription"); +late final _sel_setContainerClassDescription_ = + objc.registerName("setContainerClassDescription:"); +late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); +late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = + objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); +final _objc_msgSend_1e2yezv = 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_objectsByEvaluatingWithContainers_ = + objc.registerName("objectsByEvaluatingWithContainers:"); +late final _sel_objectsByEvaluatingSpecifier = + objc.registerName("objectsByEvaluatingSpecifier"); +late final _sel_evaluationErrorNumber = + objc.registerName("evaluationErrorNumber"); +late final _sel_setEvaluationErrorNumber_ = + objc.registerName("setEvaluationErrorNumber:"); +late final _sel_evaluationErrorSpecifier = + objc.registerName("evaluationErrorSpecifier"); +late final _sel_descriptor = objc.registerName("descriptor"); -/// NSAppleEventDescriptor -class NSAppleEventDescriptor extends objc.NSObject { - NSAppleEventDescriptor._(ffi.Pointer pointer, +/// NSScriptObjectSpecifier +class NSScriptObjectSpecifier extends objc.NSObject { + NSScriptObjectSpecifier._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSAppleEventDescriptor] that points to the same underlying object as [other]. - NSAppleEventDescriptor.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. + NSScriptObjectSpecifier.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSAppleEventDescriptor] that wraps the given raw object pointer. - NSAppleEventDescriptor.castFromPointer(ffi.Pointer other, + /// Constructs a [NSScriptObjectSpecifier] that wraps the given raw object pointer. + NSScriptObjectSpecifier.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. + /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); } - /// nullDescriptor - static NSAppleEventDescriptor nullDescriptor() { - final _ret = - _objc_msgSend_649(_class_NSAppleEventDescriptor, _sel_nullDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// objectSpecifierWithDescriptor: + static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( + NSAppleEventDescriptor descriptor) { + final _ret = _objc_msgSend_juohf7(_class_NSScriptObjectSpecifier, + _sel_objectSpecifierWithDescriptor_, descriptor.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - /// descriptorWithDescriptorType:bytes:length: - static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_650( - _class_NSAppleEventDescriptor, - _sel_descriptorWithDescriptorType_bytes_length_, - descriptorType, - bytes, - byteCount); + /// initWithContainerSpecifier:key: + NSScriptObjectSpecifier initWithContainerSpecifier_key_( + NSScriptObjectSpecifier container, objc.NSString property) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithContainerSpecifier_key_, + container.ref.pointer, + property.ref.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); + } + + /// initWithContainerClassDescription:containerSpecifier:key: + NSScriptObjectSpecifier + initWithContainerClassDescription_containerSpecifier_key_( + NSScriptClassDescription classDesc, + NSScriptObjectSpecifier? container, + objc.NSString property) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithContainerClassDescription_containerSpecifier_key_, + classDesc.ref.pointer, + container?.ref.pointer ?? ffi.nullptr, + property.ref.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); + } + + /// initWithCoder: + NSScriptObjectSpecifier? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - /// descriptorWithDescriptorType:data: - static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( - int descriptorType, objc.NSData? data) { - final _ret = _objc_msgSend_651( - _class_NSAppleEventDescriptor, - _sel_descriptorWithDescriptorType_data_, - descriptorType, - data?.pointer ?? ffi.nullptr); + /// childSpecifier + NSScriptObjectSpecifier? get childSpecifier { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_childSpecifier); return _ret.address == 0 ? null - : NSAppleEventDescriptor.castFromPointer(_ret, + : NSScriptObjectSpecifier.castFromPointer(_ret, retain: true, release: true); } - /// descriptorWithBoolean: - static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { - final _ret = _objc_msgSend_652( - _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// setChildSpecifier: + set childSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildSpecifier_, + value?.ref.pointer ?? ffi.nullptr); } - /// descriptorWithEnumCode: - static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { - final _ret = _objc_msgSend_653(_class_NSAppleEventDescriptor, - _sel_descriptorWithEnumCode_, enumerator); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// containerSpecifier + NSScriptObjectSpecifier? get containerSpecifier { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_containerSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - /// descriptorWithInt32: - static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { - final _ret = _objc_msgSend_654( - _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// setContainerSpecifier: + set containerSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setContainerSpecifier_, + value?.ref.pointer ?? ffi.nullptr); } - /// descriptorWithDouble: - static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { - final _ret = _objc_msgSend_655( - _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// containerIsObjectBeingTested + bool get containerIsObjectBeingTested { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_containerIsObjectBeingTested); } - /// descriptorWithTypeCode: - static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { - final _ret = _objc_msgSend_653( - _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// setContainerIsObjectBeingTested: + set containerIsObjectBeingTested(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setContainerIsObjectBeingTested_, value); } - /// descriptorWithString: - static NSAppleEventDescriptor descriptorWithString_(objc.NSString string) { - final _ret = _objc_msgSend_656(_class_NSAppleEventDescriptor, - _sel_descriptorWithString_, string.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// containerIsRangeContainerObject + bool get containerIsRangeContainerObject { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_containerIsRangeContainerObject); } - /// descriptorWithDate: - static NSAppleEventDescriptor descriptorWithDate_(objc.NSDate date) { - final _ret = _objc_msgSend_657( - _class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// setContainerIsRangeContainerObject: + set containerIsRangeContainerObject(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setContainerIsRangeContainerObject_, value); } - /// descriptorWithFileURL: - static NSAppleEventDescriptor descriptorWithFileURL_(objc.NSURL fileURL) { - final _ret = _objc_msgSend_658(_class_NSAppleEventDescriptor, - _sel_descriptorWithFileURL_, fileURL.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// key + objc.NSString get key { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_key); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID: - static NSAppleEventDescriptor - appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _objc_msgSend_659( - _class_NSAppleEventDescriptor, - _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, - eventClass, - eventID, - targetDescriptor?.pointer ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// setKey: + set key(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setKey_, value.ref.pointer); } - /// listDescriptor - static NSAppleEventDescriptor listDescriptor() { + /// containerClassDescription + NSScriptClassDescription? get containerClassDescription { final _ret = - _objc_msgSend_649(_class_NSAppleEventDescriptor, _sel_listDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_containerClassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - /// recordDescriptor - static NSAppleEventDescriptor recordDescriptor() { + /// setContainerClassDescription: + set containerClassDescription(NSScriptClassDescription? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setContainerClassDescription_, value?.ref.pointer ?? ffi.nullptr); + } + + /// keyClassDescription + NSScriptClassDescription? get keyClassDescription { final _ret = - _objc_msgSend_649(_class_NSAppleEventDescriptor, _sel_recordDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_keyClassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - /// currentProcessDescriptor - static NSAppleEventDescriptor currentProcessDescriptor() { - final _ret = _objc_msgSend_649( - _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// indicesOfObjectsByEvaluatingWithContainer:count: + ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( + objc.ObjCObjectBase container, ffi.Pointer count) { + return _objc_msgSend_1e2yezv( + this.ref.pointer, + _sel_indicesOfObjectsByEvaluatingWithContainer_count_, + container.ref.pointer, + count); } - /// descriptorWithProcessIdentifier: - static NSAppleEventDescriptor descriptorWithProcessIdentifier_( - int processIdentifier) { - final _ret = _objc_msgSend_654(_class_NSAppleEventDescriptor, - _sel_descriptorWithProcessIdentifier_, processIdentifier); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// objectsByEvaluatingWithContainers: + objc.ObjCObjectBase? objectsByEvaluatingWithContainers_( + objc.ObjCObjectBase containers) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_objectsByEvaluatingWithContainers_, containers.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// descriptorWithBundleIdentifier: - static NSAppleEventDescriptor descriptorWithBundleIdentifier_( - objc.NSString bundleIdentifier) { - final _ret = _objc_msgSend_656(_class_NSAppleEventDescriptor, - _sel_descriptorWithBundleIdentifier_, bundleIdentifier.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// objectsByEvaluatingSpecifier + objc.ObjCObjectBase? get objectsByEvaluatingSpecifier { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_objectsByEvaluatingSpecifier); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// descriptorWithApplicationURL: - static NSAppleEventDescriptor descriptorWithApplicationURL_( - objc.NSURL applicationURL) { - final _ret = _objc_msgSend_658(_class_NSAppleEventDescriptor, - _sel_descriptorWithApplicationURL_, applicationURL.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// evaluationErrorNumber + int get evaluationErrorNumber { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_evaluationErrorNumber); } - /// initWithAEDescNoCopy: - NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { - final _ret = - _objc_msgSend_660(this.pointer, _sel_initWithAEDescNoCopy_, aeDesc); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: false, release: true); + /// setEvaluationErrorNumber: + set evaluationErrorNumber(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setEvaluationErrorNumber_, value); } - /// initWithDescriptorType:bytes:length: - NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_661( - this.pointer, - _sel_initWithDescriptorType_bytes_length_, - descriptorType, - bytes, - byteCount); + /// evaluationErrorSpecifier + NSScriptObjectSpecifier? get evaluationErrorSpecifier { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluationErrorSpecifier); return _ret.address == 0 ? null - : NSAppleEventDescriptor.castFromPointer(_ret, + : NSScriptObjectSpecifier.castFromPointer(_ret, retain: true, release: true); } - /// initWithDescriptorType:data: - NSAppleEventDescriptor? initWithDescriptorType_data_( - int descriptorType, objc.NSData? data) { - final _ret = _objc_msgSend_662( - this.pointer, - _sel_initWithDescriptorType_data_, - descriptorType, - data?.pointer ?? ffi.nullptr); + /// descriptor + NSAppleEventDescriptor? get descriptor { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_descriptor); return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// initWithEventClass:eventID:targetDescriptor:returnID:transactionID: - NSAppleEventDescriptor - initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _objc_msgSend_663( - this.pointer, - _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, - eventClass, - eventID, - targetDescriptor?.pointer ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// init + NSScriptObjectSpecifier init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - /// initListDescriptor - NSAppleEventDescriptor initListDescriptor() { - final _ret = _objc_msgSend_19(this.pointer, _sel_initListDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// new + static NSScriptObjectSpecifier new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_new); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - /// initRecordDescriptor - NSAppleEventDescriptor initRecordDescriptor() { - final _ret = _objc_msgSend_19(this.pointer, _sel_initRecordDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + /// allocWithZone: + static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - /// aeDesc - ffi.Pointer get aeDesc { - return _objc_msgSend_664(this.pointer, _sel_aeDesc); + /// alloc + static NSScriptObjectSpecifier alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_alloc); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - /// descriptorType - int get descriptorType { - return _objc_msgSend_644(this.pointer, _sel_descriptorType); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } - /// data - objc.NSData get data { - final _ret = _objc_msgSend_113(this.pointer, _sel_data); - return objc.NSData.castFromPointer(_ret, retain: true, release: true); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } - /// booleanValue - int get booleanValue { - return _objc_msgSend_665(this.pointer, _sel_booleanValue); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); } - /// enumCodeValue - int get enumCodeValue { - return _objc_msgSend_644(this.pointer, _sel_enumCodeValue); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); } - /// int32Value - int get int32Value { - return _objc_msgSend_273(this.pointer, _sel_int32Value); + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSScriptObjectSpecifier, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// doubleValue - double get doubleValue { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_doubleValue) - : _objc_msgSend_18(this.pointer, _sel_doubleValue); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSScriptObjectSpecifier, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } - /// typeCodeValue - int get typeCodeValue { - return _objc_msgSend_644(this.pointer, _sel_typeCodeValue); + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScriptObjectSpecifier, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } - /// stringValue - objc.NSString? get stringValue { - final _ret = _objc_msgSend_20(this.pointer, _sel_stringValue); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// dateValue - objc.NSDate? get dateValue { - final _ret = _objc_msgSend_124(this.pointer, _sel_dateValue); - return _ret.address == 0 - ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// fileURLValue - objc.NSURL? get fileURLValue { - final _ret = _objc_msgSend_24(this.pointer, _sel_fileURLValue); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } +} + +late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); +late final _sel_setReceiversSpecifier_ = + objc.registerName("setReceiversSpecifier:"); +late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); +late final _sel_evaluatedArguments = objc.registerName("evaluatedArguments"); +late final _sel_isWellFormed = objc.registerName("isWellFormed"); +late final _sel_performDefaultImplementation = + objc.registerName("performDefaultImplementation"); +late final _sel_executeCommand = objc.registerName("executeCommand"); +late final _sel_scriptErrorNumber = objc.registerName("scriptErrorNumber"); +late final _sel_setScriptErrorNumber_ = + objc.registerName("setScriptErrorNumber:"); +late final _sel_scriptErrorOffendingObjectDescriptor = + objc.registerName("scriptErrorOffendingObjectDescriptor"); +late final _sel_setScriptErrorOffendingObjectDescriptor_ = + objc.registerName("setScriptErrorOffendingObjectDescriptor:"); +late final _sel_scriptErrorExpectedTypeDescriptor = + objc.registerName("scriptErrorExpectedTypeDescriptor"); +late final _sel_setScriptErrorExpectedTypeDescriptor_ = + objc.registerName("setScriptErrorExpectedTypeDescriptor:"); +late final _sel_scriptErrorString = objc.registerName("scriptErrorString"); +late final _sel_setScriptErrorString_ = + objc.registerName("setScriptErrorString:"); +late final _sel_currentCommand = objc.registerName("currentCommand"); +late final _sel_appleEvent = objc.registerName("appleEvent"); +late final _sel_suspendExecution = objc.registerName("suspendExecution"); +late final _sel_resumeExecutionWithResult_ = + objc.registerName("resumeExecutionWithResult:"); + +/// NSScriptCommand +class NSScriptCommand extends objc.NSObject { + NSScriptCommand._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSScriptCommand] that points to the same underlying object as [other]. + NSScriptCommand.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSScriptCommand] that wraps the given raw object pointer. + NSScriptCommand.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSScriptCommand]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); + } + + /// initWithCommandDescription: + NSScriptCommand initWithCommandDescription_( + NSScriptCommandDescription commandDef) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCommandDescription_, commandDef.ref.pointer); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithCoder: + NSScriptCommand? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + : NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - /// eventClass - int get eventClass { - return _objc_msgSend_644(this.pointer, _sel_eventClass); + /// commandDescription + NSScriptCommandDescription get commandDescription { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_commandDescription); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - /// eventID - int get eventID { - return _objc_msgSend_644(this.pointer, _sel_eventID); + /// directParameter + objc.ObjCObjectBase? get directParameter { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_directParameter); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// returnID - int get returnID { - return _objc_msgSend_666(this.pointer, _sel_returnID); + /// setDirectParameter: + set directParameter(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDirectParameter_, + value?.ref.pointer ?? ffi.nullptr); } - /// transactionID - int get transactionID { - return _objc_msgSend_273(this.pointer, _sel_transactionID); + /// receiversSpecifier + NSScriptObjectSpecifier? get receiversSpecifier { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_receiversSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - /// setParamDescriptor:forKeyword: - void setParamDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_667(this.pointer, _sel_setParamDescriptor_forKeyword_, - descriptor.pointer, keyword); + /// setReceiversSpecifier: + set receiversSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setReceiversSpecifier_, + value?.ref.pointer ?? ffi.nullptr); } - /// paramDescriptorForKeyword: - NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_668( - this.pointer, _sel_paramDescriptorForKeyword_, keyword); + /// evaluatedReceivers + objc.ObjCObjectBase? get evaluatedReceivers { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluatedReceivers); return _ret.address == 0 ? null - : NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// removeParamDescriptorWithKeyword: - void removeParamDescriptorWithKeyword_(int keyword) { - _objc_msgSend_669( - this.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); + /// arguments + objc.NSDictionary? get arguments { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// setAttributeDescriptor:forKeyword: - void setAttributeDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_667(this.pointer, _sel_setAttributeDescriptor_forKeyword_, - descriptor.pointer, keyword); + /// setArguments: + set arguments(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setArguments_, + value?.ref.pointer ?? ffi.nullptr); } - /// attributeDescriptorForKeyword: - NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_668( - this.pointer, _sel_attributeDescriptorForKeyword_, keyword); + /// evaluatedArguments + objc.NSDictionary? get evaluatedArguments { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluatedArguments); return _ret.address == 0 ? null - : NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// sendEventWithOptions:timeout:error: - NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( - NSAppleEventSendOptions sendOptions, - double timeoutInSeconds, - ffi.Pointer> error) { - final _ret = _objc_msgSend_670( - this.pointer, - _sel_sendEventWithOptions_timeout_error_, - sendOptions.value, - timeoutInSeconds, - error); + /// isWellFormed + bool get wellFormed { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isWellFormed); + } + + /// performDefaultImplementation + objc.ObjCObjectBase? performDefaultImplementation() { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_performDefaultImplementation); return _ret.address == 0 ? null - : NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// isRecordDescriptor - bool get isRecordDescriptor { - return _objc_msgSend_13(this.pointer, _sel_isRecordDescriptor); + /// executeCommand + objc.ObjCObjectBase? executeCommand() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executeCommand); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// numberOfItems - int get numberOfItems { - return _objc_msgSend_123(this.pointer, _sel_numberOfItems); + /// scriptErrorNumber + int get scriptErrorNumber { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_scriptErrorNumber); } - /// insertDescriptor:atIndex: - void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { - _objc_msgSend_671(this.pointer, _sel_insertDescriptor_atIndex_, - descriptor.pointer, index); + /// setScriptErrorNumber: + set scriptErrorNumber(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setScriptErrorNumber_, value); } - /// descriptorAtIndex: - NSAppleEventDescriptor? descriptorAtIndex_(int index) { - final _ret = - _objc_msgSend_672(this.pointer, _sel_descriptorAtIndex_, index); + /// scriptErrorOffendingObjectDescriptor + NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_scriptErrorOffendingObjectDescriptor); return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } - /// removeDescriptorAtIndex: - void removeDescriptorAtIndex_(int index) { - _objc_msgSend_143(this.pointer, _sel_removeDescriptorAtIndex_, index); + /// setScriptErrorOffendingObjectDescriptor: + set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setScriptErrorOffendingObjectDescriptor_, + value?.ref.pointer ?? ffi.nullptr); } - /// setDescriptor:forKeyword: - void setDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_667(this.pointer, _sel_setDescriptor_forKeyword_, - descriptor.pointer, keyword); + /// scriptErrorExpectedTypeDescriptor + NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_scriptErrorExpectedTypeDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// descriptorForKeyword: - NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + /// setScriptErrorExpectedTypeDescriptor: + set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setScriptErrorExpectedTypeDescriptor_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// scriptErrorString + objc.NSString? get scriptErrorString { final _ret = - _objc_msgSend_668(this.pointer, _sel_descriptorForKeyword_, keyword); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_scriptErrorString); return _ret.address == 0 ? null - : NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// removeDescriptorWithKeyword: - void removeDescriptorWithKeyword_(int keyword) { - _objc_msgSend_669(this.pointer, _sel_removeDescriptorWithKeyword_, keyword); + /// setScriptErrorString: + set scriptErrorString(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setScriptErrorString_, + value?.ref.pointer ?? ffi.nullptr); } - /// keywordForDescriptorAtIndex: - int keywordForDescriptorAtIndex_(int index) { - return _objc_msgSend_673( - this.pointer, _sel_keywordForDescriptorAtIndex_, index); + /// currentCommand + static NSScriptCommand? currentCommand() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptCommand, _sel_currentCommand); + return _ret.address == 0 + ? null + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - /// coerceToDescriptorType: - NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { - final _ret = _objc_msgSend_668( - this.pointer, _sel_coerceToDescriptorType_, descriptorType); + /// appleEvent + NSAppleEventDescriptor? get appleEvent { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_appleEvent); return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); } + /// suspendExecution + void suspendExecution() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_suspendExecution); + } + + /// resumeExecutionWithResult: + void resumeExecutionWithResult_(objc.ObjCObjectBase? result) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_resumeExecutionWithResult_, + result?.ref.pointer ?? ffi.nullptr); + } + /// init - NSAppleEventDescriptor init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: true, release: true); + NSScriptCommand init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } /// new - static NSAppleEventDescriptor new1() { - final _ret = _objc_msgSend_19(_class_NSAppleEventDescriptor, _sel_new); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: false, release: true); + static NSScriptCommand new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommand, _sel_new); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: false, release: true); + static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptCommand, _sel_allocWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSAppleEventDescriptor alloc() { - final _ret = _objc_msgSend_19(_class_NSAppleEventDescriptor, _sel_alloc); - return NSAppleEventDescriptor.castFromPointer(_ret, - retain: false, release: true); + static NSScriptCommand alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommand, _sel_alloc); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -37112,840 +38330,1026 @@ class NSAppleEventDescriptor extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSAppleEventDescriptor, + _objc_msgSend_cqxsqq( + _class_NSScriptCommand, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSAppleEventDescriptor, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_NSAppleEventDescriptor, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_NSScriptCommand, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSAppleEventDescriptor, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSScriptCommand, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSAppleEventDescriptor, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_NSScriptCommand, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSAppleEventDescriptor, + _objc_msgSend_1tjlcwl( + _class_NSScriptCommand, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommand, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } } -late final _class_NSAppleEventDescriptor = - objc.getClass("NSAppleEventDescriptor"); -late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); -final _objc_msgSend_649 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_descriptorWithDescriptorType_bytes_length_ = - objc.registerName("descriptorWithDescriptorType:bytes:length:"); -final _objc_msgSend_650 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); -late final _sel_descriptorWithDescriptorType_data_ = - objc.registerName("descriptorWithDescriptorType:data:"); -final _objc_msgSend_651 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_descriptorWithBoolean_ = - objc.registerName("descriptorWithBoolean:"); -final _objc_msgSend_652 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_descriptorWithEnumCode_ = - objc.registerName("descriptorWithEnumCode:"); -final _objc_msgSend_653 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_descriptorWithInt32_ = - objc.registerName("descriptorWithInt32:"); -final _objc_msgSend_654 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_descriptorWithDouble_ = - objc.registerName("descriptorWithDouble:"); -final _objc_msgSend_655 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, double)>(); -late final _sel_descriptorWithTypeCode_ = - objc.registerName("descriptorWithTypeCode:"); -late final _sel_descriptorWithString_ = - objc.registerName("descriptorWithString:"); -final _objc_msgSend_656 = 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_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); -final _objc_msgSend_657 = 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_descriptorWithFileURL_ = - objc.registerName("descriptorWithFileURL:"); -final _objc_msgSend_658 = 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_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = - objc.registerName( - "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); -final _objc_msgSend_659 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - int, - int)>(); -late final _sel_listDescriptor = objc.registerName("listDescriptor"); -late final _sel_recordDescriptor = objc.registerName("recordDescriptor"); -late final _sel_currentProcessDescriptor = - objc.registerName("currentProcessDescriptor"); -late final _sel_descriptorWithProcessIdentifier_ = - objc.registerName("descriptorWithProcessIdentifier:"); -late final _sel_descriptorWithBundleIdentifier_ = - objc.registerName("descriptorWithBundleIdentifier:"); -late final _sel_descriptorWithApplicationURL_ = - objc.registerName("descriptorWithApplicationURL:"); +late final _sel_createCommandInstance = + objc.registerName("createCommandInstance"); +late final _sel_createCommandInstanceWithZone_ = + objc.registerName("createCommandInstanceWithZone:"); + +/// NSScriptCommandDescription +class NSScriptCommandDescription extends objc.NSObject { + NSScriptCommandDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSScriptCommandDescription] that points to the same underlying object as [other]. + NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSScriptCommandDescription] that wraps the given raw object pointer. + NSScriptCommandDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -@ffi.Packed(2) -final class AEDesc extends ffi.Struct { - @ffi.UnsignedInt() - external int descriptorType; + /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSScriptCommandDescription); + } - external ffi.Pointer> dataHandle; -} + /// init + NSScriptCommandDescription init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); + } -final class OpaqueAEDataStorageType extends ffi.Opaque {} + /// initWithSuiteName:commandName:dictionary: + NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( + objc.NSString suiteName, + objc.NSString commandName, + objc.NSDictionary? commandDeclaration) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithSuiteName_commandName_dictionary_, + suiteName.ref.pointer, + commandName.ref.pointer, + commandDeclaration?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); + } -late final _sel_initWithAEDescNoCopy_ = - objc.registerName("initWithAEDescNoCopy:"); -final _objc_msgSend_660 = 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_initWithDescriptorType_bytes_length_ = - objc.registerName("initWithDescriptorType:bytes:length:"); -final _objc_msgSend_661 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); -late final _sel_initWithDescriptorType_data_ = - objc.registerName("initWithDescriptorType:data:"); -final _objc_msgSend_662 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = - objc.registerName( - "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); -final _objc_msgSend_663 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - int, - int)>(); -late final _sel_initListDescriptor = objc.registerName("initListDescriptor"); -late final _sel_initRecordDescriptor = - objc.registerName("initRecordDescriptor"); -late final _sel_aeDesc = objc.registerName("aeDesc"); -final _objc_msgSend_664 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_descriptorType = objc.registerName("descriptorType"); -late final _sel_booleanValue = objc.registerName("booleanValue"); -final _objc_msgSend_665 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedChar Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_enumCodeValue = objc.registerName("enumCodeValue"); -late final _sel_int32Value = objc.registerName("int32Value"); -late final _sel_doubleValue = objc.registerName("doubleValue"); -late final _sel_typeCodeValue = objc.registerName("typeCodeValue"); -late final _sel_dateValue = objc.registerName("dateValue"); -late final _sel_fileURLValue = objc.registerName("fileURLValue"); -late final _sel_eventClass = objc.registerName("eventClass"); -late final _sel_eventID = objc.registerName("eventID"); -late final _sel_returnID = objc.registerName("returnID"); -final _objc_msgSend_666 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Short Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_transactionID = objc.registerName("transactionID"); -late final _sel_setParamDescriptor_forKeyword_ = - objc.registerName("setParamDescriptor:forKeyword:"); -final _objc_msgSend_667 = objc.msgSendPointer + /// initWithCoder: + NSScriptCommandDescription? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); + } + + /// suiteName + objc.NSString get suiteName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_suiteName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// commandName + objc.NSString get commandName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_commandName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// appleEventClassCode + int get appleEventClassCode { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_appleEventClassCode); + } + + /// appleEventCode + int get appleEventCode { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_appleEventCode); + } + + /// commandClassName + objc.NSString get commandClassName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_commandClassName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// returnType + objc.NSString? get returnType { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_returnType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// appleEventCodeForReturnType + int get appleEventCodeForReturnType { + return _objc_msgSend_dzloj4( + this.ref.pointer, _sel_appleEventCodeForReturnType); + } + + /// argumentNames + objc.NSArray get argumentNames { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_argumentNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// typeForArgumentWithName: + objc.NSString? typeForArgumentWithName_(objc.NSString argumentName) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_typeForArgumentWithName_, argumentName.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// appleEventCodeForArgumentWithName: + int appleEventCodeForArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_t2sarz(this.ref.pointer, + _sel_appleEventCodeForArgumentWithName_, argumentName.ref.pointer); + } + + /// isOptionalArgumentWithName: + bool isOptionalArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_l8lotg(this.ref.pointer, + _sel_isOptionalArgumentWithName_, argumentName.ref.pointer); + } + + /// createCommandInstance + NSScriptCommand createCommandInstance() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_createCommandInstance); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + } + + /// createCommandInstanceWithZone: + NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + this.ref.pointer, _sel_createCommandInstanceWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + } + + /// new + static NSScriptCommandDescription new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_new); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); + } + + /// allocWithZone: + static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); + } + + /// alloc + static NSScriptCommandDescription alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_alloc); + return NSScriptCommandDescription.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_cqxsqq( + _class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } + + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1(_class_NSScriptCommandDescription, + _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSScriptCommandDescription, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSScriptCommandDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSScriptCommandDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScriptCommandDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } +} + +late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); +late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); +final _objc_msgSend_1fdwx8i = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_paramDescriptorForKeyword_ = - objc.registerName("paramDescriptorForKeyword:"); -final _objc_msgSend_668 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_removeParamDescriptorWithKeyword_ = - objc.registerName("removeParamDescriptorWithKeyword:"); -final _objc_msgSend_669 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_setAttributeDescriptor_forKeyword_ = - objc.registerName("setAttributeDescriptor:forKeyword:"); -late final _sel_attributeDescriptorForKeyword_ = - objc.registerName("attributeDescriptorForKeyword:"); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_typeForKey_ = objc.registerName("typeForKey:"); +late final _sel_classDescriptionForKey_ = + objc.registerName("classDescriptionForKey:"); +late final _sel_appleEventCodeForKey_ = + objc.registerName("appleEventCodeForKey:"); +late final _sel_keyWithAppleEventCode_ = + objc.registerName("keyWithAppleEventCode:"); +late final _sel_defaultSubcontainerAttributeKey = + objc.registerName("defaultSubcontainerAttributeKey"); +late final _sel_isLocationRequiredToCreateForKey_ = + objc.registerName("isLocationRequiredToCreateForKey:"); +late final _sel_hasPropertyForKey_ = objc.registerName("hasPropertyForKey:"); +late final _sel_hasOrderedToManyRelationshipForKey_ = + objc.registerName("hasOrderedToManyRelationshipForKey:"); +late final _sel_hasReadablePropertyForKey_ = + objc.registerName("hasReadablePropertyForKey:"); +late final _sel_hasWritablePropertyForKey_ = + objc.registerName("hasWritablePropertyForKey:"); +late final _sel_isReadOnlyKey_ = objc.registerName("isReadOnlyKey:"); + +/// NSScriptClassDescription +class NSScriptClassDescription extends NSClassDescription { + NSScriptClassDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSScriptClassDescription] that points to the same underlying object as [other]. + NSScriptClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSScriptClassDescription] that wraps the given raw object pointer. + NSScriptClassDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSScriptClassDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); + } + + /// classDescriptionForClass: + static NSClassDescription? classDescriptionForClass_( + objc.ObjCObjectBase aClass) { + final _ret = _objc_msgSend_juohf7(_class_NSScriptClassDescription, + _sel_classDescriptionForClass_, aClass.ref.pointer); + return _ret.address == 0 + ? null + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithSuiteName:className:dictionary: + NSScriptClassDescription? initWithSuiteName_className_dictionary_( + objc.NSString suiteName, + objc.NSString className, + objc.NSDictionary? classDeclaration) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithSuiteName_className_dictionary_, + suiteName.ref.pointer, + className.ref.pointer, + classDeclaration?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); + } + + /// suiteName + objc.NSString? get suiteName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_suiteName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// className + objc.NSString? get className { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_className); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// implementationClassName + objc.NSString? get implementationClassName { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_implementationClassName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// superclassDescription + NSScriptClassDescription? get superclassDescription { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_superclassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); + } + + /// appleEventCode + int get appleEventCode { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_appleEventCode); + } + + /// matchesAppleEventCode: + bool matchesAppleEventCode_(int appleEventCode) { + return _objc_msgSend_1n8vqu1( + this.ref.pointer, _sel_matchesAppleEventCode_, appleEventCode); + } + + /// supportsCommand: + bool supportsCommand_(NSScriptCommandDescription commandDescription) { + return _objc_msgSend_l8lotg(this.ref.pointer, _sel_supportsCommand_, + commandDescription.ref.pointer); + } + + /// selectorForCommand: + ffi.Pointer selectorForCommand_( + NSScriptCommandDescription commandDescription) { + return _objc_msgSend_1fdwx8i(this.ref.pointer, _sel_selectorForCommand_, + commandDescription.ref.pointer); + } + + /// typeForKey: + objc.NSString? typeForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_typeForKey_, key.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// classDescriptionForKey: + NSScriptClassDescription? classDescriptionForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_classDescriptionForKey_, key.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); + } + + /// appleEventCodeForKey: + int appleEventCodeForKey_(objc.NSString key) { + return _objc_msgSend_t2sarz( + this.ref.pointer, _sel_appleEventCodeForKey_, key.ref.pointer); + } + + /// keyWithAppleEventCode: + objc.NSString? keyWithAppleEventCode_(int appleEventCode) { + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_keyWithAppleEventCode_, appleEventCode); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// defaultSubcontainerAttributeKey + objc.NSString? get defaultSubcontainerAttributeKey { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_defaultSubcontainerAttributeKey); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// isLocationRequiredToCreateForKey: + bool isLocationRequiredToCreateForKey_(objc.NSString toManyRelationshipKey) { + return _objc_msgSend_l8lotg( + this.ref.pointer, + _sel_isLocationRequiredToCreateForKey_, + toManyRelationshipKey.ref.pointer); + } + + /// hasPropertyForKey: + bool hasPropertyForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_hasPropertyForKey_, key.ref.pointer); + } + + /// hasOrderedToManyRelationshipForKey: + bool hasOrderedToManyRelationshipForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(this.ref.pointer, + _sel_hasOrderedToManyRelationshipForKey_, key.ref.pointer); + } + + /// hasReadablePropertyForKey: + bool hasReadablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_hasReadablePropertyForKey_, key.ref.pointer); + } + + /// hasWritablePropertyForKey: + bool hasWritablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_hasWritablePropertyForKey_, key.ref.pointer); + } + + /// isReadOnlyKey: + bool isReadOnlyKey_(objc.NSString key) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isReadOnlyKey_, key.ref.pointer); + } + + /// registerClassDescription:forClass: + static void registerClassDescription_forClass_( + NSClassDescription description, objc.ObjCObjectBase aClass) { + _objc_msgSend_1tjlcwl( + _class_NSScriptClassDescription, + _sel_registerClassDescription_forClass_, + description.ref.pointer, + aClass.ref.pointer); + } + + /// invalidateClassDescriptionCache + static void invalidateClassDescriptionCache() { + _objc_msgSend_ksby9f( + _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); + } + + /// init + NSScriptClassDescription init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); + } + + /// new + static NSScriptClassDescription new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_new); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); + } + + /// allocWithZone: + static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptClassDescription, _sel_allocWithZone_, zone); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); + } + + /// alloc + static NSScriptClassDescription alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_alloc); + return NSScriptClassDescription.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_cqxsqq( + _class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); + } -enum NSAppleEventSendOptions { - NSAppleEventSendNoReply(1), - NSAppleEventSendQueueReply(2), - NSAppleEventSendWaitForReply(3), - NSAppleEventSendNeverInteract(16), - NSAppleEventSendCanInteract(32), - NSAppleEventSendAlwaysInteract(48), - NSAppleEventSendCanSwitchLayer(64), - NSAppleEventSendDontRecord(4096), - NSAppleEventSendDontExecute(8192), - NSAppleEventSendDontAnnotate(65536), - NSAppleEventSendDefaultOptions(35); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); + } + + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1( + _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); + } + + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_NSScriptClassDescription, _sel_useStoredAccessor); + } + + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_NSScriptClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_NSScriptClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } + + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScriptClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } + + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } +} + +late final _class_AVAudioSession = objc.getClass("AVAudioSession"); +late final _sel_sharedInstance = objc.registerName("sharedInstance"); +late final _sel_availableCategories = objc.registerName("availableCategories"); +late final _sel_setCategory_error_ = objc.registerName("setCategory:error:"); + +enum AVAudioSessionCategoryOptions { + AVAudioSessionCategoryOptionMixWithOthers(1), + AVAudioSessionCategoryOptionDuckOthers(2), + AVAudioSessionCategoryOptionAllowBluetooth(4), + AVAudioSessionCategoryOptionDefaultToSpeaker(8), + AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers(17), + AVAudioSessionCategoryOptionAllowBluetoothA2DP(32), + AVAudioSessionCategoryOptionAllowAirPlay(64), + AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption(128); final int value; - const NSAppleEventSendOptions(this.value); + const AVAudioSessionCategoryOptions(this.value); - static NSAppleEventSendOptions fromValue(int value) => switch (value) { - 1 => NSAppleEventSendNoReply, - 2 => NSAppleEventSendQueueReply, - 3 => NSAppleEventSendWaitForReply, - 16 => NSAppleEventSendNeverInteract, - 32 => NSAppleEventSendCanInteract, - 48 => NSAppleEventSendAlwaysInteract, - 64 => NSAppleEventSendCanSwitchLayer, - 4096 => NSAppleEventSendDontRecord, - 8192 => NSAppleEventSendDontExecute, - 65536 => NSAppleEventSendDontAnnotate, - 35 => NSAppleEventSendDefaultOptions, + static AVAudioSessionCategoryOptions fromValue(int value) => switch (value) { + 1 => AVAudioSessionCategoryOptionMixWithOthers, + 2 => AVAudioSessionCategoryOptionDuckOthers, + 4 => AVAudioSessionCategoryOptionAllowBluetooth, + 8 => AVAudioSessionCategoryOptionDefaultToSpeaker, + 17 => AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers, + 32 => AVAudioSessionCategoryOptionAllowBluetoothA2DP, + 64 => AVAudioSessionCategoryOptionAllowAirPlay, + 128 => AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption, _ => throw ArgumentError( - "Unknown value for NSAppleEventSendOptions: $value"), + "Unknown value for AVAudioSessionCategoryOptions: $value"), }; } - -late final _sel_sendEventWithOptions_timeout_error_ = - objc.registerName("sendEventWithOptions:timeout:error:"); -final _objc_msgSend_670 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Double, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - double, - ffi.Pointer>)>(); -late final _sel_isRecordDescriptor = objc.registerName("isRecordDescriptor"); -late final _sel_numberOfItems = objc.registerName("numberOfItems"); -late final _sel_insertDescriptor_atIndex_ = - objc.registerName("insertDescriptor:atIndex:"); -final _objc_msgSend_671 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); -final _objc_msgSend_672 = 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_removeDescriptorAtIndex_ = - objc.registerName("removeDescriptorAtIndex:"); -late final _sel_setDescriptor_forKeyword_ = - objc.registerName("setDescriptor:forKeyword:"); -late final _sel_descriptorForKeyword_ = - objc.registerName("descriptorForKeyword:"); -late final _sel_removeDescriptorWithKeyword_ = - objc.registerName("removeDescriptorWithKeyword:"); -late final _sel_keywordForDescriptorAtIndex_ = - objc.registerName("keywordForDescriptorAtIndex:"); -final _objc_msgSend_673 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_coerceToDescriptorType_ = - objc.registerName("coerceToDescriptorType:"); -late final _sel_objectSpecifierWithDescriptor_ = - objc.registerName("objectSpecifierWithDescriptor:"); -final _objc_msgSend_674 = 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_initWithContainerSpecifier_key_ = - objc.registerName("initWithContainerSpecifier:key:"); -final _objc_msgSend_675 = 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_initWithContainerClassDescription_containerSpecifier_key_ = objc - .registerName("initWithContainerClassDescription:containerSpecifier:key:"); -final _objc_msgSend_676 = 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_childSpecifier = objc.registerName("childSpecifier"); -final _objc_msgSend_677 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); -final _objc_msgSend_678 = 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_containerSpecifier = objc.registerName("containerSpecifier"); -late final _sel_setContainerSpecifier_ = - objc.registerName("setContainerSpecifier:"); -late final _sel_containerIsObjectBeingTested = - objc.registerName("containerIsObjectBeingTested"); -late final _sel_setContainerIsObjectBeingTested_ = - objc.registerName("setContainerIsObjectBeingTested:"); -late final _sel_containerIsRangeContainerObject = - objc.registerName("containerIsRangeContainerObject"); -late final _sel_setContainerIsRangeContainerObject_ = - objc.registerName("setContainerIsRangeContainerObject:"); -late final _sel_key = objc.registerName("key"); -late final _sel_setKey_ = objc.registerName("setKey:"); -late final _sel_containerClassDescription = - objc.registerName("containerClassDescription"); -late final _sel_setContainerClassDescription_ = - objc.registerName("setContainerClassDescription:"); -final _objc_msgSend_679 = 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_keyClassDescription = objc.registerName("keyClassDescription"); -late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = - objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); -final _objc_msgSend_680 = objc.msgSendPointer + +late final _sel_setCategory_withOptions_error_ = + objc.registerName("setCategory:withOptions:error:"); +final _objc_msgSend_1qqeo92 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_objectsByEvaluatingWithContainers_ = - objc.registerName("objectsByEvaluatingWithContainers:"); -final _objc_msgSend_681 = objc.msgSendPointer + int, + ffi.Pointer>)>(); +late final _sel_setCategory_mode_options_error_ = + objc.registerName("setCategory:mode:options:error:"); +final _objc_msgSend_1w2nczj = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_objectsByEvaluatingSpecifier = - objc.registerName("objectsByEvaluatingSpecifier"); -late final _sel_evaluationErrorNumber = - objc.registerName("evaluationErrorNumber"); -late final _sel_setEvaluationErrorNumber_ = - objc.registerName("setEvaluationErrorNumber:"); -late final _sel_evaluationErrorSpecifier = - objc.registerName("evaluationErrorSpecifier"); -late final _sel_descriptor = objc.registerName("descriptor"); -final _objc_msgSend_682 = 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)>(); -late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); -late final _sel_setReceiversSpecifier_ = - objc.registerName("setReceiversSpecifier:"); -late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); -late final _sel_evaluatedArguments = objc.registerName("evaluatedArguments"); -late final _sel_isWellFormed = objc.registerName("isWellFormed"); -late final _sel_performDefaultImplementation = - objc.registerName("performDefaultImplementation"); -late final _sel_executeCommand = objc.registerName("executeCommand"); -late final _sel_scriptErrorNumber = objc.registerName("scriptErrorNumber"); -late final _sel_setScriptErrorNumber_ = - objc.registerName("setScriptErrorNumber:"); -late final _sel_scriptErrorOffendingObjectDescriptor = - objc.registerName("scriptErrorOffendingObjectDescriptor"); -late final _sel_setScriptErrorOffendingObjectDescriptor_ = - objc.registerName("setScriptErrorOffendingObjectDescriptor:"); -final _objc_msgSend_683 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + +enum AVAudioSessionRouteSharingPolicy { + AVAudioSessionRouteSharingPolicyDefault(0), + AVAudioSessionRouteSharingPolicyLongFormAudio(1), + AVAudioSessionRouteSharingPolicyIndependent(2), + AVAudioSessionRouteSharingPolicyLongFormVideo(3); + + static const AVAudioSessionRouteSharingPolicyLongForm = + AVAudioSessionRouteSharingPolicyLongFormAudio; + + final int value; + const AVAudioSessionRouteSharingPolicy(this.value); + + static AVAudioSessionRouteSharingPolicy fromValue(int value) => + switch (value) { + 0 => AVAudioSessionRouteSharingPolicyDefault, + 1 => AVAudioSessionRouteSharingPolicyLongFormAudio, + 2 => AVAudioSessionRouteSharingPolicyIndependent, + 3 => AVAudioSessionRouteSharingPolicyLongFormVideo, + _ => throw ArgumentError( + "Unknown value for AVAudioSessionRouteSharingPolicy: $value"), + }; + + @override + String toString() { + if (this == AVAudioSessionRouteSharingPolicyLongFormAudio) + return "AVAudioSessionRouteSharingPolicy.AVAudioSessionRouteSharingPolicyLongFormAudio, AVAudioSessionRouteSharingPolicy.AVAudioSessionRouteSharingPolicyLongForm"; + return super.toString(); + } +} + +late final _sel_setCategory_mode_routeSharingPolicy_options_error_ = + objc.registerName("setCategory:mode:routeSharingPolicy:options:error:"); +final _objc_msgSend_3ejcy4 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_scriptErrorExpectedTypeDescriptor = - objc.registerName("scriptErrorExpectedTypeDescriptor"); -late final _sel_setScriptErrorExpectedTypeDescriptor_ = - objc.registerName("setScriptErrorExpectedTypeDescriptor:"); -late final _sel_scriptErrorString = objc.registerName("scriptErrorString"); -late final _sel_setScriptErrorString_ = - objc.registerName("setScriptErrorString:"); -late final _sel_currentCommand = objc.registerName("currentCommand"); -final _objc_msgSend_684 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer>)>(); +late final _sel_category = objc.registerName("category"); +late final _sel_categoryOptions = objc.registerName("categoryOptions"); +final _objc_msgSend_ulkd0k = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_appleEvent = objc.registerName("appleEvent"); -late final _sel_suspendExecution = objc.registerName("suspendExecution"); -late final _sel_resumeExecutionWithResult_ = - objc.registerName("resumeExecutionWithResult:"); -late final _sel_createCommandInstance = - objc.registerName("createCommandInstance"); -final _objc_msgSend_685 = objc.msgSendPointer +late final _sel_routeSharingPolicy = objc.registerName("routeSharingPolicy"); +final _objc_msgSend_11368np = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_createCommandInstanceWithZone_ = - objc.registerName("createCommandInstanceWithZone:"); -final _objc_msgSend_686 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); -late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); -final _objc_msgSend_687 = objc.msgSendPointer +late final _sel_availableModes = objc.registerName("availableModes"); +late final _sel_setMode_error_ = objc.registerName("setMode:error:"); +late final _sel_mode = objc.registerName("mode"); +late final _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_ = + objc.registerName("setAllowHapticsAndSystemSoundsDuringRecording:error:"); +final _objc_msgSend_1867uf2 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool, + ffi.Pointer>)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); -final _objc_msgSend_688 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer>)>(); +late final _sel_allowHapticsAndSystemSoundsDuringRecording = + objc.registerName("allowHapticsAndSystemSoundsDuringRecording"); + +enum AVAudioSessionRecordPermission { + AVAudioSessionRecordPermissionUndetermined(1970168948), + AVAudioSessionRecordPermissionDenied(1684369017), + AVAudioSessionRecordPermissionGranted(1735552628); + + final int value; + const AVAudioSessionRecordPermission(this.value); + + static AVAudioSessionRecordPermission fromValue(int value) => switch (value) { + 1970168948 => AVAudioSessionRecordPermissionUndetermined, + 1684369017 => AVAudioSessionRecordPermissionDenied, + 1735552628 => AVAudioSessionRecordPermissionGranted, + _ => throw ArgumentError( + "Unknown value for AVAudioSessionRecordPermission: $value"), + }; +} + +late final _sel_recordPermission = objc.registerName("recordPermission"); +final _objc_msgSend_qybqeg = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_typeForKey_ = objc.registerName("typeForKey:"); -late final _sel_classDescriptionForKey_ = - objc.registerName("classDescriptionForKey:"); -final _objc_msgSend_689 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requestRecordPermission_ = + objc.registerName("requestRecordPermission:"); + +enum AVAudioSessionPortOverride { + AVAudioSessionPortOverrideNone(0), + AVAudioSessionPortOverrideSpeaker(1936747378); + + final int value; + const AVAudioSessionPortOverride(this.value); + + static AVAudioSessionPortOverride fromValue(int value) => switch (value) { + 0 => AVAudioSessionPortOverrideNone, + 1936747378 => AVAudioSessionPortOverrideSpeaker, + _ => throw ArgumentError( + "Unknown value for AVAudioSessionPortOverride: $value"), + }; +} + +late final _sel_overrideOutputAudioPort_error_ = + objc.registerName("overrideOutputAudioPort:error:"); +final _objc_msgSend_pcgmhk = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_appleEventCodeForKey_ = - objc.registerName("appleEventCodeForKey:"); -late final _sel_keyWithAppleEventCode_ = - objc.registerName("keyWithAppleEventCode:"); -final _objc_msgSend_690 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_defaultSubcontainerAttributeKey = - objc.registerName("defaultSubcontainerAttributeKey"); -late final _sel_isLocationRequiredToCreateForKey_ = - objc.registerName("isLocationRequiredToCreateForKey:"); -late final _sel_hasPropertyForKey_ = objc.registerName("hasPropertyForKey:"); -late final _sel_hasOrderedToManyRelationshipForKey_ = - objc.registerName("hasOrderedToManyRelationshipForKey:"); -late final _sel_hasReadablePropertyForKey_ = - objc.registerName("hasReadablePropertyForKey:"); -late final _sel_hasWritablePropertyForKey_ = - objc.registerName("hasWritablePropertyForKey:"); -late final _sel_isReadOnlyKey_ = objc.registerName("isReadOnlyKey:"); + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _class_AVAudioSessionPortDescription = + objc.getClass("AVAudioSessionPortDescription"); +late final _sel_portType = objc.registerName("portType"); +late final _sel_portName = objc.registerName("portName"); +late final _sel_UID = objc.registerName("UID"); +late final _sel_hasHardwareVoiceCallProcessing = + objc.registerName("hasHardwareVoiceCallProcessing"); +late final _sel_isSpatialAudioEnabled = + objc.registerName("isSpatialAudioEnabled"); +late final _sel_channels = objc.registerName("channels"); +late final _sel_dataSources = objc.registerName("dataSources"); +late final _class_AVAudioSessionDataSourceDescription = + objc.getClass("AVAudioSessionDataSourceDescription"); +late final _sel_dataSourceID = objc.registerName("dataSourceID"); +late final _sel_dataSourceName = objc.registerName("dataSourceName"); +late final _sel_location = objc.registerName("location"); +late final _sel_orientation = objc.registerName("orientation"); +late final _sel_supportedPolarPatterns = + objc.registerName("supportedPolarPatterns"); +late final _sel_selectedPolarPattern = + objc.registerName("selectedPolarPattern"); +late final _sel_preferredPolarPattern = + objc.registerName("preferredPolarPattern"); +late final _sel_setPreferredPolarPattern_error_ = + objc.registerName("setPreferredPolarPattern:error:"); -/// NSClassDescription -class NSClassDescription extends objc.NSObject { - NSClassDescription._(ffi.Pointer pointer, +/// AVAudioSessionDataSourceDescription +class AVAudioSessionDataSourceDescription extends objc.NSObject { + AVAudioSessionDataSourceDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSClassDescription] that points to the same underlying object as [other]. - NSClassDescription.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [AVAudioSessionDataSourceDescription] that points to the same underlying object as [other]. + AVAudioSessionDataSourceDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSClassDescription] that wraps the given raw object pointer. - NSClassDescription.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) + /// Constructs a [AVAudioSessionDataSourceDescription] that wraps the given raw object pointer. + AVAudioSessionDataSourceDescription.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSClassDescription]. + /// Returns whether [obj] is an instance of [AVAudioSessionDataSourceDescription]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSClassDescription); + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_AVAudioSessionDataSourceDescription); } - /// registerClassDescription:forClass: - static void registerClassDescription_forClass_( - NSClassDescription description, objc.ObjCObjectBase aClass) { - _objc_msgSend_691( - _class_NSClassDescription, - _sel_registerClassDescription_forClass_, - description.pointer, - aClass.pointer); + /// dataSourceID + objc.NSNumber get dataSourceID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dataSourceID); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - /// invalidateClassDescriptionCache - static void invalidateClassDescriptionCache() { - _objc_msgSend_7( - _class_NSClassDescription, _sel_invalidateClassDescriptionCache); + /// dataSourceName + objc.NSString get dataSourceName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dataSourceName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// classDescriptionForClass: - static NSClassDescription? classDescriptionForClass_( - objc.ObjCObjectBase aClass) { - final _ret = _objc_msgSend_692(_class_NSClassDescription, - _sel_classDescriptionForClass_, aClass.pointer); + /// location + objc.NSString? get location { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_location); return _ret.address == 0 ? null - : NSClassDescription.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// attributeKeys - objc.NSArray get attributeKeys { - final _ret = _objc_msgSend_33(this.pointer, _sel_attributeKeys); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// orientation + objc.NSString? get orientation { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_orientation); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// toOneRelationshipKeys - objc.NSArray get toOneRelationshipKeys { - final _ret = _objc_msgSend_33(this.pointer, _sel_toOneRelationshipKeys); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// supportedPolarPatterns + objc.NSArray? get supportedPolarPatterns { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_supportedPolarPatterns); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// toManyRelationshipKeys - objc.NSArray get toManyRelationshipKeys { - final _ret = _objc_msgSend_33(this.pointer, _sel_toManyRelationshipKeys); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// selectedPolarPattern + objc.NSString? get selectedPolarPattern { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_selectedPolarPattern); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// inverseForRelationshipKey: - objc.NSString? inverseForRelationshipKey_(objc.NSString relationshipKey) { - final _ret = _objc_msgSend_42( - this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); + /// preferredPolarPattern + objc.NSString? get preferredPolarPattern { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredPolarPattern); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); } + /// setPreferredPolarPattern:error: + bool setPreferredPolarPattern_error_(objc.NSString? pattern, + ffi.Pointer> outError) { + return _objc_msgSend_p02k6o( + this.ref.pointer, + _sel_setPreferredPolarPattern_error_, + pattern?.ref.pointer ?? ffi.nullptr, + outError); + } + /// init - NSClassDescription init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return NSClassDescription.castFromPointer(_ret, - retain: true, release: true); + AVAudioSessionDataSourceDescription init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, + retain: false, release: true); } /// new - static NSClassDescription new1() { - final _ret = _objc_msgSend_19(_class_NSClassDescription, _sel_new); - return NSClassDescription.castFromPointer(_ret, + static AVAudioSessionDataSourceDescription new1() { + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSessionDataSourceDescription, _sel_new); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_NSClassDescription, _sel_allocWithZone_, zone); - return NSClassDescription.castFromPointer(_ret, + static AVAudioSessionDataSourceDescription allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_AVAudioSessionDataSourceDescription, _sel_allocWithZone_, zone); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSClassDescription alloc() { - final _ret = _objc_msgSend_19(_class_NSClassDescription, _sel_alloc); - return NSClassDescription.castFromPointer(_ret, + static AVAudioSessionDataSourceDescription alloc() { + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSessionDataSourceDescription, _sel_alloc); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } @@ -37954,659 +39358,759 @@ class NSClassDescription extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_NSClassDescription, + _objc_msgSend_cqxsqq( + _class_AVAudioSessionDataSourceDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_NSClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_AVAudioSessionDataSourceDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1(_class_AVAudioSessionDataSourceDescription, + _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_NSClassDescription, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_AVAudioSessionDataSourceDescription, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_NSClassDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7( + _class_AVAudioSessionDataSourceDescription, + _sel_keyPathsForValuesAffectingValueForKey_, + key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_NSClassDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_AVAudioSessionDataSourceDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_NSClassDescription, + _objc_msgSend_1tjlcwl( + _class_AVAudioSessionDataSourceDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSessionDataSourceDescription, + _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_NSClassDescription, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSessionDataSourceDescription, + _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_NSClassDescription = objc.getClass("NSClassDescription"); -late final _sel_registerClassDescription_forClass_ = - objc.registerName("registerClassDescription:forClass:"); -final _objc_msgSend_691 = 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_invalidateClassDescriptionCache = - objc.registerName("invalidateClassDescriptionCache"); -final _objc_msgSend_692 = 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_attributeKeys = objc.registerName("attributeKeys"); -late final _sel_toOneRelationshipKeys = - objc.registerName("toOneRelationshipKeys"); -late final _sel_toManyRelationshipKeys = - objc.registerName("toManyRelationshipKeys"); -late final _sel_inverseForRelationshipKey_ = - objc.registerName("inverseForRelationshipKey:"); - -/// AVAudioSession -class AVAudioSession extends objc.NSObject { - AVAudioSession._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [AVAudioSession] that points to the same underlying object as [other]. - AVAudioSession.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [AVAudioSession] that wraps the given raw object pointer. - AVAudioSession.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [AVAudioSession]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_AVAudioSession); - } - - /// sharedInstance - static AVAudioSession sharedInstance() { - final _ret = _objc_msgSend_693(_class_AVAudioSession, _sel_sharedInstance); - return AVAudioSession.castFromPointer(_ret, retain: true, release: true); - } - - /// availableCategories - objc.NSArray get availableCategories { - final _ret = _objc_msgSend_33(this.pointer, _sel_availableCategories); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// setCategory:error: - bool setCategory_error_(objc.NSString category, - ffi.Pointer> outError) { - return _objc_msgSend_294( - this.pointer, _sel_setCategory_error_, category.pointer, outError); - } - /// setCategory:withOptions:error: - bool setCategory_withOptions_error_( - objc.NSString category, - AVAudioSessionCategoryOptions options, - ffi.Pointer> outError) { - return _objc_msgSend_694(this.pointer, _sel_setCategory_withOptions_error_, - category.pointer, options.value, outError); + /// self + AVAudioSessionDataSourceDescription self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, + retain: true, release: true); } - /// setCategory:mode:options:error: - bool setCategory_mode_options_error_( - objc.NSString category, - objc.NSString mode, - AVAudioSessionCategoryOptions options, - ffi.Pointer> outError) { - return _objc_msgSend_695(this.pointer, _sel_setCategory_mode_options_error_, - category.pointer, mode.pointer, options.value, outError); + /// retain + AVAudioSessionDataSourceDescription retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, + retain: true, release: true); } - /// setCategory:mode:routeSharingPolicy:options:error: - bool setCategory_mode_routeSharingPolicy_options_error_( - objc.NSString category, - objc.NSString mode, - AVAudioSessionRouteSharingPolicy policy, - AVAudioSessionCategoryOptions options, - ffi.Pointer> outError) { - return _objc_msgSend_696( - this.pointer, - _sel_setCategory_mode_routeSharingPolicy_options_error_, - category.pointer, - mode.pointer, - policy.value, - options.value, - outError); + /// autorelease + AVAudioSessionDataSourceDescription autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, + retain: true, release: true); } +} - /// category - objc.NSString get category { - final _ret = _objc_msgSend_11(this.pointer, _sel_category); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_selectedDataSource = objc.registerName("selectedDataSource"); +late final _sel_preferredDataSource = objc.registerName("preferredDataSource"); +late final _sel_setPreferredDataSource_error_ = + objc.registerName("setPreferredDataSource:error:"); - /// categoryOptions - AVAudioSessionCategoryOptions get categoryOptions { - final _ret = _objc_msgSend_697(this.pointer, _sel_categoryOptions); - return AVAudioSessionCategoryOptions.fromValue(_ret); - } +/// AVAudioSessionPortDescription +class AVAudioSessionPortDescription extends objc.NSObject { + AVAudioSessionPortDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// routeSharingPolicy - AVAudioSessionRouteSharingPolicy get routeSharingPolicy { - final _ret = _objc_msgSend_698(this.pointer, _sel_routeSharingPolicy); - return AVAudioSessionRouteSharingPolicy.fromValue(_ret); - } + /// Constructs a [AVAudioSessionPortDescription] that points to the same underlying object as [other]. + AVAudioSessionPortDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// availableModes - objc.NSArray get availableModes { - final _ret = _objc_msgSend_33(this.pointer, _sel_availableModes); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + /// Constructs a [AVAudioSessionPortDescription] that wraps the given raw object pointer. + AVAudioSessionPortDescription.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); - /// setMode:error: - bool setMode_error_( - objc.NSString mode, ffi.Pointer> outError) { - return _objc_msgSend_294( - this.pointer, _sel_setMode_error_, mode.pointer, outError); + /// Returns whether [obj] is an instance of [AVAudioSessionPortDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_AVAudioSessionPortDescription); } - /// mode - objc.NSString get mode { - final _ret = _objc_msgSend_11(this.pointer, _sel_mode); + /// portType + objc.NSString get portType { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_portType); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setAllowHapticsAndSystemSoundsDuringRecording:error: - bool setAllowHapticsAndSystemSoundsDuringRecording_error_( - bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_699( - this.pointer, - _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_, - inValue, - outError); + /// portName + objc.NSString get portName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_portName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// allowHapticsAndSystemSoundsDuringRecording - bool get allowHapticsAndSystemSoundsDuringRecording { - return _objc_msgSend_13( - this.pointer, _sel_allowHapticsAndSystemSoundsDuringRecording); + /// UID + objc.NSString get UID { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_UID); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// recordPermission - AVAudioSessionRecordPermission get recordPermission { - final _ret = _objc_msgSend_700(this.pointer, _sel_recordPermission); - return AVAudioSessionRecordPermission.fromValue(_ret); + /// hasHardwareVoiceCallProcessing + bool get hasHardwareVoiceCallProcessing { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_hasHardwareVoiceCallProcessing); } - /// requestRecordPermission: - void requestRecordPermission_(ObjCBlock_ffiVoid_bool response) { - _objc_msgSend_701( - this.pointer, _sel_requestRecordPermission_, response.pointer); + /// isSpatialAudioEnabled + bool get spatialAudioEnabled { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSpatialAudioEnabled); } - /// overrideOutputAudioPort:error: - bool overrideOutputAudioPort_error_(AVAudioSessionPortOverride portOverride, - ffi.Pointer> outError) { - return _objc_msgSend_702(this.pointer, _sel_overrideOutputAudioPort_error_, - portOverride.value, outError); + /// channels + objc.NSArray? get channels { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_channels); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setPreferredInput:error: - bool setPreferredInput_error_(AVAudioSessionPortDescription? inPort, - ffi.Pointer> outError) { - return _objc_msgSend_706(this.pointer, _sel_setPreferredInput_error_, - inPort?.pointer ?? ffi.nullptr, outError); + /// dataSources + objc.NSArray? get dataSources { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dataSources); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// preferredInput - AVAudioSessionPortDescription? get preferredInput { - final _ret = _objc_msgSend_707(this.pointer, _sel_preferredInput); + /// selectedDataSource + AVAudioSessionDataSourceDescription? get selectedDataSource { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_selectedDataSource); return _ret.address == 0 ? null - : AVAudioSessionPortDescription.castFromPointer(_ret, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } - /// setPrefersNoInterruptionsFromSystemAlerts:error: - bool setPrefersNoInterruptionsFromSystemAlerts_error_( - bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_699( - this.pointer, - _sel_setPrefersNoInterruptionsFromSystemAlerts_error_, - inValue, - outError); + /// preferredDataSource + AVAudioSessionDataSourceDescription? get preferredDataSource { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredDataSource); + return _ret.address == 0 + ? null + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, + retain: true, release: true); } - /// prefersNoInterruptionsFromSystemAlerts - bool get prefersNoInterruptionsFromSystemAlerts { - return _objc_msgSend_13( - this.pointer, _sel_prefersNoInterruptionsFromSystemAlerts); + /// setPreferredDataSource:error: + bool setPreferredDataSource_error_( + AVAudioSessionDataSourceDescription? dataSource, + ffi.Pointer> outError) { + return _objc_msgSend_p02k6o( + this.ref.pointer, + _sel_setPreferredDataSource_error_, + dataSource?.ref.pointer ?? ffi.nullptr, + outError); } - /// setActive:error: - bool setActive_error_( - bool active, ffi.Pointer> outError) { - return _objc_msgSend_699( - this.pointer, _sel_setActive_error_, active, outError); + /// init + AVAudioSessionPortDescription init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: false, release: true); } - /// setActive:withOptions:error: - bool setActive_withOptions_error_( - bool active, - AVAudioSessionSetActiveOptions options, - ffi.Pointer> outError) { - return _objc_msgSend_708(this.pointer, _sel_setActive_withOptions_error_, - active, options.value, outError); + /// new + static AVAudioSessionPortDescription new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_AVAudioSessionPortDescription, _sel_new); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: false, release: true); } - /// activateWithOptions:completionHandler: - void activateWithOptions_completionHandler_( - AVAudioSessionActivationOptions options, - ObjCBlock_ffiVoid_bool_NSError handler) { - _objc_msgSend_709(this.pointer, _sel_activateWithOptions_completionHandler_, - options.value, handler.pointer); + /// allocWithZone: + static AVAudioSessionPortDescription allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_AVAudioSessionPortDescription, _sel_allocWithZone_, zone); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: false, release: true); } - /// setPreferredSampleRate:error: - bool setPreferredSampleRate_error_( - double sampleRate, ffi.Pointer> outError) { - return _objc_msgSend_710( - this.pointer, _sel_setPreferredSampleRate_error_, sampleRate, outError); + /// alloc + static AVAudioSessionPortDescription alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_AVAudioSessionPortDescription, _sel_alloc); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: false, release: true); } - /// preferredSampleRate - double get preferredSampleRate { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_preferredSampleRate) - : _objc_msgSend_18(this.pointer, _sel_preferredSampleRate); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_AVAudioSessionPortDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } - /// setPreferredIOBufferDuration:error: - bool setPreferredIOBufferDuration_error_( - double duration, ffi.Pointer> outError) { - return _objc_msgSend_710(this.pointer, - _sel_setPreferredIOBufferDuration_error_, duration, outError); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_AVAudioSessionPortDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } - /// preferredIOBufferDuration - double get preferredIOBufferDuration { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_preferredIOBufferDuration) - : _objc_msgSend_18(this.pointer, _sel_preferredIOBufferDuration); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_olxnu1(_class_AVAudioSessionPortDescription, + _sel_accessInstanceVariablesDirectly); } - /// setPreferredInputNumberOfChannels:error: - bool setPreferredInputNumberOfChannels_error_( - int count, ffi.Pointer> outError) { - return _objc_msgSend_711(this.pointer, - _sel_setPreferredInputNumberOfChannels_error_, count, outError); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1( + _class_AVAudioSessionPortDescription, _sel_useStoredAccessor); } - /// preferredInputNumberOfChannels - int get preferredInputNumberOfChannels { - return _objc_msgSend_123(this.pointer, _sel_preferredInputNumberOfChannels); + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_AVAudioSessionPortDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// setPreferredOutputNumberOfChannels:error: - bool setPreferredOutputNumberOfChannels_error_( - int count, ffi.Pointer> outError) { - return _objc_msgSend_711(this.pointer, - _sel_setPreferredOutputNumberOfChannels_error_, count, outError); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_AVAudioSessionPortDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } - /// preferredOutputNumberOfChannels - int get preferredOutputNumberOfChannels { - return _objc_msgSend_123( - this.pointer, _sel_preferredOutputNumberOfChannels); + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_AVAudioSessionPortDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } - /// setPreferredInputOrientation:error: - bool setPreferredInputOrientation_error_(AVAudioStereoOrientation orientation, - ffi.Pointer> outError) { - return _objc_msgSend_712(this.pointer, - _sel_setPreferredInputOrientation_error_, orientation.value, outError); + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioSessionPortDescription, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// preferredInputOrientation - AVAudioStereoOrientation get preferredInputOrientation { - final _ret = - _objc_msgSend_713(this.pointer, _sel_preferredInputOrientation); - return AVAudioStereoOrientation.fromValue(_ret); + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSessionPortDescription, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// inputOrientation - AVAudioStereoOrientation get inputOrientation { - final _ret = _objc_msgSend_713(this.pointer, _sel_inputOrientation); - return AVAudioStereoOrientation.fromValue(_ret); + /// self + AVAudioSessionPortDescription self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: true, release: true); } - /// maximumInputNumberOfChannels - int get maximumInputNumberOfChannels { - return _objc_msgSend_123(this.pointer, _sel_maximumInputNumberOfChannels); + /// retain + AVAudioSessionPortDescription retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: true, release: true); } - /// maximumOutputNumberOfChannels - int get maximumOutputNumberOfChannels { - return _objc_msgSend_123(this.pointer, _sel_maximumOutputNumberOfChannels); + /// autorelease + AVAudioSessionPortDescription autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: true, release: true); } +} - /// setInputGain:error: - bool setInputGain_error_( - double gain, ffi.Pointer> outError) { - return _objc_msgSend_714( - this.pointer, _sel_setInputGain_error_, gain, outError); - } +late final _sel_setPreferredInput_error_ = + objc.registerName("setPreferredInput:error:"); +late final _sel_preferredInput = objc.registerName("preferredInput"); +late final _sel_setPrefersNoInterruptionsFromSystemAlerts_error_ = + objc.registerName("setPrefersNoInterruptionsFromSystemAlerts:error:"); +late final _sel_prefersNoInterruptionsFromSystemAlerts = + objc.registerName("prefersNoInterruptionsFromSystemAlerts"); +late final _sel_setActive_error_ = objc.registerName("setActive:error:"); - /// inputGain - double get inputGain { - return objc.useMsgSendVariants - ? _objc_msgSend_358Fpret(this.pointer, _sel_inputGain) - : _objc_msgSend_358(this.pointer, _sel_inputGain); - } +enum AVAudioSessionSetActiveOptions { + AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation(1); - /// isInputGainSettable - bool get inputGainSettable { - return _objc_msgSend_13(this.pointer, _sel_isInputGainSettable); - } + final int value; + const AVAudioSessionSetActiveOptions(this.value); - /// isInputAvailable - bool get inputAvailable { - return _objc_msgSend_13(this.pointer, _sel_isInputAvailable); - } + static AVAudioSessionSetActiveOptions fromValue(int value) => switch (value) { + 1 => AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation, + _ => throw ArgumentError( + "Unknown value for AVAudioSessionSetActiveOptions: $value"), + }; +} - /// inputDataSources - objc.NSArray? get inputDataSources { - final _ret = _objc_msgSend_86(this.pointer, _sel_inputDataSources); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_setActive_withOptions_error_ = + objc.registerName("setActive:withOptions:error:"); +final _objc_msgSend_ydjcyk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); - /// inputDataSource - AVAudioSessionDataSourceDescription? get inputDataSource { - final _ret = _objc_msgSend_704(this.pointer, _sel_inputDataSource); - return _ret.address == 0 - ? null - : AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: true, release: true); - } +enum AVAudioSessionActivationOptions { + AVAudioSessionActivationOptionNone(0); - /// setInputDataSource:error: - bool setInputDataSource_error_( - AVAudioSessionDataSourceDescription? dataSource, - ffi.Pointer> outError) { - return _objc_msgSend_705(this.pointer, _sel_setInputDataSource_error_, - dataSource?.pointer ?? ffi.nullptr, outError); - } + final int value; + const AVAudioSessionActivationOptions(this.value); - /// outputDataSources - objc.NSArray? get outputDataSources { - final _ret = _objc_msgSend_86(this.pointer, _sel_outputDataSources); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + static AVAudioSessionActivationOptions fromValue(int value) => + switch (value) { + 0 => AVAudioSessionActivationOptionNone, + _ => throw ArgumentError( + "Unknown value for AVAudioSessionActivationOptions: $value"), + }; +} - /// outputDataSource - AVAudioSessionDataSourceDescription? get outputDataSource { - final _ret = _objc_msgSend_704(this.pointer, _sel_outputDataSource); - return _ret.address == 0 - ? null - : AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: true, release: true); - } +void _ObjCBlock_ffiVoid_bool_NSError_fnPtrTrampoline( + ffi.Pointer block, + bool arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, ffi.Pointer arg1)>>() + .asFunction)>()( + arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_bool_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_bool_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline( + ffi.Pointer block, + bool arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + bool, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_bool_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_NSError_listenerTrampoline( + ffi.Pointer block, + bool arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + bool, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} - /// setOutputDataSource:error: - bool setOutputDataSource_error_( - AVAudioSessionDataSourceDescription? dataSource, - ffi.Pointer> outError) { - return _objc_msgSend_705(this.pointer, _sel_setOutputDataSource_error_, - dataSource?.pointer ?? ffi.nullptr, outError); - } +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)> + _ObjCBlock_ffiVoid_bool_NSError_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_bool_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_bool_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - /// sampleRate - double get sampleRate { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_sampleRate) - : _objc_msgSend_18(this.pointer, _sel_sampleRate); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_bool_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// inputNumberOfChannels - int get inputNumberOfChannels { - return _objc_msgSend_123(this.pointer, _sel_inputNumberOfChannels); - } + /// 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. + static objc.ObjCBlock fromFunction( + void Function(bool, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_NSError_closureCallable, + (bool arg0, ffi.Pointer arg1) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); - /// outputNumberOfChannels - int get outputNumberOfChannels { - return _objc_msgSend_123(this.pointer, _sel_outputNumberOfChannels); + /// 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. + static objc.ObjCBlock listener( + void Function(bool, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_NSError_listenerCallable.nativeFunction.cast(), + (bool arg0, ffi.Pointer arg1) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1ej8563(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - /// inputLatency - double get inputLatency { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_inputLatency) - : _objc_msgSend_18(this.pointer, _sel_inputLatency); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_bool_NSError_CallExtension + on objc.ObjCBlock { + void call(bool arg0, objc.NSError? arg1) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Bool arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()( + ref.pointer, arg0, arg1?.ref.pointer ?? ffi.nullptr); +} - /// outputLatency - double get outputLatency { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_outputLatency) - : _objc_msgSend_18(this.pointer, _sel_outputLatency); - } +late final _sel_activateWithOptions_completionHandler_ = + objc.registerName("activateWithOptions:completionHandler:"); +final _objc_msgSend_1igkhc3 = 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_setPreferredSampleRate_error_ = + objc.registerName("setPreferredSampleRate:error:"); +final _objc_msgSend_1kh8jgt = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer>)>(); +late final _sel_preferredSampleRate = objc.registerName("preferredSampleRate"); +late final _sel_setPreferredIOBufferDuration_error_ = + objc.registerName("setPreferredIOBufferDuration:error:"); +late final _sel_preferredIOBufferDuration = + objc.registerName("preferredIOBufferDuration"); +late final _sel_setPreferredInputNumberOfChannels_error_ = + objc.registerName("setPreferredInputNumberOfChannels:error:"); +final _objc_msgSend_1395fec = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_preferredInputNumberOfChannels = + objc.registerName("preferredInputNumberOfChannels"); +late final _sel_setPreferredOutputNumberOfChannels_error_ = + objc.registerName("setPreferredOutputNumberOfChannels:error:"); +late final _sel_preferredOutputNumberOfChannels = + objc.registerName("preferredOutputNumberOfChannels"); - /// IOBufferDuration - double get IOBufferDuration { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_IOBufferDuration) - : _objc_msgSend_18(this.pointer, _sel_IOBufferDuration); - } +enum AVAudioStereoOrientation { + AVAudioStereoOrientationNone(0), + AVAudioStereoOrientationPortrait(1), + AVAudioStereoOrientationPortraitUpsideDown(2), + AVAudioStereoOrientationLandscapeRight(3), + AVAudioStereoOrientationLandscapeLeft(4); - /// isOtherAudioPlaying - bool get otherAudioPlaying { - return _objc_msgSend_13(this.pointer, _sel_isOtherAudioPlaying); - } + final int value; + const AVAudioStereoOrientation(this.value); - /// secondaryAudioShouldBeSilencedHint - bool get secondaryAudioShouldBeSilencedHint { - return _objc_msgSend_13( - this.pointer, _sel_secondaryAudioShouldBeSilencedHint); - } + static AVAudioStereoOrientation fromValue(int value) => switch (value) { + 0 => AVAudioStereoOrientationNone, + 1 => AVAudioStereoOrientationPortrait, + 2 => AVAudioStereoOrientationPortraitUpsideDown, + 3 => AVAudioStereoOrientationLandscapeRight, + 4 => AVAudioStereoOrientationLandscapeLeft, + _ => throw ArgumentError( + "Unknown value for AVAudioStereoOrientation: $value"), + }; +} - /// outputVolume - double get outputVolume { - return objc.useMsgSendVariants - ? _objc_msgSend_358Fpret(this.pointer, _sel_outputVolume) - : _objc_msgSend_358(this.pointer, _sel_outputVolume); - } +late final _sel_setPreferredInputOrientation_error_ = + objc.registerName("setPreferredInputOrientation:error:"); +final _objc_msgSend_1ehfmir = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_preferredInputOrientation = + objc.registerName("preferredInputOrientation"); +final _objc_msgSend_16ckc9k = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_inputOrientation = objc.registerName("inputOrientation"); +late final _sel_maximumInputNumberOfChannels = + objc.registerName("maximumInputNumberOfChannels"); +late final _sel_maximumOutputNumberOfChannels = + objc.registerName("maximumOutputNumberOfChannels"); +late final _sel_setInputGain_error_ = objc.registerName("setInputGain:error:"); +final _objc_msgSend_yujz92 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Float, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer>)>(); +late final _sel_inputGain = objc.registerName("inputGain"); +late final _sel_isInputGainSettable = objc.registerName("isInputGainSettable"); +late final _sel_isInputAvailable = objc.registerName("isInputAvailable"); +late final _sel_inputDataSources = objc.registerName("inputDataSources"); +late final _sel_inputDataSource = objc.registerName("inputDataSource"); +late final _sel_setInputDataSource_error_ = + objc.registerName("setInputDataSource:error:"); +late final _sel_outputDataSources = objc.registerName("outputDataSources"); +late final _sel_outputDataSource = objc.registerName("outputDataSource"); +late final _sel_setOutputDataSource_error_ = + objc.registerName("setOutputDataSource:error:"); +late final _sel_sampleRate = objc.registerName("sampleRate"); +late final _sel_inputNumberOfChannels = + objc.registerName("inputNumberOfChannels"); +late final _sel_outputNumberOfChannels = + objc.registerName("outputNumberOfChannels"); +late final _sel_inputLatency = objc.registerName("inputLatency"); +late final _sel_outputLatency = objc.registerName("outputLatency"); +late final _sel_IOBufferDuration = objc.registerName("IOBufferDuration"); +late final _sel_isOtherAudioPlaying = objc.registerName("isOtherAudioPlaying"); +late final _sel_secondaryAudioShouldBeSilencedHint = + objc.registerName("secondaryAudioShouldBeSilencedHint"); +late final _sel_outputVolume = objc.registerName("outputVolume"); - /// promptStyle - AVAudioSessionPromptStyle get promptStyle { - final _ret = _objc_msgSend_715(this.pointer, _sel_promptStyle); - return AVAudioSessionPromptStyle.fromValue(_ret); - } +enum AVAudioSessionPromptStyle { + AVAudioSessionPromptStyleNone(1852796517), + AVAudioSessionPromptStyleShort(1936224884), + AVAudioSessionPromptStyleNormal(1852992876); - /// availableInputs - objc.NSArray? get availableInputs { - final _ret = _objc_msgSend_86(this.pointer, _sel_availableInputs); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const AVAudioSessionPromptStyle(this.value); - /// currentRoute - AVAudioSessionRouteDescription get currentRoute { - final _ret = _objc_msgSend_716(this.pointer, _sel_currentRoute); - return AVAudioSessionRouteDescription.castFromPointer(_ret, - retain: true, release: true); - } + static AVAudioSessionPromptStyle fromValue(int value) => switch (value) { + 1852796517 => AVAudioSessionPromptStyleNone, + 1936224884 => AVAudioSessionPromptStyleShort, + 1852992876 => AVAudioSessionPromptStyleNormal, + _ => throw ArgumentError( + "Unknown value for AVAudioSessionPromptStyle: $value"), + }; +} - /// setAggregatedIOPreference:error: - bool setAggregatedIOPreference_error_(AVAudioSessionIOType inIOType, - ffi.Pointer> outError) { - return _objc_msgSend_717(this.pointer, - _sel_setAggregatedIOPreference_error_, inIOType.value, outError); - } +late final _sel_promptStyle = objc.registerName("promptStyle"); +final _objc_msgSend_xgzkcr = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_availableInputs = objc.registerName("availableInputs"); +late final _class_AVAudioSessionRouteDescription = + objc.getClass("AVAudioSessionRouteDescription"); +late final _sel_inputs = objc.registerName("inputs"); +late final _sel_outputs = objc.registerName("outputs"); - /// setSupportsMultichannelContent:error: - bool setSupportsMultichannelContent_error_( - bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_699(this.pointer, - _sel_setSupportsMultichannelContent_error_, inValue, outError); - } +/// AVAudioSessionRouteDescription +class AVAudioSessionRouteDescription extends objc.NSObject { + AVAudioSessionRouteDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// supportsMultichannelContent - bool get supportsMultichannelContent { - return _objc_msgSend_13(this.pointer, _sel_supportsMultichannelContent); - } + /// Constructs a [AVAudioSessionRouteDescription] that points to the same underlying object as [other]. + AVAudioSessionRouteDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// setPrefersInterruptionOnRouteDisconnect:error: - bool setPrefersInterruptionOnRouteDisconnect_error_( - bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_699(this.pointer, - _sel_setPrefersInterruptionOnRouteDisconnect_error_, inValue, outError); - } + /// Constructs a [AVAudioSessionRouteDescription] that wraps the given raw object pointer. + AVAudioSessionRouteDescription.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); - /// prefersInterruptionOnRouteDisconnect - bool get prefersInterruptionOnRouteDisconnect { - return _objc_msgSend_13( - this.pointer, _sel_prefersInterruptionOnRouteDisconnect); + /// Returns whether [obj] is an instance of [AVAudioSessionRouteDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_AVAudioSessionRouteDescription); } - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// inputs + objc.NSArray get inputs { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_inputs); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + /// outputs + objc.NSArray get outputs { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_outputs); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// init - AVAudioSession init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return AVAudioSession.castFromPointer(_ret, retain: true, release: true); - } - - /// setActive:withFlags:error: - bool setActive_withFlags_error_(bool active, int flags, - ffi.Pointer> outError) { - return _objc_msgSend_718( - this.pointer, _sel_setActive_withFlags_error_, active, flags, outError); - } - - /// inputIsAvailable - bool get inputIsAvailable { - return _objc_msgSend_13(this.pointer, _sel_inputIsAvailable); - } - - /// currentHardwareSampleRate - double get currentHardwareSampleRate { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_currentHardwareSampleRate) - : _objc_msgSend_18(this.pointer, _sel_currentHardwareSampleRate); - } - - /// currentHardwareInputNumberOfChannels - int get currentHardwareInputNumberOfChannels { - return _objc_msgSend_123( - this.pointer, _sel_currentHardwareInputNumberOfChannels); - } - - /// currentHardwareOutputNumberOfChannels - int get currentHardwareOutputNumberOfChannels { - return _objc_msgSend_123( - this.pointer, _sel_currentHardwareOutputNumberOfChannels); - } - - /// setPreferredHardwareSampleRate:error: - bool setPreferredHardwareSampleRate_error_( - double sampleRate, ffi.Pointer> outError) { - return _objc_msgSend_710(this.pointer, - _sel_setPreferredHardwareSampleRate_error_, sampleRate, outError); - } - - /// preferredHardwareSampleRate - double get preferredHardwareSampleRate { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_preferredHardwareSampleRate) - : _objc_msgSend_18(this.pointer, _sel_preferredHardwareSampleRate); + AVAudioSessionRouteDescription init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: false, release: true); } /// new - static AVAudioSession new1() { - final _ret = _objc_msgSend_19(_class_AVAudioSession, _sel_new); - return AVAudioSession.castFromPointer(_ret, retain: false, release: true); + static AVAudioSessionRouteDescription new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_AVAudioSessionRouteDescription, _sel_new); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: - static AVAudioSession allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_AVAudioSession, _sel_allocWithZone_, zone); - return AVAudioSession.castFromPointer(_ret, retain: false, release: true); + static AVAudioSessionRouteDescription allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_AVAudioSessionRouteDescription, _sel_allocWithZone_, zone); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: false, release: true); } /// alloc - static AVAudioSession alloc() { - final _ret = _objc_msgSend_19(_class_AVAudioSession, _sel_alloc); - return AVAudioSession.castFromPointer(_ret, retain: false, release: true); + static AVAudioSessionRouteDescription alloc() { + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSessionRouteDescription, _sel_alloc); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -38614,1187 +40118,749 @@ class AVAudioSession extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_AVAudioSession, + _objc_msgSend_cqxsqq( + _class_AVAudioSessionRouteDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_AVAudioSession, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_AVAudioSessionRouteDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_AVAudioSession, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1(_class_AVAudioSessionRouteDescription, + _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_AVAudioSession, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_AVAudioSessionRouteDescription, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_AVAudioSession, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_AVAudioSessionRouteDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_AVAudioSession, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_AVAudioSessionRouteDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_AVAudioSession, + _objc_msgSend_1tjlcwl( + _class_AVAudioSessionRouteDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_AVAudioSession, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioSessionRouteDescription, + _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_AVAudioSession, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSessionRouteDescription, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_AVAudioSession = objc.getClass("AVAudioSession"); -late final _sel_sharedInstance = objc.registerName("sharedInstance"); -final _objc_msgSend_693 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_availableCategories = objc.registerName("availableCategories"); -late final _sel_setCategory_error_ = objc.registerName("setCategory:error:"); - -enum AVAudioSessionCategoryOptions { - AVAudioSessionCategoryOptionMixWithOthers(1), - AVAudioSessionCategoryOptionDuckOthers(2), - AVAudioSessionCategoryOptionAllowBluetooth(4), - AVAudioSessionCategoryOptionDefaultToSpeaker(8), - AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers(17), - AVAudioSessionCategoryOptionAllowBluetoothA2DP(32), - AVAudioSessionCategoryOptionAllowAirPlay(64), - AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption(128); - final int value; - const AVAudioSessionCategoryOptions(this.value); - - static AVAudioSessionCategoryOptions fromValue(int value) => switch (value) { - 1 => AVAudioSessionCategoryOptionMixWithOthers, - 2 => AVAudioSessionCategoryOptionDuckOthers, - 4 => AVAudioSessionCategoryOptionAllowBluetooth, - 8 => AVAudioSessionCategoryOptionDefaultToSpeaker, - 17 => AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers, - 32 => AVAudioSessionCategoryOptionAllowBluetoothA2DP, - 64 => AVAudioSessionCategoryOptionAllowAirPlay, - 128 => AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption, - _ => throw ArgumentError( - "Unknown value for AVAudioSessionCategoryOptions: $value"), - }; -} + /// self + AVAudioSessionRouteDescription self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: true, release: true); + } -late final _sel_setCategory_withOptions_error_ = - objc.registerName("setCategory:withOptions:error:"); -final _objc_msgSend_694 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_setCategory_mode_options_error_ = - objc.registerName("setCategory:mode:options:error:"); -final _objc_msgSend_695 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + /// retain + AVAudioSessionRouteDescription retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: true, release: true); + } -enum AVAudioSessionRouteSharingPolicy { - AVAudioSessionRouteSharingPolicyDefault(0), - AVAudioSessionRouteSharingPolicyLongFormAudio(1), - AVAudioSessionRouteSharingPolicyIndependent(2), - AVAudioSessionRouteSharingPolicyLongFormVideo(3); + /// autorelease + AVAudioSessionRouteDescription autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: true, release: true); + } +} - static const AVAudioSessionRouteSharingPolicyLongForm = - AVAudioSessionRouteSharingPolicyLongFormAudio; +late final _sel_currentRoute = objc.registerName("currentRoute"); + +enum AVAudioSessionIOType { + AVAudioSessionIOTypeNotSpecified(0), + AVAudioSessionIOTypeAggregated(1); final int value; - const AVAudioSessionRouteSharingPolicy(this.value); + const AVAudioSessionIOType(this.value); - static AVAudioSessionRouteSharingPolicy fromValue(int value) => - switch (value) { - 0 => AVAudioSessionRouteSharingPolicyDefault, - 1 => AVAudioSessionRouteSharingPolicyLongFormAudio, - 2 => AVAudioSessionRouteSharingPolicyIndependent, - 3 => AVAudioSessionRouteSharingPolicyLongFormVideo, - _ => throw ArgumentError( - "Unknown value for AVAudioSessionRouteSharingPolicy: $value"), + static AVAudioSessionIOType fromValue(int value) => switch (value) { + 0 => AVAudioSessionIOTypeNotSpecified, + 1 => AVAudioSessionIOTypeAggregated, + _ => + throw ArgumentError("Unknown value for AVAudioSessionIOType: $value"), }; - - @override - String toString() { - if (this == AVAudioSessionRouteSharingPolicyLongFormAudio) - return "AVAudioSessionRouteSharingPolicy.AVAudioSessionRouteSharingPolicyLongFormAudio, AVAudioSessionRouteSharingPolicy.AVAudioSessionRouteSharingPolicyLongForm"; - return super.toString(); - } } -late final _sel_setCategory_mode_routeSharingPolicy_options_error_ = - objc.registerName("setCategory:mode:routeSharingPolicy:options:error:"); -final _objc_msgSend_696 = objc.msgSendPointer +late final _sel_setAggregatedIOPreference_error_ = + objc.registerName("setAggregatedIOPreference:error:"); +final _objc_msgSend_vsrn59 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, ffi.UnsignedLong, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, int, ffi.Pointer>)>(); -late final _sel_category = objc.registerName("category"); -late final _sel_categoryOptions = objc.registerName("categoryOptions"); -final _objc_msgSend_697 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_routeSharingPolicy = objc.registerName("routeSharingPolicy"); -final _objc_msgSend_698 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_availableModes = objc.registerName("availableModes"); -late final _sel_setMode_error_ = objc.registerName("setMode:error:"); -late final _sel_mode = objc.registerName("mode"); -late final _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_ = - objc.registerName("setAllowHapticsAndSystemSoundsDuringRecording:error:"); -final _objc_msgSend_699 = objc.msgSendPointer +late final _sel_setSupportsMultichannelContent_error_ = + objc.registerName("setSupportsMultichannelContent:error:"); +late final _sel_supportsMultichannelContent = + objc.registerName("supportsMultichannelContent"); +late final _sel_setPrefersInterruptionOnRouteDisconnect_error_ = + objc.registerName("setPrefersInterruptionOnRouteDisconnect:error:"); +late final _sel_prefersInterruptionOnRouteDisconnect = + objc.registerName("prefersInterruptionOnRouteDisconnect"); +late final _sel_setActive_withFlags_error_ = + objc.registerName("setActive:withFlags:error:"); +final _objc_msgSend_11f9fnx = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Bool, + ffi.Long, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, bool, - ffi.Pointer>)>(); -late final _sel_allowHapticsAndSystemSoundsDuringRecording = - objc.registerName("allowHapticsAndSystemSoundsDuringRecording"); - -enum AVAudioSessionRecordPermission { - AVAudioSessionRecordPermissionUndetermined(1970168948), - AVAudioSessionRecordPermissionDenied(1684369017), - AVAudioSessionRecordPermissionGranted(1735552628); - - final int value; - const AVAudioSessionRecordPermission(this.value); - - static AVAudioSessionRecordPermission fromValue(int value) => switch (value) { - 1970168948 => AVAudioSessionRecordPermissionUndetermined, - 1684369017 => AVAudioSessionRecordPermissionDenied, - 1735552628 => AVAudioSessionRecordPermissionGranted, - _ => throw ArgumentError( - "Unknown value for AVAudioSessionRecordPermission: $value"), - }; -} - -late final _sel_recordPermission = objc.registerName("recordPermission"); -final _objc_msgSend_700 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_requestRecordPermission_ = - objc.registerName("requestRecordPermission:"); -final _objc_msgSend_701 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -enum AVAudioSessionPortOverride { - AVAudioSessionPortOverrideNone(0), - AVAudioSessionPortOverrideSpeaker(1936747378); - - final int value; - const AVAudioSessionPortOverride(this.value); - - static AVAudioSessionPortOverride fromValue(int value) => switch (value) { - 0 => AVAudioSessionPortOverrideNone, - 1936747378 => AVAudioSessionPortOverrideSpeaker, - _ => throw ArgumentError( - "Unknown value for AVAudioSessionPortOverride: $value"), - }; -} - -late final _sel_overrideOutputAudioPort_error_ = - objc.registerName("overrideOutputAudioPort:error:"); -final _objc_msgSend_702 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, int, ffi.Pointer>)>(); +late final _sel_inputIsAvailable = objc.registerName("inputIsAvailable"); +late final _sel_currentHardwareSampleRate = + objc.registerName("currentHardwareSampleRate"); +late final _sel_currentHardwareInputNumberOfChannels = + objc.registerName("currentHardwareInputNumberOfChannels"); +late final _sel_currentHardwareOutputNumberOfChannels = + objc.registerName("currentHardwareOutputNumberOfChannels"); +late final _sel_setPreferredHardwareSampleRate_error_ = + objc.registerName("setPreferredHardwareSampleRate:error:"); +late final _sel_preferredHardwareSampleRate = + objc.registerName("preferredHardwareSampleRate"); -/// AVAudioSessionPortDescription -class AVAudioSessionPortDescription extends objc.NSObject { - AVAudioSessionPortDescription._(ffi.Pointer pointer, +/// AVAudioSession +class AVAudioSession extends objc.NSObject { + AVAudioSession._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [AVAudioSessionPortDescription] that points to the same underlying object as [other]. - AVAudioSessionPortDescription.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [AVAudioSession] that points to the same underlying object as [other]. + AVAudioSession.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [AVAudioSessionPortDescription] that wraps the given raw object pointer. - AVAudioSessionPortDescription.castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) + /// Constructs a [AVAudioSession] that wraps the given raw object pointer. + AVAudioSession.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [AVAudioSessionPortDescription]. + /// Returns whether [obj] is an instance of [AVAudioSession]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_AVAudioSessionPortDescription); - } - - /// portType - objc.NSString get portType { - final _ret = _objc_msgSend_11(this.pointer, _sel_portType); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// portName - objc.NSString get portName { - final _ret = _objc_msgSend_11(this.pointer, _sel_portName); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// UID - objc.NSString get UID { - final _ret = _objc_msgSend_11(this.pointer, _sel_UID); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// hasHardwareVoiceCallProcessing - bool get hasHardwareVoiceCallProcessing { - return _objc_msgSend_13(this.pointer, _sel_hasHardwareVoiceCallProcessing); - } - - /// isSpatialAudioEnabled - bool get spatialAudioEnabled { - return _objc_msgSend_13(this.pointer, _sel_isSpatialAudioEnabled); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_AVAudioSession); } - /// channels - objc.NSArray? get channels { - final _ret = _objc_msgSend_86(this.pointer, _sel_channels); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// sharedInstance + static AVAudioSession sharedInstance() { + final _ret = + _objc_msgSend_1unuoxw(_class_AVAudioSession, _sel_sharedInstance); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); } - /// dataSources - objc.NSArray? get dataSources { - final _ret = _objc_msgSend_86(this.pointer, _sel_dataSources); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// availableCategories + objc.NSArray get availableCategories { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_availableCategories); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// selectedDataSource - AVAudioSessionDataSourceDescription? get selectedDataSource { - final _ret = _objc_msgSend_704(this.pointer, _sel_selectedDataSource); - return _ret.address == 0 - ? null - : AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: true, release: true); + /// setCategory:error: + bool setCategory_error_(objc.NSString category, + ffi.Pointer> outError) { + return _objc_msgSend_p02k6o(this.ref.pointer, _sel_setCategory_error_, + category.ref.pointer, outError); } - /// preferredDataSource - AVAudioSessionDataSourceDescription? get preferredDataSource { - final _ret = _objc_msgSend_704(this.pointer, _sel_preferredDataSource); - return _ret.address == 0 - ? null - : AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: true, release: true); + /// setCategory:withOptions:error: + bool setCategory_withOptions_error_( + objc.NSString category, + AVAudioSessionCategoryOptions options, + ffi.Pointer> outError) { + return _objc_msgSend_1qqeo92( + this.ref.pointer, + _sel_setCategory_withOptions_error_, + category.ref.pointer, + options.value, + outError); } - /// setPreferredDataSource:error: - bool setPreferredDataSource_error_( - AVAudioSessionDataSourceDescription? dataSource, + /// setCategory:mode:options:error: + bool setCategory_mode_options_error_( + objc.NSString category, + objc.NSString mode, + AVAudioSessionCategoryOptions options, ffi.Pointer> outError) { - return _objc_msgSend_705(this.pointer, _sel_setPreferredDataSource_error_, - dataSource?.pointer ?? ffi.nullptr, outError); + return _objc_msgSend_1w2nczj( + this.ref.pointer, + _sel_setCategory_mode_options_error_, + category.ref.pointer, + mode.ref.pointer, + options.value, + outError); } - /// init - AVAudioSessionPortDescription init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return AVAudioSessionPortDescription.castFromPointer(_ret, - retain: true, release: true); + /// setCategory:mode:routeSharingPolicy:options:error: + bool setCategory_mode_routeSharingPolicy_options_error_( + objc.NSString category, + objc.NSString mode, + AVAudioSessionRouteSharingPolicy policy, + AVAudioSessionCategoryOptions options, + ffi.Pointer> outError) { + return _objc_msgSend_3ejcy4( + this.ref.pointer, + _sel_setCategory_mode_routeSharingPolicy_options_error_, + category.ref.pointer, + mode.ref.pointer, + policy.value, + options.value, + outError); } - /// new - static AVAudioSessionPortDescription new1() { - final _ret = - _objc_msgSend_19(_class_AVAudioSessionPortDescription, _sel_new); - return AVAudioSessionPortDescription.castFromPointer(_ret, - retain: false, release: true); + /// category + objc.NSString get category { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_category); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// allocWithZone: - static AVAudioSessionPortDescription allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_AVAudioSessionPortDescription, _sel_allocWithZone_, zone); - return AVAudioSessionPortDescription.castFromPointer(_ret, - retain: false, release: true); + /// categoryOptions + AVAudioSessionCategoryOptions get categoryOptions { + final _ret = _objc_msgSend_ulkd0k(this.ref.pointer, _sel_categoryOptions); + return AVAudioSessionCategoryOptions.fromValue(_ret); } - /// alloc - static AVAudioSessionPortDescription alloc() { + /// routeSharingPolicy + AVAudioSessionRouteSharingPolicy get routeSharingPolicy { final _ret = - _objc_msgSend_19(_class_AVAudioSessionPortDescription, _sel_alloc); - return AVAudioSessionPortDescription.castFromPointer(_ret, - retain: false, release: true); + _objc_msgSend_11368np(this.ref.pointer, _sel_routeSharingPolicy); + return AVAudioSessionRouteSharingPolicy.fromValue(_ret); } - /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - objc.ObjCObjectBase aTarget, - ffi.Pointer aSelector, - objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_AVAudioSessionPortDescription, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + /// availableModes + objc.NSArray get availableModes { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_availableModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_AVAudioSessionPortDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// setMode:error: + bool setMode_error_( + objc.NSString mode, ffi.Pointer> outError) { + return _objc_msgSend_p02k6o( + this.ref.pointer, _sel_setMode_error_, mode.ref.pointer, outError); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13(_class_AVAudioSessionPortDescription, - _sel_accessInstanceVariablesDirectly); + /// mode + objc.NSString get mode { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mode); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_AVAudioSessionPortDescription, _sel_useStoredAccessor); + /// setAllowHapticsAndSystemSoundsDuringRecording:error: + bool setAllowHapticsAndSystemSoundsDuringRecording_error_( + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_1867uf2( + this.ref.pointer, + _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_, + inValue, + outError); } - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_AVAudioSessionPortDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + /// allowHapticsAndSystemSoundsDuringRecording + bool get allowHapticsAndSystemSoundsDuringRecording { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowHapticsAndSystemSoundsDuringRecording); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_AVAudioSessionPortDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// recordPermission + AVAudioSessionRecordPermission get recordPermission { + final _ret = _objc_msgSend_qybqeg(this.ref.pointer, _sel_recordPermission); + return AVAudioSessionRecordPermission.fromValue(_ret); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_AVAudioSessionPortDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// requestRecordPermission: + void requestRecordPermission_( + objc.ObjCBlock response) { + _objc_msgSend_4daxhl( + this.ref.pointer, _sel_requestRecordPermission_, response.ref.pointer); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33(_class_AVAudioSessionPortDescription, - _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// overrideOutputAudioPort:error: + bool overrideOutputAudioPort_error_(AVAudioSessionPortOverride portOverride, + ffi.Pointer> outError) { + return _objc_msgSend_pcgmhk(this.ref.pointer, + _sel_overrideOutputAudioPort_error_, portOverride.value, outError); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_AVAudioSessionPortDescription, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setPreferredInput:error: + bool setPreferredInput_error_(AVAudioSessionPortDescription? inPort, + ffi.Pointer> outError) { + return _objc_msgSend_p02k6o(this.ref.pointer, _sel_setPreferredInput_error_, + inPort?.ref.pointer ?? ffi.nullptr, outError); } -} - -late final _class_AVAudioSessionPortDescription = - objc.getClass("AVAudioSessionPortDescription"); -late final _sel_portType = objc.registerName("portType"); -late final _sel_portName = objc.registerName("portName"); -late final _sel_UID = objc.registerName("UID"); -late final _sel_hasHardwareVoiceCallProcessing = - objc.registerName("hasHardwareVoiceCallProcessing"); -late final _sel_isSpatialAudioEnabled = - objc.registerName("isSpatialAudioEnabled"); -late final _sel_channels = objc.registerName("channels"); -late final _sel_dataSources = objc.registerName("dataSources"); - -/// AVAudioSessionDataSourceDescription -class AVAudioSessionDataSourceDescription extends objc.NSObject { - AVAudioSessionDataSourceDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [AVAudioSessionDataSourceDescription] that points to the same underlying object as [other]. - AVAudioSessionDataSourceDescription.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [AVAudioSessionDataSourceDescription] that wraps the given raw object pointer. - AVAudioSessionDataSourceDescription.castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) - : this._(other, retain: retain, release: release); + /// preferredInput + AVAudioSessionPortDescription? get preferredInput { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredInput); + return _ret.address == 0 + ? null + : AVAudioSessionPortDescription.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns whether [obj] is an instance of [AVAudioSessionDataSourceDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, - _class_AVAudioSessionDataSourceDescription); + /// setPrefersNoInterruptionsFromSystemAlerts:error: + bool setPrefersNoInterruptionsFromSystemAlerts_error_( + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_1867uf2( + this.ref.pointer, + _sel_setPrefersNoInterruptionsFromSystemAlerts_error_, + inValue, + outError); } - /// dataSourceID - objc.NSNumber get dataSourceID { - final _ret = _objc_msgSend_192(this.pointer, _sel_dataSourceID); - return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + /// prefersNoInterruptionsFromSystemAlerts + bool get prefersNoInterruptionsFromSystemAlerts { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_prefersNoInterruptionsFromSystemAlerts); } - /// dataSourceName - objc.NSString get dataSourceName { - final _ret = _objc_msgSend_11(this.pointer, _sel_dataSourceName); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setActive:error: + bool setActive_error_( + bool active, ffi.Pointer> outError) { + return _objc_msgSend_1867uf2( + this.ref.pointer, _sel_setActive_error_, active, outError); } - /// location - objc.NSString? get location { - final _ret = _objc_msgSend_20(this.pointer, _sel_location); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setActive:withOptions:error: + bool setActive_withOptions_error_( + bool active, + AVAudioSessionSetActiveOptions options, + ffi.Pointer> outError) { + return _objc_msgSend_ydjcyk(this.ref.pointer, + _sel_setActive_withOptions_error_, active, options.value, outError); } - /// orientation - objc.NSString? get orientation { - final _ret = _objc_msgSend_20(this.pointer, _sel_orientation); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// activateWithOptions:completionHandler: + void activateWithOptions_completionHandler_( + AVAudioSessionActivationOptions options, + objc.ObjCBlock handler) { + _objc_msgSend_1igkhc3( + this.ref.pointer, + _sel_activateWithOptions_completionHandler_, + options.value, + handler.ref.pointer); } - /// supportedPolarPatterns - objc.NSArray? get supportedPolarPatterns { - final _ret = _objc_msgSend_86(this.pointer, _sel_supportedPolarPatterns); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// setPreferredSampleRate:error: + bool setPreferredSampleRate_error_( + double sampleRate, ffi.Pointer> outError) { + return _objc_msgSend_1kh8jgt(this.ref.pointer, + _sel_setPreferredSampleRate_error_, sampleRate, outError); } - /// selectedPolarPattern - objc.NSString? get selectedPolarPattern { - final _ret = _objc_msgSend_20(this.pointer, _sel_selectedPolarPattern); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// preferredSampleRate + double get preferredSampleRate { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_preferredSampleRate) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_preferredSampleRate); } - /// preferredPolarPattern - objc.NSString? get preferredPolarPattern { - final _ret = _objc_msgSend_20(this.pointer, _sel_preferredPolarPattern); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// setPreferredIOBufferDuration:error: + bool setPreferredIOBufferDuration_error_( + double duration, ffi.Pointer> outError) { + return _objc_msgSend_1kh8jgt(this.ref.pointer, + _sel_setPreferredIOBufferDuration_error_, duration, outError); } - /// setPreferredPolarPattern:error: - bool setPreferredPolarPattern_error_(objc.NSString? pattern, - ffi.Pointer> outError) { - return _objc_msgSend_703(this.pointer, _sel_setPreferredPolarPattern_error_, - pattern?.pointer ?? ffi.nullptr, outError); + /// preferredIOBufferDuration + double get preferredIOBufferDuration { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_preferredIOBufferDuration) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_preferredIOBufferDuration); } - /// init - AVAudioSessionDataSourceDescription init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: true, release: true); + /// setPreferredInputNumberOfChannels:error: + bool setPreferredInputNumberOfChannels_error_( + int count, ffi.Pointer> outError) { + return _objc_msgSend_1395fec(this.ref.pointer, + _sel_setPreferredInputNumberOfChannels_error_, count, outError); } - /// new - static AVAudioSessionDataSourceDescription new1() { - final _ret = - _objc_msgSend_19(_class_AVAudioSessionDataSourceDescription, _sel_new); - return AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: false, release: true); + /// preferredInputNumberOfChannels + int get preferredInputNumberOfChannels { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_preferredInputNumberOfChannels); } - /// allocWithZone: - static AVAudioSessionDataSourceDescription allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_AVAudioSessionDataSourceDescription, _sel_allocWithZone_, zone); - return AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: false, release: true); + /// setPreferredOutputNumberOfChannels:error: + bool setPreferredOutputNumberOfChannels_error_( + int count, ffi.Pointer> outError) { + return _objc_msgSend_1395fec(this.ref.pointer, + _sel_setPreferredOutputNumberOfChannels_error_, count, outError); } - /// alloc - static AVAudioSessionDataSourceDescription alloc() { - final _ret = _objc_msgSend_19( - _class_AVAudioSessionDataSourceDescription, _sel_alloc); - return AVAudioSessionDataSourceDescription.castFromPointer(_ret, - retain: false, release: true); + /// preferredOutputNumberOfChannels + int get preferredOutputNumberOfChannels { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_preferredOutputNumberOfChannels); } - /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - objc.ObjCObjectBase aTarget, - ffi.Pointer aSelector, - objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_AVAudioSessionDataSourceDescription, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + /// setPreferredInputOrientation:error: + bool setPreferredInputOrientation_error_(AVAudioStereoOrientation orientation, + ffi.Pointer> outError) { + return _objc_msgSend_1ehfmir(this.ref.pointer, + _sel_setPreferredInputOrientation_error_, orientation.value, outError); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_( - objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_AVAudioSessionDataSourceDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + /// preferredInputOrientation + AVAudioStereoOrientation get preferredInputOrientation { + final _ret = + _objc_msgSend_16ckc9k(this.ref.pointer, _sel_preferredInputOrientation); + return AVAudioStereoOrientation.fromValue(_ret); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13(_class_AVAudioSessionDataSourceDescription, - _sel_accessInstanceVariablesDirectly); + /// inputOrientation + AVAudioStereoOrientation get inputOrientation { + final _ret = _objc_msgSend_16ckc9k(this.ref.pointer, _sel_inputOrientation); + return AVAudioStereoOrientation.fromValue(_ret); } - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_AVAudioSessionDataSourceDescription, _sel_useStoredAccessor); + /// maximumInputNumberOfChannels + int get maximumInputNumberOfChannels { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_maximumInputNumberOfChannels); } - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_AVAudioSessionDataSourceDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + /// maximumOutputNumberOfChannels + int get maximumOutputNumberOfChannels { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_maximumOutputNumberOfChannels); } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_AVAudioSessionDataSourceDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// setInputGain:error: + bool setInputGain_error_( + double gain, ffi.Pointer> outError) { + return _objc_msgSend_yujz92( + this.ref.pointer, _sel_setInputGain_error_, gain, outError); } - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_AVAudioSessionDataSourceDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + /// inputGain + double get inputGain { + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_inputGain) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_inputGain); } - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33(_class_AVAudioSessionDataSourceDescription, - _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// isInputGainSettable + bool get inputGainSettable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isInputGainSettable); } - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19(_class_AVAudioSessionDataSourceDescription, - _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// isInputAvailable + bool get inputAvailable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isInputAvailable); } -} -late final _class_AVAudioSessionDataSourceDescription = - objc.getClass("AVAudioSessionDataSourceDescription"); -late final _sel_dataSourceID = objc.registerName("dataSourceID"); -late final _sel_dataSourceName = objc.registerName("dataSourceName"); -late final _sel_location = objc.registerName("location"); -late final _sel_orientation = objc.registerName("orientation"); -late final _sel_supportedPolarPatterns = - objc.registerName("supportedPolarPatterns"); -late final _sel_selectedPolarPattern = - objc.registerName("selectedPolarPattern"); -late final _sel_preferredPolarPattern = - objc.registerName("preferredPolarPattern"); -late final _sel_setPreferredPolarPattern_error_ = - objc.registerName("setPreferredPolarPattern:error:"); -final _objc_msgSend_703 = 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_selectedDataSource = objc.registerName("selectedDataSource"); -final _objc_msgSend_704 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_preferredDataSource = objc.registerName("preferredDataSource"); -late final _sel_setPreferredDataSource_error_ = - objc.registerName("setPreferredDataSource:error:"); -final _objc_msgSend_705 = 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_setPreferredInput_error_ = - objc.registerName("setPreferredInput:error:"); -final _objc_msgSend_706 = 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_preferredInput = objc.registerName("preferredInput"); -final _objc_msgSend_707 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPrefersNoInterruptionsFromSystemAlerts_error_ = - objc.registerName("setPrefersNoInterruptionsFromSystemAlerts:error:"); -late final _sel_prefersNoInterruptionsFromSystemAlerts = - objc.registerName("prefersNoInterruptionsFromSystemAlerts"); -late final _sel_setActive_error_ = objc.registerName("setActive:error:"); + /// inputDataSources + objc.NSArray? get inputDataSources { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_inputDataSources); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } -enum AVAudioSessionSetActiveOptions { - AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation(1); + /// inputDataSource + AVAudioSessionDataSourceDescription? get inputDataSource { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_inputDataSource); + return _ret.address == 0 + ? null + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const AVAudioSessionSetActiveOptions(this.value); + /// setInputDataSource:error: + bool setInputDataSource_error_( + AVAudioSessionDataSourceDescription? dataSource, + ffi.Pointer> outError) { + return _objc_msgSend_p02k6o( + this.ref.pointer, + _sel_setInputDataSource_error_, + dataSource?.ref.pointer ?? ffi.nullptr, + outError); + } - static AVAudioSessionSetActiveOptions fromValue(int value) => switch (value) { - 1 => AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation, - _ => throw ArgumentError( - "Unknown value for AVAudioSessionSetActiveOptions: $value"), - }; -} + /// outputDataSources + objc.NSArray? get outputDataSources { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_outputDataSources); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_setActive_withOptions_error_ = - objc.registerName("setActive:withOptions:error:"); -final _objc_msgSend_708 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); + /// outputDataSource + AVAudioSessionDataSourceDescription? get outputDataSource { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_outputDataSource); + return _ret.address == 0 + ? null + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, + retain: true, release: true); + } -enum AVAudioSessionActivationOptions { - AVAudioSessionActivationOptionNone(0); + /// setOutputDataSource:error: + bool setOutputDataSource_error_( + AVAudioSessionDataSourceDescription? dataSource, + ffi.Pointer> outError) { + return _objc_msgSend_p02k6o( + this.ref.pointer, + _sel_setOutputDataSource_error_, + dataSource?.ref.pointer ?? ffi.nullptr, + outError); + } - final int value; - const AVAudioSessionActivationOptions(this.value); + /// sampleRate + double get sampleRate { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_sampleRate) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_sampleRate); + } - static AVAudioSessionActivationOptions fromValue(int value) => - switch (value) { - 0 => AVAudioSessionActivationOptionNone, - _ => throw ArgumentError( - "Unknown value for AVAudioSessionActivationOptions: $value"), - }; -} + /// inputNumberOfChannels + int get inputNumberOfChannels { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_inputNumberOfChannels); + } -void _ObjCBlock_ffiVoid_bool_NSError_fnPtrTrampoline( - ffi.Pointer block, - bool arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, ffi.Pointer arg1)>>() - .asFunction)>()( - arg0, arg1); -void _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline( - ffi.Pointer block, - bool arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function( - bool, ffi.Pointer))(arg0, arg1); + /// outputNumberOfChannels + int get outputNumberOfChannels { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_outputNumberOfChannels); + } -class ObjCBlock_ffiVoid_bool_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_bool_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); + /// inputLatency + double get inputLatency { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_inputLatency) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_inputLatency); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_bool_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_bool_NSError._(pointer, - retain: retain, release: release); + /// outputLatency + double get outputLatency { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_outputLatency) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_outputLatency); } - /// 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_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, ffi.Pointer arg1)>> - ptr) - : this._(objc.newPointerBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + /// IOBufferDuration + double get IOBufferDuration { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_IOBufferDuration) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_IOBufferDuration); + } - /// 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_NSError.fromFunction(void Function(bool, objc.NSError?) fn) - : this._(objc.newClosureBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) - .cast(), - (bool arg0, ffi.Pointer arg1) => fn( - arg0, - arg1.address == 0 - ? null - : objc.NSError.castFromPointer(arg1, - retain: true, release: true)))); - static ffi.Pointer? _dartFuncTrampoline; + /// isOtherAudioPlaying + bool get otherAudioPlaying { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isOtherAudioPlaying); + } - /// 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_NSError.listener(void Function(bool, objc.NSError?) fn) - : this._(wrapListenerBlock_ObjCBlock_ffiVoid_bool_NSError(objc.newClosureBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - (bool arg0, ffi.Pointer arg1) => fn( - arg0, - arg1.address == 0 - ? null - : objc.NSError.castFromPointer(arg1, retain: false, release: true))))); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; + /// secondaryAudioShouldBeSilencedHint + bool get secondaryAudioShouldBeSilencedHint { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_secondaryAudioShouldBeSilencedHint); + } - void call(bool arg0, objc.NSError? arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Bool arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()( - pointer, arg0, arg1?.pointer ?? ffi.nullptr); -} + /// outputVolume + double get outputVolume { + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_outputVolume) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_outputVolume); + } -late final _sel_activateWithOptions_completionHandler_ = - objc.registerName("activateWithOptions:completionHandler:"); -final _objc_msgSend_709 = 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_setPreferredSampleRate_error_ = - objc.registerName("setPreferredSampleRate:error:"); -final _objc_msgSend_710 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer>)>(); -late final _sel_preferredSampleRate = objc.registerName("preferredSampleRate"); -late final _sel_setPreferredIOBufferDuration_error_ = - objc.registerName("setPreferredIOBufferDuration:error:"); -late final _sel_preferredIOBufferDuration = - objc.registerName("preferredIOBufferDuration"); -late final _sel_setPreferredInputNumberOfChannels_error_ = - objc.registerName("setPreferredInputNumberOfChannels:error:"); -final _objc_msgSend_711 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_preferredInputNumberOfChannels = - objc.registerName("preferredInputNumberOfChannels"); -late final _sel_setPreferredOutputNumberOfChannels_error_ = - objc.registerName("setPreferredOutputNumberOfChannels:error:"); -late final _sel_preferredOutputNumberOfChannels = - objc.registerName("preferredOutputNumberOfChannels"); + /// promptStyle + AVAudioSessionPromptStyle get promptStyle { + final _ret = _objc_msgSend_xgzkcr(this.ref.pointer, _sel_promptStyle); + return AVAudioSessionPromptStyle.fromValue(_ret); + } -enum AVAudioStereoOrientation { - AVAudioStereoOrientationNone(0), - AVAudioStereoOrientationPortrait(1), - AVAudioStereoOrientationPortraitUpsideDown(2), - AVAudioStereoOrientationLandscapeRight(3), - AVAudioStereoOrientationLandscapeLeft(4); + /// availableInputs + objc.NSArray? get availableInputs { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_availableInputs); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - final int value; - const AVAudioStereoOrientation(this.value); + /// currentRoute + AVAudioSessionRouteDescription get currentRoute { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentRoute); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: true, release: true); + } - static AVAudioStereoOrientation fromValue(int value) => switch (value) { - 0 => AVAudioStereoOrientationNone, - 1 => AVAudioStereoOrientationPortrait, - 2 => AVAudioStereoOrientationPortraitUpsideDown, - 3 => AVAudioStereoOrientationLandscapeRight, - 4 => AVAudioStereoOrientationLandscapeLeft, - _ => throw ArgumentError( - "Unknown value for AVAudioStereoOrientation: $value"), - }; -} + /// setAggregatedIOPreference:error: + bool setAggregatedIOPreference_error_(AVAudioSessionIOType inIOType, + ffi.Pointer> outError) { + return _objc_msgSend_vsrn59(this.ref.pointer, + _sel_setAggregatedIOPreference_error_, inIOType.value, outError); + } -late final _sel_setPreferredInputOrientation_error_ = - objc.registerName("setPreferredInputOrientation:error:"); -final _objc_msgSend_712 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_preferredInputOrientation = - objc.registerName("preferredInputOrientation"); -final _objc_msgSend_713 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_inputOrientation = objc.registerName("inputOrientation"); -late final _sel_maximumInputNumberOfChannels = - objc.registerName("maximumInputNumberOfChannels"); -late final _sel_maximumOutputNumberOfChannels = - objc.registerName("maximumOutputNumberOfChannels"); -late final _sel_setInputGain_error_ = objc.registerName("setInputGain:error:"); -final _objc_msgSend_714 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Float, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer>)>(); -late final _sel_inputGain = objc.registerName("inputGain"); -late final _sel_isInputGainSettable = objc.registerName("isInputGainSettable"); -late final _sel_isInputAvailable = objc.registerName("isInputAvailable"); -late final _sel_inputDataSources = objc.registerName("inputDataSources"); -late final _sel_inputDataSource = objc.registerName("inputDataSource"); -late final _sel_setInputDataSource_error_ = - objc.registerName("setInputDataSource:error:"); -late final _sel_outputDataSources = objc.registerName("outputDataSources"); -late final _sel_outputDataSource = objc.registerName("outputDataSource"); -late final _sel_setOutputDataSource_error_ = - objc.registerName("setOutputDataSource:error:"); -late final _sel_sampleRate = objc.registerName("sampleRate"); -late final _sel_inputNumberOfChannels = - objc.registerName("inputNumberOfChannels"); -late final _sel_outputNumberOfChannels = - objc.registerName("outputNumberOfChannels"); -late final _sel_inputLatency = objc.registerName("inputLatency"); -late final _sel_outputLatency = objc.registerName("outputLatency"); -late final _sel_IOBufferDuration = objc.registerName("IOBufferDuration"); -late final _sel_isOtherAudioPlaying = objc.registerName("isOtherAudioPlaying"); -late final _sel_secondaryAudioShouldBeSilencedHint = - objc.registerName("secondaryAudioShouldBeSilencedHint"); -late final _sel_outputVolume = objc.registerName("outputVolume"); + /// setSupportsMultichannelContent:error: + bool setSupportsMultichannelContent_error_( + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_1867uf2(this.ref.pointer, + _sel_setSupportsMultichannelContent_error_, inValue, outError); + } -enum AVAudioSessionPromptStyle { - AVAudioSessionPromptStyleNone(1852796517), - AVAudioSessionPromptStyleShort(1936224884), - AVAudioSessionPromptStyleNormal(1852992876); + /// supportsMultichannelContent + bool get supportsMultichannelContent { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_supportsMultichannelContent); + } - final int value; - const AVAudioSessionPromptStyle(this.value); + /// setPrefersInterruptionOnRouteDisconnect:error: + bool setPrefersInterruptionOnRouteDisconnect_error_( + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_1867uf2(this.ref.pointer, + _sel_setPrefersInterruptionOnRouteDisconnect_error_, inValue, outError); + } - static AVAudioSessionPromptStyle fromValue(int value) => switch (value) { - 1852796517 => AVAudioSessionPromptStyleNone, - 1936224884 => AVAudioSessionPromptStyleShort, - 1852992876 => AVAudioSessionPromptStyleNormal, - _ => throw ArgumentError( - "Unknown value for AVAudioSessionPromptStyle: $value"), - }; -} + /// prefersInterruptionOnRouteDisconnect + bool get prefersInterruptionOnRouteDisconnect { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_prefersInterruptionOnRouteDisconnect); + } -late final _sel_promptStyle = objc.registerName("promptStyle"); -final _objc_msgSend_715 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_availableInputs = objc.registerName("availableInputs"); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } -/// AVAudioSessionRouteDescription -class AVAudioSessionRouteDescription extends objc.NSObject { - AVAudioSessionRouteDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// setDelegate: + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); + } - /// Constructs a [AVAudioSessionRouteDescription] that points to the same underlying object as [other]. - AVAudioSessionRouteDescription.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// init + AVAudioSession init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); + } - /// Constructs a [AVAudioSessionRouteDescription] that wraps the given raw object pointer. - AVAudioSessionRouteDescription.castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) - : this._(other, retain: retain, release: release); + /// setActive:withFlags:error: + bool setActive_withFlags_error_(bool active, int flags, + ffi.Pointer> outError) { + return _objc_msgSend_11f9fnx(this.ref.pointer, + _sel_setActive_withFlags_error_, active, flags, outError); + } - /// Returns whether [obj] is an instance of [AVAudioSessionRouteDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, - _class_AVAudioSessionRouteDescription); + /// inputIsAvailable + bool get inputIsAvailable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_inputIsAvailable); } - /// inputs - objc.NSArray get inputs { - final _ret = _objc_msgSend_33(this.pointer, _sel_inputs); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// currentHardwareSampleRate + double get currentHardwareSampleRate { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_currentHardwareSampleRate) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_currentHardwareSampleRate); + } + + /// currentHardwareInputNumberOfChannels + int get currentHardwareInputNumberOfChannels { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_currentHardwareInputNumberOfChannels); + } + + /// currentHardwareOutputNumberOfChannels + int get currentHardwareOutputNumberOfChannels { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_currentHardwareOutputNumberOfChannels); } - /// outputs - objc.NSArray get outputs { - final _ret = _objc_msgSend_33(this.pointer, _sel_outputs); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// setPreferredHardwareSampleRate:error: + bool setPreferredHardwareSampleRate_error_( + double sampleRate, ffi.Pointer> outError) { + return _objc_msgSend_1kh8jgt(this.ref.pointer, + _sel_setPreferredHardwareSampleRate_error_, sampleRate, outError); } - /// init - AVAudioSessionRouteDescription init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return AVAudioSessionRouteDescription.castFromPointer(_ret, - retain: true, release: true); + /// preferredHardwareSampleRate + double get preferredHardwareSampleRate { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_preferredHardwareSampleRate) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_preferredHardwareSampleRate); } /// new - static AVAudioSessionRouteDescription new1() { - final _ret = - _objc_msgSend_19(_class_AVAudioSessionRouteDescription, _sel_new); - return AVAudioSessionRouteDescription.castFromPointer(_ret, - retain: false, release: true); + static AVAudioSession new1() { + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioSession, _sel_new); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static AVAudioSessionRouteDescription allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_AVAudioSessionRouteDescription, _sel_allocWithZone_, zone); - return AVAudioSessionRouteDescription.castFromPointer(_ret, - retain: false, release: true); + static AVAudioSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_AVAudioSession, _sel_allocWithZone_, zone); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } /// alloc - static AVAudioSessionRouteDescription alloc() { - final _ret = - _objc_msgSend_19(_class_AVAudioSessionRouteDescription, _sel_alloc); - return AVAudioSessionRouteDescription.castFromPointer(_ret, - retain: false, release: true); + static AVAudioSession alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioSession, _sel_alloc); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -39802,476 +40868,452 @@ class AVAudioSessionRouteDescription extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_AVAudioSessionRouteDescription, + _objc_msgSend_cqxsqq( + _class_AVAudioSession, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_AVAudioSessionRouteDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_AVAudioSession, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13(_class_AVAudioSessionRouteDescription, - _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_AVAudioSession, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_AVAudioSessionRouteDescription, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_AVAudioSession, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_AVAudioSessionRouteDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_AVAudioSession, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_AVAudioSessionRouteDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_AVAudioSession, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_AVAudioSessionRouteDescription, + _objc_msgSend_1tjlcwl( + _class_AVAudioSession, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33(_class_AVAudioSessionRouteDescription, - _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSession, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_AVAudioSessionRouteDescription, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioSession, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} -late final _class_AVAudioSessionRouteDescription = - objc.getClass("AVAudioSessionRouteDescription"); -late final _sel_inputs = objc.registerName("inputs"); -late final _sel_outputs = objc.registerName("outputs"); -late final _sel_currentRoute = objc.registerName("currentRoute"); -final _objc_msgSend_716 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - -enum AVAudioSessionIOType { - AVAudioSessionIOTypeNotSpecified(0), - AVAudioSessionIOTypeAggregated(1); + /// self + AVAudioSession self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); + } - final int value; - const AVAudioSessionIOType(this.value); + /// retain + AVAudioSession retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); + } - static AVAudioSessionIOType fromValue(int value) => switch (value) { - 0 => AVAudioSessionIOTypeNotSpecified, - 1 => AVAudioSessionIOTypeAggregated, - _ => - throw ArgumentError("Unknown value for AVAudioSessionIOType: $value"), - }; + /// autorelease + AVAudioSession autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_setAggregatedIOPreference_error_ = - objc.registerName("setAggregatedIOPreference:error:"); -final _objc_msgSend_717 = objc.msgSendPointer +late final _class_AVAudioPlayer = objc.getClass("AVAudioPlayer"); +late final _sel_initWithContentsOfURL_error_ = + objc.registerName("initWithContentsOfURL:error:"); +late final _sel_initWithData_error_ = objc.registerName("initWithData:error:"); +late final _sel_initWithContentsOfURL_fileTypeHint_error_ = + objc.registerName("initWithContentsOfURL:fileTypeHint:error:"); +late final _sel_initWithData_fileTypeHint_error_ = + objc.registerName("initWithData:fileTypeHint:error:"); +late final _sel_prepareToPlay = objc.registerName("prepareToPlay"); +late final _sel_play = objc.registerName("play"); +late final _sel_playAtTime_ = objc.registerName("playAtTime:"); +final _objc_msgSend_1hnh3lf = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_setSupportsMultichannelContent_error_ = - objc.registerName("setSupportsMultichannelContent:error:"); -late final _sel_supportsMultichannelContent = - objc.registerName("supportsMultichannelContent"); -late final _sel_setPrefersInterruptionOnRouteDisconnect_error_ = - objc.registerName("setPrefersInterruptionOnRouteDisconnect:error:"); -late final _sel_prefersInterruptionOnRouteDisconnect = - objc.registerName("prefersInterruptionOnRouteDisconnect"); -late final _sel_setActive_withFlags_error_ = - objc.registerName("setActive:withFlags:error:"); -final _objc_msgSend_718 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_isPlaying = objc.registerName("isPlaying"); +late final _sel_numberOfChannels = objc.registerName("numberOfChannels"); +late final _sel_currentDevice = objc.registerName("currentDevice"); +late final _sel_setCurrentDevice_ = objc.registerName("setCurrentDevice:"); +late final _sel_url = objc.registerName("url"); +late final _sel_pan = objc.registerName("pan"); +late final _sel_setPan_ = objc.registerName("setPan:"); +late final _sel_volume = objc.registerName("volume"); +late final _sel_setVolume_ = objc.registerName("setVolume:"); +late final _sel_setVolume_fadeDuration_ = + objc.registerName("setVolume:fadeDuration:"); +final _objc_msgSend_1kev0m2 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Long, - ffi.Pointer>)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Float, ffi.Double)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); -late final _sel_inputIsAvailable = objc.registerName("inputIsAvailable"); -late final _sel_currentHardwareSampleRate = - objc.registerName("currentHardwareSampleRate"); -late final _sel_currentHardwareInputNumberOfChannels = - objc.registerName("currentHardwareInputNumberOfChannels"); -late final _sel_currentHardwareOutputNumberOfChannels = - objc.registerName("currentHardwareOutputNumberOfChannels"); -late final _sel_setPreferredHardwareSampleRate_error_ = - objc.registerName("setPreferredHardwareSampleRate:error:"); -late final _sel_preferredHardwareSampleRate = - objc.registerName("preferredHardwareSampleRate"); - -/// AVAudioPlayer -class AVAudioPlayer extends objc.NSObject { - AVAudioPlayer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [AVAudioPlayer] that points to the same underlying object as [other]. - AVAudioPlayer.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); - - /// Constructs a [AVAudioPlayer] that wraps the given raw object pointer. - AVAudioPlayer.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [AVAudioPlayer]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_AVAudioPlayer); - } - - /// initWithContentsOfURL:error: - AVAudioPlayer? initWithContentsOfURL_error_( - objc.NSURL url, ffi.Pointer> outError) { - final _ret = _objc_msgSend_268( - this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, outError); - return _ret.address == 0 - ? null - : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); - } + void Function(ffi.Pointer, + ffi.Pointer, double, double)>(); +late final _sel_enableRate = objc.registerName("enableRate"); +late final _sel_setEnableRate_ = objc.registerName("setEnableRate:"); +late final _sel_rate = objc.registerName("rate"); +late final _sel_setRate_ = objc.registerName("setRate:"); +late final _sel_currentTime = objc.registerName("currentTime"); +late final _sel_setCurrentTime_ = objc.registerName("setCurrentTime:"); +late final _sel_deviceCurrentTime = objc.registerName("deviceCurrentTime"); +late final _sel_numberOfLoops = objc.registerName("numberOfLoops"); +late final _sel_setNumberOfLoops_ = objc.registerName("setNumberOfLoops:"); +late final _sel_settings = objc.registerName("settings"); +late final _class_AVAudioFormat = objc.getClass("AVAudioFormat"); - /// initWithData:error: - AVAudioPlayer? initWithData_error_( - objc.NSData data, ffi.Pointer> outError) { - final _ret = _objc_msgSend_719( - this.pointer, _sel_initWithData_error_, data.pointer, outError); - return _ret.address == 0 - ? null - : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); - } +final class AudioStreamBasicDescription extends ffi.Struct { + @ffi.Double() + external double mSampleRate; - /// initWithContentsOfURL:fileTypeHint:error: - AVAudioPlayer? initWithContentsOfURL_fileTypeHint_error_( - objc.NSURL url, - objc.NSString? utiString, - ffi.Pointer> outError) { - final _ret = _objc_msgSend_720( - this.pointer, - _sel_initWithContentsOfURL_fileTypeHint_error_, - url.pointer, - utiString?.pointer ?? ffi.nullptr, - outError); - return _ret.address == 0 - ? null - : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); - } + @ffi.UnsignedInt() + external int mFormatID; - /// initWithData:fileTypeHint:error: - AVAudioPlayer? initWithData_fileTypeHint_error_( - objc.NSData data, - objc.NSString? utiString, - ffi.Pointer> outError) { - final _ret = _objc_msgSend_721( - this.pointer, - _sel_initWithData_fileTypeHint_error_, - data.pointer, - utiString?.pointer ?? ffi.nullptr, - outError); - return _ret.address == 0 - ? null - : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); - } + @ffi.UnsignedInt() + external int mFormatFlags; - /// prepareToPlay - bool prepareToPlay() { - return _objc_msgSend_13(this.pointer, _sel_prepareToPlay); - } + @ffi.UnsignedInt() + external int mBytesPerPacket; - /// play - bool play() { - return _objc_msgSend_13(this.pointer, _sel_play); - } + @ffi.UnsignedInt() + external int mFramesPerPacket; - /// playAtTime: - bool playAtTime_(double time) { - return _objc_msgSend_722(this.pointer, _sel_playAtTime_, time); - } + @ffi.UnsignedInt() + external int mBytesPerFrame; - /// pause - void pause() { - _objc_msgSend_7(this.pointer, _sel_pause); - } + @ffi.UnsignedInt() + external int mChannelsPerFrame; - /// stop - void stop() { - _objc_msgSend_7(this.pointer, _sel_stop); - } + @ffi.UnsignedInt() + external int mBitsPerChannel; - /// isPlaying - bool get playing { - return _objc_msgSend_13(this.pointer, _sel_isPlaying); - } + @ffi.UnsignedInt() + external int mReserved; +} - /// numberOfChannels - int get numberOfChannels { - return _objc_msgSend_57(this.pointer, _sel_numberOfChannels); - } +late final _sel_initWithStreamDescription_ = + objc.registerName("initWithStreamDescription:"); +final _objc_msgSend_1ndg23i = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _class_AVAudioChannelLayout = objc.getClass("AVAudioChannelLayout"); +late final _sel_initWithLayoutTag_ = objc.registerName("initWithLayoutTag:"); - /// duration - double get duration { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_duration) - : _objc_msgSend_18(this.pointer, _sel_duration); - } +enum AudioChannelBitmap { + kAudioChannelBit_Left(1), + kAudioChannelBit_Right(2), + kAudioChannelBit_Center(4), + kAudioChannelBit_LFEScreen(8), + kAudioChannelBit_LeftSurround(16), + kAudioChannelBit_RightSurround(32), + kAudioChannelBit_LeftCenter(64), + kAudioChannelBit_RightCenter(128), + kAudioChannelBit_CenterSurround(256), + kAudioChannelBit_LeftSurroundDirect(512), + kAudioChannelBit_RightSurroundDirect(1024), + kAudioChannelBit_TopCenterSurround(2048), + kAudioChannelBit_VerticalHeightLeft(4096), + kAudioChannelBit_VerticalHeightCenter(8192), + kAudioChannelBit_VerticalHeightRight(16384), + kAudioChannelBit_TopBackLeft(32768), + kAudioChannelBit_TopBackCenter(65536), + kAudioChannelBit_TopBackRight(131072), + kAudioChannelBit_LeftTopMiddle(2097152), + kAudioChannelBit_RightTopMiddle(8388608), + kAudioChannelBit_LeftTopRear(16777216), + kAudioChannelBit_CenterTopRear(33554432), + kAudioChannelBit_RightTopRear(67108864); - /// currentDevice - objc.NSString? get currentDevice { - final _ret = _objc_msgSend_20(this.pointer, _sel_currentDevice); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } + static const kAudioChannelBit_LeftTopFront = + kAudioChannelBit_VerticalHeightLeft; + static const kAudioChannelBit_CenterTopFront = + kAudioChannelBit_VerticalHeightCenter; + static const kAudioChannelBit_RightTopFront = + kAudioChannelBit_VerticalHeightRight; + static const kAudioChannelBit_CenterTopMiddle = + kAudioChannelBit_TopCenterSurround; - /// setCurrentDevice: - set currentDevice(objc.NSString? value) { - return _objc_msgSend_21( - this.pointer, _sel_setCurrentDevice_, value?.pointer ?? ffi.nullptr); - } + final int value; + const AudioChannelBitmap(this.value); - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_83(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } + static AudioChannelBitmap fromValue(int value) => switch (value) { + 1 => kAudioChannelBit_Left, + 2 => kAudioChannelBit_Right, + 4 => kAudioChannelBit_Center, + 8 => kAudioChannelBit_LFEScreen, + 16 => kAudioChannelBit_LeftSurround, + 32 => kAudioChannelBit_RightSurround, + 64 => kAudioChannelBit_LeftCenter, + 128 => kAudioChannelBit_RightCenter, + 256 => kAudioChannelBit_CenterSurround, + 512 => kAudioChannelBit_LeftSurroundDirect, + 1024 => kAudioChannelBit_RightSurroundDirect, + 2048 => kAudioChannelBit_TopCenterSurround, + 4096 => kAudioChannelBit_VerticalHeightLeft, + 8192 => kAudioChannelBit_VerticalHeightCenter, + 16384 => kAudioChannelBit_VerticalHeightRight, + 32768 => kAudioChannelBit_TopBackLeft, + 65536 => kAudioChannelBit_TopBackCenter, + 131072 => kAudioChannelBit_TopBackRight, + 2097152 => kAudioChannelBit_LeftTopMiddle, + 8388608 => kAudioChannelBit_RightTopMiddle, + 16777216 => kAudioChannelBit_LeftTopRear, + 33554432 => kAudioChannelBit_CenterTopRear, + 67108864 => kAudioChannelBit_RightTopRear, + _ => + throw ArgumentError("Unknown value for AudioChannelBitmap: $value"), + }; - /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_200( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + @override + String toString() { + if (this == kAudioChannelBit_TopCenterSurround) + return "AudioChannelBitmap.kAudioChannelBit_TopCenterSurround, AudioChannelBitmap.kAudioChannelBit_CenterTopMiddle"; + if (this == kAudioChannelBit_VerticalHeightLeft) + return "AudioChannelBitmap.kAudioChannelBit_VerticalHeightLeft, AudioChannelBitmap.kAudioChannelBit_LeftTopFront"; + if (this == kAudioChannelBit_VerticalHeightCenter) + return "AudioChannelBitmap.kAudioChannelBit_VerticalHeightCenter, AudioChannelBitmap.kAudioChannelBit_CenterTopFront"; + if (this == kAudioChannelBit_VerticalHeightRight) + return "AudioChannelBitmap.kAudioChannelBit_VerticalHeightRight, AudioChannelBitmap.kAudioChannelBit_RightTopFront"; + return super.toString(); } +} - /// 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); - } +enum AudioChannelFlags { + kAudioChannelFlags_AllOff(0), + kAudioChannelFlags_RectangularCoordinates(1), + kAudioChannelFlags_SphericalCoordinates(2), + kAudioChannelFlags_Meters(4); - /// data - objc.NSData? get data { - final _ret = _objc_msgSend_334(this.pointer, _sel_data); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const AudioChannelFlags(this.value); - /// pan - double get pan { - return objc.useMsgSendVariants - ? _objc_msgSend_358Fpret(this.pointer, _sel_pan) - : _objc_msgSend_358(this.pointer, _sel_pan); - } + static AudioChannelFlags fromValue(int value) => switch (value) { + 0 => kAudioChannelFlags_AllOff, + 1 => kAudioChannelFlags_RectangularCoordinates, + 2 => kAudioChannelFlags_SphericalCoordinates, + 4 => kAudioChannelFlags_Meters, + _ => throw ArgumentError("Unknown value for AudioChannelFlags: $value"), + }; +} - /// setPan: - set pan(double value) { - return _objc_msgSend_359(this.pointer, _sel_setPan_, value); - } +final class AudioChannelDescription extends ffi.Struct { + @ffi.UnsignedInt() + external int mChannelLabel; - /// volume - double get volume { - return objc.useMsgSendVariants - ? _objc_msgSend_358Fpret(this.pointer, _sel_volume) - : _objc_msgSend_358(this.pointer, _sel_volume); - } + @ffi.UnsignedInt() + external int mChannelFlagsAsInt; - /// setVolume: - set volume(double value) { - return _objc_msgSend_359(this.pointer, _sel_setVolume_, value); - } + AudioChannelFlags get mChannelFlags => + AudioChannelFlags.fromValue(mChannelFlagsAsInt); - /// setVolume:fadeDuration: - void setVolume_fadeDuration_(double volume, double duration) { - _objc_msgSend_723( - this.pointer, _sel_setVolume_fadeDuration_, volume, duration); - } + @ffi.Array.multi([3]) + external ffi.Array mCoordinates; +} - /// enableRate - bool get enableRate { - return _objc_msgSend_13(this.pointer, _sel_enableRate); - } +final class AudioChannelLayout extends ffi.Struct { + @ffi.UnsignedInt() + external int mChannelLayoutTag; - /// setEnableRate: - set enableRate(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setEnableRate_, value); - } + @ffi.UnsignedInt() + external int mChannelBitmapAsInt; - /// rate - double get rate { - return objc.useMsgSendVariants - ? _objc_msgSend_358Fpret(this.pointer, _sel_rate) - : _objc_msgSend_358(this.pointer, _sel_rate); - } + AudioChannelBitmap get mChannelBitmap => + AudioChannelBitmap.fromValue(mChannelBitmapAsInt); - /// setRate: - set rate(double value) { - return _objc_msgSend_359(this.pointer, _sel_setRate_, value); - } + @ffi.UnsignedInt() + external int mNumberChannelDescriptions; - /// currentTime - double get currentTime { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_currentTime) - : _objc_msgSend_18(this.pointer, _sel_currentTime); - } + @ffi.Array.multi([1]) + external ffi.Array mChannelDescriptions; +} - /// setCurrentTime: - set currentTime(double value) { - return _objc_msgSend_223(this.pointer, _sel_setCurrentTime_, value); - } +late final _sel_initWithLayout_ = objc.registerName("initWithLayout:"); +final _objc_msgSend_tk4ypl = 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_layoutWithLayoutTag_ = + objc.registerName("layoutWithLayoutTag:"); +late final _sel_layoutWithLayout_ = objc.registerName("layoutWithLayout:"); +late final _sel_layoutTag = objc.registerName("layoutTag"); +late final _sel_layout = objc.registerName("layout"); +final _objc_msgSend_1ice9o9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_channelCount = objc.registerName("channelCount"); +final _objc_msgSend_tfd317 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Uint32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); - /// deviceCurrentTime - double get deviceCurrentTime { - return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_deviceCurrentTime) - : _objc_msgSend_18(this.pointer, _sel_deviceCurrentTime); - } +/// AVAudioChannelLayout +class AVAudioChannelLayout extends objc.NSObject { + AVAudioChannelLayout._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// numberOfLoops - int get numberOfLoops { - return _objc_msgSend_123(this.pointer, _sel_numberOfLoops); - } + /// Constructs a [AVAudioChannelLayout] that points to the same underlying object as [other]. + AVAudioChannelLayout.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// setNumberOfLoops: - set numberOfLoops(int value) { - return _objc_msgSend_142(this.pointer, _sel_setNumberOfLoops_, value); - } + /// Constructs a [AVAudioChannelLayout] that wraps the given raw object pointer. + AVAudioChannelLayout.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// settings - objc.NSDictionary get settings { - final _ret = _objc_msgSend_121(this.pointer, _sel_settings); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [AVAudioChannelLayout]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_AVAudioChannelLayout); } - /// format - AVAudioFormat get format { - final _ret = _objc_msgSend_740(this.pointer, _sel_format); - return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + /// init + AVAudioChannelLayout init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } - /// isMeteringEnabled - bool get meteringEnabled { - return _objc_msgSend_13(this.pointer, _sel_isMeteringEnabled); + /// initWithLayoutTag: + AVAudioChannelLayout? initWithLayoutTag_(int layoutTag) { + final _ret = _objc_msgSend_pxgym4( + this.ref.retainAndReturnPointer(), _sel_initWithLayoutTag_, layoutTag); + return _ret.address == 0 + ? null + : AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } - /// setMeteringEnabled: - set meteringEnabled(bool value) { - return _objc_msgSend_14(this.pointer, _sel_setMeteringEnabled_, value); + /// initWithLayout: + AVAudioChannelLayout initWithLayout_(ffi.Pointer layout) { + final _ret = _objc_msgSend_tk4ypl( + this.ref.retainAndReturnPointer(), _sel_initWithLayout_, layout); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } - /// updateMeters - void updateMeters() { - _objc_msgSend_7(this.pointer, _sel_updateMeters); + /// isEqual: + bool isEqual_(objc.ObjCObjectBase object) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqual_, object.ref.pointer); } - /// peakPowerForChannel: - double peakPowerForChannel_(int channelNumber) { - return objc.useMsgSendVariants - ? _objc_msgSend_741Fpret( - this.pointer, _sel_peakPowerForChannel_, channelNumber) - : _objc_msgSend_741( - this.pointer, _sel_peakPowerForChannel_, channelNumber); + /// layoutWithLayoutTag: + static AVAudioChannelLayout layoutWithLayoutTag_(int layoutTag) { + final _ret = _objc_msgSend_pxgym4( + _class_AVAudioChannelLayout, _sel_layoutWithLayoutTag_, layoutTag); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } - /// averagePowerForChannel: - double averagePowerForChannel_(int channelNumber) { - return objc.useMsgSendVariants - ? _objc_msgSend_741Fpret( - this.pointer, _sel_averagePowerForChannel_, channelNumber) - : _objc_msgSend_741( - this.pointer, _sel_averagePowerForChannel_, channelNumber); + /// layoutWithLayout: + static AVAudioChannelLayout layoutWithLayout_( + ffi.Pointer layout) { + final _ret = _objc_msgSend_tk4ypl( + _class_AVAudioChannelLayout, _sel_layoutWithLayout_, layout); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } - /// channelAssignments - objc.NSArray? get channelAssignments { - final _ret = _objc_msgSend_86(this.pointer, _sel_channelAssignments); - return _ret.address == 0 - ? null - : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + /// layoutTag + int get layoutTag { + return _objc_msgSend_dzloj4(this.ref.pointer, _sel_layoutTag); } - /// setChannelAssignments: - set channelAssignments(objc.NSArray? value) { - return _objc_msgSend_546(this.pointer, _sel_setChannelAssignments_, - value?.pointer ?? ffi.nullptr); + /// layout + ffi.Pointer get layout { + return _objc_msgSend_1ice9o9(this.ref.pointer, _sel_layout); } - /// init - AVAudioPlayer init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); + /// channelCount + int get channelCount { + return _objc_msgSend_tfd317(this.ref.pointer, _sel_channelCount); } /// new - static AVAudioPlayer new1() { - final _ret = _objc_msgSend_19(_class_AVAudioPlayer, _sel_new); - return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); + static AVAudioChannelLayout new1() { + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioChannelLayout, _sel_new); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: - static AVAudioPlayer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_28(_class_AVAudioPlayer, _sel_allocWithZone_, zone); - return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); + static AVAudioChannelLayout allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_AVAudioChannelLayout, _sel_allocWithZone_, zone); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } /// alloc - static AVAudioPlayer alloc() { - final _ret = _objc_msgSend_19(_class_AVAudioPlayer, _sel_alloc); - return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); + static AVAudioChannelLayout alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioChannelLayout, _sel_alloc); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -40279,164 +41321,266 @@ class AVAudioPlayer extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_AVAudioPlayer, + _objc_msgSend_cqxsqq( + _class_AVAudioChannelLayout, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_AVAudioPlayer, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_AVAudioChannelLayout, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_AVAudioPlayer, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_olxnu1( + _class_AVAudioChannelLayout, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_AVAudioPlayer, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1( + _class_AVAudioChannelLayout, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_AVAudioPlayer, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_AVAudioChannelLayout, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_AVAudioPlayer, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_AVAudioChannelLayout, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_AVAudioPlayer, + _objc_msgSend_1tjlcwl( + _class_AVAudioChannelLayout, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_AVAudioPlayer, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioChannelLayout, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_AVAudioPlayer, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioChannelLayout, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } + + /// self + AVAudioChannelLayout self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + AVAudioChannelLayout retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + AVAudioChannelLayout autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); + } + + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_AVAudioChannelLayout, _sel_supportsSecureCoding); + } + + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } + + /// initWithCoder: + AVAudioChannelLayout? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); + } } -late final _class_AVAudioPlayer = objc.getClass("AVAudioPlayer"); -late final _sel_initWithContentsOfURL_error_ = - objc.registerName("initWithContentsOfURL:error:"); -late final _sel_initWithData_error_ = objc.registerName("initWithData:error:"); -final _objc_msgSend_719 = objc.msgSendPointer +late final _sel_initWithStreamDescription_channelLayout_ = + objc.registerName("initWithStreamDescription:channelLayout:"); +final _objc_msgSend_18zr4wd = 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>)>(); -late final _sel_initWithContentsOfURL_fileTypeHint_error_ = - objc.registerName("initWithContentsOfURL:fileTypeHint:error:"); -final _objc_msgSend_720 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initStandardFormatWithSampleRate_channels_ = + objc.registerName("initStandardFormatWithSampleRate:channels:"); +final _objc_msgSend_17dsvlf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Double, ffi.Uint32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, double, int)>(); +late final _sel_initStandardFormatWithSampleRate_channelLayout_ = + objc.registerName("initStandardFormatWithSampleRate:channelLayout:"); +final _objc_msgSend_m6z6pt = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Double, + ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_initWithData_fileTypeHint_error_ = - objc.registerName("initWithData:fileTypeHint:error:"); -final _objc_msgSend_721 = objc.msgSendPointer + double, + ffi.Pointer)>(); + +enum AVAudioCommonFormat { + AVAudioOtherFormat(0), + AVAudioPCMFormatFloat32(1), + AVAudioPCMFormatFloat64(2), + AVAudioPCMFormatInt16(3), + AVAudioPCMFormatInt32(4); + + final int value; + const AVAudioCommonFormat(this.value); + + static AVAudioCommonFormat fromValue(int value) => switch (value) { + 0 => AVAudioOtherFormat, + 1 => AVAudioPCMFormatFloat32, + 2 => AVAudioPCMFormatFloat64, + 3 => AVAudioPCMFormatInt16, + 4 => AVAudioPCMFormatInt32, + _ => + throw ArgumentError("Unknown value for AVAudioCommonFormat: $value"), + }; +} + +late final _sel_initWithCommonFormat_sampleRate_channels_interleaved_ = + objc.registerName("initWithCommonFormat:sampleRate:channels:interleaved:"); +final _objc_msgSend_mosbvw = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.Double, + ffi.Uint32, + ffi.Bool)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, double, int, bool)>(); +late final _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_ = + objc.registerName( + "initWithCommonFormat:sampleRate:interleaved:channelLayout:"); +final _objc_msgSend_1kvbzfo = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer, + ffi.UnsignedLong, + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, + int, + double, + bool, + ffi.Pointer)>(); +late final _sel_initWithSettings_ = objc.registerName("initWithSettings:"); + +final class opaqueCMFormatDescription extends ffi.Opaque {} + +late final _sel_initWithCMAudioFormatDescription_ = + objc.registerName("initWithCMAudioFormatDescription:"); +final _objc_msgSend_nbwfhi = 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_prepareToPlay = objc.registerName("prepareToPlay"); -late final _sel_play = objc.registerName("play"); -late final _sel_playAtTime_ = objc.registerName("playAtTime:"); -final _objc_msgSend_722 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_isStandard = objc.registerName("isStandard"); +late final _sel_commonFormat = objc.registerName("commonFormat"); +final _objc_msgSend_115fnjc = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, double)>(); -late final _sel_isPlaying = objc.registerName("isPlaying"); -late final _sel_numberOfChannels = objc.registerName("numberOfChannels"); -late final _sel_currentDevice = objc.registerName("currentDevice"); -late final _sel_setCurrentDevice_ = objc.registerName("setCurrentDevice:"); -late final _sel_url = objc.registerName("url"); -late final _sel_pan = objc.registerName("pan"); -late final _sel_setPan_ = objc.registerName("setPan:"); -late final _sel_volume = objc.registerName("volume"); -late final _sel_setVolume_ = objc.registerName("setVolume:"); -late final _sel_setVolume_fadeDuration_ = - objc.registerName("setVolume:fadeDuration:"); -final _objc_msgSend_723 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isInterleaved = objc.registerName("isInterleaved"); +late final _sel_streamDescription = objc.registerName("streamDescription"); +final _objc_msgSend_irgetq = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Float, ffi.Double)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, double, double)>(); -late final _sel_enableRate = objc.registerName("enableRate"); -late final _sel_setEnableRate_ = objc.registerName("setEnableRate:"); -late final _sel_rate = objc.registerName("rate"); -late final _sel_setRate_ = objc.registerName("setRate:"); -late final _sel_currentTime = objc.registerName("currentTime"); -late final _sel_setCurrentTime_ = objc.registerName("setCurrentTime:"); -late final _sel_deviceCurrentTime = objc.registerName("deviceCurrentTime"); -late final _sel_numberOfLoops = objc.registerName("numberOfLoops"); -late final _sel_setNumberOfLoops_ = objc.registerName("setNumberOfLoops:"); -late final _sel_settings = objc.registerName("settings"); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_channelLayout = objc.registerName("channelLayout"); +late final _sel_magicCookie = objc.registerName("magicCookie"); +late final _sel_setMagicCookie_ = objc.registerName("setMagicCookie:"); +late final _sel_formatDescription = objc.registerName("formatDescription"); +final _objc_msgSend_1ot92k6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); /// AVAudioFormat class AVAudioFormat extends objc.NSObject { @@ -40446,7 +41590,7 @@ class AVAudioFormat extends objc.NSObject { /// Constructs a [AVAudioFormat] that points to the same underlying object as [other]. AVAudioFormat.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [AVAudioFormat] that wraps the given raw object pointer. AVAudioFormat.castFromPointer(ffi.Pointer other, @@ -40455,53 +41599,53 @@ class AVAudioFormat extends objc.NSObject { /// Returns whether [obj] is an instance of [AVAudioFormat]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_AVAudioFormat); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_AVAudioFormat); } /// initWithStreamDescription: AVAudioFormat? initWithStreamDescription_( ffi.Pointer asbd) { - final _ret = - _objc_msgSend_724(this.pointer, _sel_initWithStreamDescription_, asbd); + final _ret = _objc_msgSend_1ndg23i(this.ref.retainAndReturnPointer(), + _sel_initWithStreamDescription_, asbd); return _ret.address == 0 ? null - : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// initWithStreamDescription:channelLayout: AVAudioFormat? initWithStreamDescription_channelLayout_( ffi.Pointer asbd, AVAudioChannelLayout? layout) { - final _ret = _objc_msgSend_730( - this.pointer, + final _ret = _objc_msgSend_18zr4wd( + this.ref.retainAndReturnPointer(), _sel_initWithStreamDescription_channelLayout_, asbd, - layout?.pointer ?? ffi.nullptr); + layout?.ref.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// initStandardFormatWithSampleRate:channels: AVAudioFormat? initStandardFormatWithSampleRate_channels_( double sampleRate, int channels) { - final _ret = _objc_msgSend_731(this.pointer, + final _ret = _objc_msgSend_17dsvlf(this.ref.retainAndReturnPointer(), _sel_initStandardFormatWithSampleRate_channels_, sampleRate, channels); return _ret.address == 0 ? null - : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// initStandardFormatWithSampleRate:channelLayout: AVAudioFormat initStandardFormatWithSampleRate_channelLayout_( double sampleRate, AVAudioChannelLayout layout) { - final _ret = _objc_msgSend_732( - this.pointer, + final _ret = _objc_msgSend_m6z6pt( + this.ref.retainAndReturnPointer(), _sel_initStandardFormatWithSampleRate_channelLayout_, sampleRate, - layout.pointer); - return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + layout.ref.pointer); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// initWithCommonFormat:sampleRate:channels:interleaved: @@ -40510,8 +41654,8 @@ class AVAudioFormat extends objc.NSObject { double sampleRate, int channels, bool interleaved) { - final _ret = _objc_msgSend_733( - this.pointer, + final _ret = _objc_msgSend_mosbvw( + this.ref.retainAndReturnPointer(), _sel_initWithCommonFormat_sampleRate_channels_interleaved_, format.value, sampleRate, @@ -40519,7 +41663,7 @@ class AVAudioFormat extends objc.NSObject { interleaved); return _ret.address == 0 ? null - : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// initWithCommonFormat:sampleRate:interleaved:channelLayout: @@ -40528,74 +41672,75 @@ class AVAudioFormat extends objc.NSObject { double sampleRate, bool interleaved, AVAudioChannelLayout layout) { - final _ret = _objc_msgSend_734( - this.pointer, + final _ret = _objc_msgSend_1kvbzfo( + this.ref.retainAndReturnPointer(), _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_, format.value, sampleRate, interleaved, - layout.pointer); - return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + layout.ref.pointer); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// initWithSettings: AVAudioFormat? initWithSettings_(objc.NSDictionary settings) { - final _ret = _objc_msgSend_320( - this.pointer, _sel_initWithSettings_, settings.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithSettings_, settings.ref.pointer); return _ret.address == 0 ? null - : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// initWithCMAudioFormatDescription: AVAudioFormat initWithCMAudioFormatDescription_( ffi.Pointer formatDescription) { - final _ret = _objc_msgSend_735(this.pointer, + final _ret = _objc_msgSend_nbwfhi(this.ref.retainAndReturnPointer(), _sel_initWithCMAudioFormatDescription_, formatDescription); - return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// isEqual: bool isEqual_(objc.ObjCObjectBase object) { - return _objc_msgSend_0(this.pointer, _sel_isEqual_, object.pointer); + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqual_, object.ref.pointer); } /// isStandard bool get standard { - return _objc_msgSend_13(this.pointer, _sel_isStandard); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isStandard); } /// commonFormat AVAudioCommonFormat get commonFormat { - final _ret = _objc_msgSend_736(this.pointer, _sel_commonFormat); + final _ret = _objc_msgSend_115fnjc(this.ref.pointer, _sel_commonFormat); return AVAudioCommonFormat.fromValue(_ret); } /// channelCount int get channelCount { - return _objc_msgSend_729(this.pointer, _sel_channelCount); + return _objc_msgSend_tfd317(this.ref.pointer, _sel_channelCount); } /// sampleRate double get sampleRate { return objc.useMsgSendVariants - ? _objc_msgSend_18Fpret(this.pointer, _sel_sampleRate) - : _objc_msgSend_18(this.pointer, _sel_sampleRate); + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_sampleRate) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_sampleRate); } /// isInterleaved bool get interleaved { - return _objc_msgSend_13(this.pointer, _sel_isInterleaved); + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isInterleaved); } /// streamDescription ffi.Pointer get streamDescription { - return _objc_msgSend_737(this.pointer, _sel_streamDescription); + return _objc_msgSend_irgetq(this.ref.pointer, _sel_streamDescription); } /// channelLayout AVAudioChannelLayout? get channelLayout { - final _ret = _objc_msgSend_738(this.pointer, _sel_channelLayout); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_channelLayout); return _ret.address == 0 ? null : AVAudioChannelLayout.castFromPointer(_ret, @@ -40604,7 +41749,7 @@ class AVAudioFormat extends objc.NSObject { /// magicCookie objc.NSData? get magicCookie { - final _ret = _objc_msgSend_334(this.pointer, _sel_magicCookie); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_magicCookie); return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); @@ -40612,43 +41757,44 @@ class AVAudioFormat extends objc.NSObject { /// setMagicCookie: set magicCookie(objc.NSData? value) { - return _objc_msgSend_511( - this.pointer, _sel_setMagicCookie_, value?.pointer ?? ffi.nullptr); + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMagicCookie_, + value?.ref.pointer ?? ffi.nullptr); } /// settings objc.NSDictionary get settings { - final _ret = _objc_msgSend_121(this.pointer, _sel_settings); + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_settings); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// formatDescription ffi.Pointer get formatDescription { - return _objc_msgSend_739(this.pointer, _sel_formatDescription); + return _objc_msgSend_1ot92k6(this.ref.pointer, _sel_formatDescription); } /// init AVAudioFormat init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// new static AVAudioFormat new1() { - final _ret = _objc_msgSend_19(_class_AVAudioFormat, _sel_new); + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioFormat, _sel_new); return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static AVAudioFormat allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_28(_class_AVAudioFormat, _sel_allocWithZone_, zone); + _objc_msgSend_1b3ihd0(_class_AVAudioFormat, _sel_allocWithZone_, zone); return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } /// alloc static AVAudioFormat alloc() { - final _ret = _objc_msgSend_19(_class_AVAudioFormat, _sel_alloc); + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioFormat, _sel_alloc); return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } @@ -40657,218 +41803,462 @@ class AVAudioFormat extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( + _objc_msgSend_cqxsqq( _class_AVAudioFormat, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_AVAudioFormat, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_AVAudioFormat, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( + return _objc_msgSend_olxnu1( _class_AVAudioFormat, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_13(_class_AVAudioFormat, _sel_useStoredAccessor); + return _objc_msgSend_olxnu1(_class_AVAudioFormat, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_AVAudioFormat, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + final _ret = _objc_msgSend_juohf7(_class_AVAudioFormat, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_31(_class_AVAudioFormat, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + return _objc_msgSend_l8lotg(_class_AVAudioFormat, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: static void setKeys_triggerChangeNotificationsForDependentKey_( objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( + _objc_msgSend_1tjlcwl( _class_AVAudioFormat, _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( + final _ret = _objc_msgSend_1unuoxw( _class_AVAudioFormat, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_19(_class_AVAudioFormat, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioFormat, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } -} - -late final _class_AVAudioFormat = objc.getClass("AVAudioFormat"); - -final class AudioStreamBasicDescription extends ffi.Struct { - @ffi.Double() - external double mSampleRate; - - @ffi.UnsignedInt() - external int mFormatID; - - @ffi.UnsignedInt() - external int mFormatFlags; - @ffi.UnsignedInt() - external int mBytesPerPacket; + /// self + AVAudioFormat self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + } - @ffi.UnsignedInt() - external int mFramesPerPacket; + /// retain + AVAudioFormat retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + } - @ffi.UnsignedInt() - external int mBytesPerFrame; + /// autorelease + AVAudioFormat autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); + } - @ffi.UnsignedInt() - external int mChannelsPerFrame; + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_AVAudioFormat, _sel_supportsSecureCoding); + } - @ffi.UnsignedInt() - external int mBitsPerChannel; + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); + } - @ffi.UnsignedInt() - external int mReserved; + /// initWithCoder: + AVAudioFormat? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : AVAudioFormat.castFromPointer(_ret, retain: false, release: true); + } } -late final _sel_initWithStreamDescription_ = - objc.registerName("initWithStreamDescription:"); -final _objc_msgSend_724 = objc.msgSendPointer +late final _sel_isMeteringEnabled = objc.registerName("isMeteringEnabled"); +late final _sel_setMeteringEnabled_ = objc.registerName("setMeteringEnabled:"); +late final _sel_updateMeters = objc.registerName("updateMeters"); +late final _sel_peakPowerForChannel_ = + objc.registerName("peakPowerForChannel:"); +final _objc_msgSend_imxjxz = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Float Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + double Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_imxjxzFpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_averagePowerForChannel_ = + objc.registerName("averagePowerForChannel:"); +late final _sel_channelAssignments = objc.registerName("channelAssignments"); +late final _sel_setChannelAssignments_ = + objc.registerName("setChannelAssignments:"); -/// AVAudioChannelLayout -class AVAudioChannelLayout extends objc.NSObject { - AVAudioChannelLayout._(ffi.Pointer pointer, +/// AVAudioPlayer +class AVAudioPlayer extends objc.NSObject { + AVAudioPlayer._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [AVAudioChannelLayout] that points to the same underlying object as [other]. - AVAudioChannelLayout.castFrom(objc.ObjCObjectBase other) - : this._(other.pointer, retain: true, release: true); + /// Constructs a [AVAudioPlayer] that points to the same underlying object as [other]. + AVAudioPlayer.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [AVAudioPlayer] that wraps the given raw object pointer. + AVAudioPlayer.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [AVAudioPlayer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_AVAudioPlayer); + } + + /// initWithContentsOfURL:error: + AVAudioPlayer? initWithContentsOfURL_error_( + objc.NSURL url, ffi.Pointer> outError) { + final _ret = _objc_msgSend_1y425zh(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_error_, url.ref.pointer, outError); + return _ret.address == 0 + ? null + : AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithData:error: + AVAudioPlayer? initWithData_error_( + objc.NSData data, ffi.Pointer> outError) { + final _ret = _objc_msgSend_1y425zh(this.ref.retainAndReturnPointer(), + _sel_initWithData_error_, data.ref.pointer, outError); + return _ret.address == 0 + ? null + : AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithContentsOfURL:fileTypeHint:error: + AVAudioPlayer? initWithContentsOfURL_fileTypeHint_error_( + objc.NSURL url, + objc.NSString? utiString, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_1lpsn5w( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_fileTypeHint_error_, + url.ref.pointer, + utiString?.ref.pointer ?? ffi.nullptr, + outError); + return _ret.address == 0 + ? null + : AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithData:fileTypeHint:error: + AVAudioPlayer? initWithData_fileTypeHint_error_( + objc.NSData data, + objc.NSString? utiString, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_1lpsn5w( + this.ref.retainAndReturnPointer(), + _sel_initWithData_fileTypeHint_error_, + data.ref.pointer, + utiString?.ref.pointer ?? ffi.nullptr, + outError); + return _ret.address == 0 + ? null + : AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); + } + + /// prepareToPlay + bool prepareToPlay() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_prepareToPlay); + } + + /// play + bool play() { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_play); + } + + /// playAtTime: + bool playAtTime_(double time) { + return _objc_msgSend_1hnh3lf(this.ref.pointer, _sel_playAtTime_, time); + } + + /// pause + void pause() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_pause); + } + + /// stop + void stop() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stop); + } + + /// isPlaying + bool get playing { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPlaying); + } + + /// numberOfChannels + int get numberOfChannels { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_numberOfChannels); + } + + /// duration + double get duration { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_duration) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_duration); + } + + /// currentDevice + objc.NSString? get currentDevice { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDevice); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// setCurrentDevice: + set currentDevice(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrentDevice_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// setDelegate: + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); + } + + /// url + objc.NSURL? get url { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_url); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// data + objc.NSData? get data { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + /// pan + double get pan { + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_pan) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_pan); + } + + /// setPan: + set pan(double value) { + return _objc_msgSend_s9gjzc(this.ref.pointer, _sel_setPan_, value); + } + + /// volume + double get volume { + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_volume) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_volume); + } + + /// setVolume: + set volume(double value) { + return _objc_msgSend_s9gjzc(this.ref.pointer, _sel_setVolume_, value); + } + + /// setVolume:fadeDuration: + void setVolume_fadeDuration_(double volume, double duration) { + _objc_msgSend_1kev0m2( + this.ref.pointer, _sel_setVolume_fadeDuration_, volume, duration); + } + + /// enableRate + bool get enableRate { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_enableRate); + } + + /// setEnableRate: + set enableRate(bool value) { + return _objc_msgSend_117qins(this.ref.pointer, _sel_setEnableRate_, value); + } + + /// rate + double get rate { + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_rate) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_rate); + } + + /// setRate: + set rate(double value) { + return _objc_msgSend_s9gjzc(this.ref.pointer, _sel_setRate_, value); + } + + /// currentTime + double get currentTime { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_currentTime) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_currentTime); + } + + /// setCurrentTime: + set currentTime(double value) { + return _objc_msgSend_suh039(this.ref.pointer, _sel_setCurrentTime_, value); + } + + /// deviceCurrentTime + double get deviceCurrentTime { + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_deviceCurrentTime) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_deviceCurrentTime); + } - /// Constructs a [AVAudioChannelLayout] that wraps the given raw object pointer. - AVAudioChannelLayout.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// numberOfLoops + int get numberOfLoops { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_numberOfLoops); + } - /// Returns whether [obj] is an instance of [AVAudioChannelLayout]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_AVAudioChannelLayout); + /// setNumberOfLoops: + set numberOfLoops(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setNumberOfLoops_, value); } - /// init - AVAudioChannelLayout init() { - final _ret = _objc_msgSend_19(this.pointer, _sel_init); - return AVAudioChannelLayout.castFromPointer(_ret, - retain: true, release: true); + /// settings + objc.NSDictionary get settings { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_settings); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// initWithLayoutTag: - AVAudioChannelLayout? initWithLayoutTag_(int layoutTag) { - final _ret = - _objc_msgSend_725(this.pointer, _sel_initWithLayoutTag_, layoutTag); - return _ret.address == 0 - ? null - : AVAudioChannelLayout.castFromPointer(_ret, - retain: true, release: true); + /// format + AVAudioFormat get format { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_format); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } - /// initWithLayout: - AVAudioChannelLayout initWithLayout_(ffi.Pointer layout) { - final _ret = _objc_msgSend_726(this.pointer, _sel_initWithLayout_, layout); - return AVAudioChannelLayout.castFromPointer(_ret, - retain: true, release: true); + /// isMeteringEnabled + bool get meteringEnabled { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isMeteringEnabled); } - /// isEqual: - bool isEqual_(objc.ObjCObjectBase object) { - return _objc_msgSend_0(this.pointer, _sel_isEqual_, object.pointer); + /// setMeteringEnabled: + set meteringEnabled(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setMeteringEnabled_, value); } - /// layoutWithLayoutTag: - static AVAudioChannelLayout layoutWithLayoutTag_(int layoutTag) { - final _ret = _objc_msgSend_727( - _class_AVAudioChannelLayout, _sel_layoutWithLayoutTag_, layoutTag); - return AVAudioChannelLayout.castFromPointer(_ret, - retain: true, release: true); + /// updateMeters + void updateMeters() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_updateMeters); } - /// layoutWithLayout: - static AVAudioChannelLayout layoutWithLayout_( - ffi.Pointer layout) { - final _ret = _objc_msgSend_726( - _class_AVAudioChannelLayout, _sel_layoutWithLayout_, layout); - return AVAudioChannelLayout.castFromPointer(_ret, - retain: true, release: true); + /// peakPowerForChannel: + double peakPowerForChannel_(int channelNumber) { + return objc.useMsgSendVariants + ? _objc_msgSend_imxjxzFpret( + this.ref.pointer, _sel_peakPowerForChannel_, channelNumber) + : _objc_msgSend_imxjxz( + this.ref.pointer, _sel_peakPowerForChannel_, channelNumber); } - /// layoutTag - int get layoutTag { - return _objc_msgSend_644(this.pointer, _sel_layoutTag); + /// averagePowerForChannel: + double averagePowerForChannel_(int channelNumber) { + return objc.useMsgSendVariants + ? _objc_msgSend_imxjxzFpret( + this.ref.pointer, _sel_averagePowerForChannel_, channelNumber) + : _objc_msgSend_imxjxz( + this.ref.pointer, _sel_averagePowerForChannel_, channelNumber); } - /// layout - ffi.Pointer get layout { - return _objc_msgSend_728(this.pointer, _sel_layout); + /// channelAssignments + objc.NSArray? get channelAssignments { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_channelAssignments); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// channelCount - int get channelCount { - return _objc_msgSend_729(this.pointer, _sel_channelCount); + /// setChannelAssignments: + set channelAssignments(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChannelAssignments_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// init + AVAudioPlayer init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } /// new - static AVAudioChannelLayout new1() { - final _ret = _objc_msgSend_19(_class_AVAudioChannelLayout, _sel_new); - return AVAudioChannelLayout.castFromPointer(_ret, - retain: false, release: true); + static AVAudioPlayer new1() { + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioPlayer, _sel_new); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static AVAudioChannelLayout allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_28( - _class_AVAudioChannelLayout, _sel_allocWithZone_, zone); - return AVAudioChannelLayout.castFromPointer(_ret, - retain: false, release: true); + static AVAudioPlayer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_AVAudioPlayer, _sel_allocWithZone_, zone); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } /// alloc - static AVAudioChannelLayout alloc() { - final _ret = _objc_msgSend_19(_class_AVAudioChannelLayout, _sel_alloc); - return AVAudioChannelLayout.castFromPointer(_ret, - retain: false, release: true); + static AVAudioPlayer alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_AVAudioPlayer, _sel_alloc); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } /// cancelPreviousPerformRequestsWithTarget:selector:object: @@ -40876,438 +42266,84 @@ class AVAudioChannelLayout extends objc.NSObject { objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { - _objc_msgSend_29( - _class_AVAudioChannelLayout, + _objc_msgSend_cqxsqq( + _class_AVAudioPlayer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, + aTarget.ref.pointer, aSelector, - anArgument?.pointer ?? ffi.nullptr); + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: static void cancelPreviousPerformRequestsWithTarget_( objc.ObjCObjectBase aTarget) { - _objc_msgSend_27(_class_AVAudioChannelLayout, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + _objc_msgSend_ukcdfq(_class_AVAudioPlayer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_13( - _class_AVAudioChannelLayout, _sel_accessInstanceVariablesDirectly); - } - - /// useStoredAccessor - static bool useStoredAccessor() { - return _objc_msgSend_13( - _class_AVAudioChannelLayout, _sel_useStoredAccessor); - } - - /// keyPathsForValuesAffectingValueForKey: - static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_30(_class_AVAudioChannelLayout, - _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_AVAudioChannelLayout, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_( - objc.NSArray keys, objc.NSString dependentKey) { - _objc_msgSend_32( - _class_AVAudioChannelLayout, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - /// classFallbacksForKeyedArchiver - static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_33( - _class_AVAudioChannelLayout, _sel_classFallbacksForKeyedArchiver); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// classForKeyedUnarchiver - static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_19( - _class_AVAudioChannelLayout, _sel_classForKeyedUnarchiver); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } -} - -late final _class_AVAudioChannelLayout = objc.getClass("AVAudioChannelLayout"); -late final _sel_initWithLayoutTag_ = objc.registerName("initWithLayoutTag:"); -final _objc_msgSend_725 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); - -final class AudioChannelLayout extends ffi.Struct { - @ffi.UnsignedInt() - external int mChannelLayoutTag; - - @ffi.UnsignedInt() - external int mChannelBitmap; - - @ffi.UnsignedInt() - external int mNumberChannelDescriptions; - - @ffi.Array.multi([1]) - external ffi.Array mChannelDescriptions; -} - -enum AudioChannelBitmap { - kAudioChannelBit_Left(1), - kAudioChannelBit_Right(2), - kAudioChannelBit_Center(4), - kAudioChannelBit_LFEScreen(8), - kAudioChannelBit_LeftSurround(16), - kAudioChannelBit_RightSurround(32), - kAudioChannelBit_LeftCenter(64), - kAudioChannelBit_RightCenter(128), - kAudioChannelBit_CenterSurround(256), - kAudioChannelBit_LeftSurroundDirect(512), - kAudioChannelBit_RightSurroundDirect(1024), - kAudioChannelBit_TopCenterSurround(2048), - kAudioChannelBit_VerticalHeightLeft(4096), - kAudioChannelBit_VerticalHeightCenter(8192), - kAudioChannelBit_VerticalHeightRight(16384), - kAudioChannelBit_TopBackLeft(32768), - kAudioChannelBit_TopBackCenter(65536), - kAudioChannelBit_TopBackRight(131072), - kAudioChannelBit_LeftTopMiddle(2097152), - kAudioChannelBit_RightTopMiddle(8388608), - kAudioChannelBit_LeftTopRear(16777216), - kAudioChannelBit_CenterTopRear(33554432), - kAudioChannelBit_RightTopRear(67108864); - - static const kAudioChannelBit_LeftTopFront = - kAudioChannelBit_VerticalHeightLeft; - static const kAudioChannelBit_CenterTopFront = - kAudioChannelBit_VerticalHeightCenter; - static const kAudioChannelBit_RightTopFront = - kAudioChannelBit_VerticalHeightRight; - static const kAudioChannelBit_CenterTopMiddle = - kAudioChannelBit_TopCenterSurround; - - final int value; - const AudioChannelBitmap(this.value); - - static AudioChannelBitmap fromValue(int value) => switch (value) { - 1 => kAudioChannelBit_Left, - 2 => kAudioChannelBit_Right, - 4 => kAudioChannelBit_Center, - 8 => kAudioChannelBit_LFEScreen, - 16 => kAudioChannelBit_LeftSurround, - 32 => kAudioChannelBit_RightSurround, - 64 => kAudioChannelBit_LeftCenter, - 128 => kAudioChannelBit_RightCenter, - 256 => kAudioChannelBit_CenterSurround, - 512 => kAudioChannelBit_LeftSurroundDirect, - 1024 => kAudioChannelBit_RightSurroundDirect, - 2048 => kAudioChannelBit_TopCenterSurround, - 4096 => kAudioChannelBit_VerticalHeightLeft, - 8192 => kAudioChannelBit_VerticalHeightCenter, - 16384 => kAudioChannelBit_VerticalHeightRight, - 32768 => kAudioChannelBit_TopBackLeft, - 65536 => kAudioChannelBit_TopBackCenter, - 131072 => kAudioChannelBit_TopBackRight, - 2097152 => kAudioChannelBit_LeftTopMiddle, - 8388608 => kAudioChannelBit_RightTopMiddle, - 16777216 => kAudioChannelBit_LeftTopRear, - 33554432 => kAudioChannelBit_CenterTopRear, - 67108864 => kAudioChannelBit_RightTopRear, - _ => - throw ArgumentError("Unknown value for AudioChannelBitmap: $value"), - }; - - @override - String toString() { - if (this == kAudioChannelBit_TopCenterSurround) - return "AudioChannelBitmap.kAudioChannelBit_TopCenterSurround, AudioChannelBitmap.kAudioChannelBit_CenterTopMiddle"; - if (this == kAudioChannelBit_VerticalHeightLeft) - return "AudioChannelBitmap.kAudioChannelBit_VerticalHeightLeft, AudioChannelBitmap.kAudioChannelBit_LeftTopFront"; - if (this == kAudioChannelBit_VerticalHeightCenter) - return "AudioChannelBitmap.kAudioChannelBit_VerticalHeightCenter, AudioChannelBitmap.kAudioChannelBit_CenterTopFront"; - if (this == kAudioChannelBit_VerticalHeightRight) - return "AudioChannelBitmap.kAudioChannelBit_VerticalHeightRight, AudioChannelBitmap.kAudioChannelBit_RightTopFront"; - return super.toString(); + return _objc_msgSend_olxnu1( + _class_AVAudioPlayer, _sel_accessInstanceVariablesDirectly); } -} - -final class AudioChannelDescription extends ffi.Struct { - @ffi.UnsignedInt() - external int mChannelLabel; - - @ffi.UnsignedInt() - external int mChannelFlags; - - @ffi.Array.multi([3]) - external ffi.Array mCoordinates; -} - -enum AudioChannelFlags { - kAudioChannelFlags_AllOff(0), - kAudioChannelFlags_RectangularCoordinates(1), - kAudioChannelFlags_SphericalCoordinates(2), - kAudioChannelFlags_Meters(4); - final int value; - const AudioChannelFlags(this.value); + /// useStoredAccessor + static bool useStoredAccessor() { + return _objc_msgSend_olxnu1(_class_AVAudioPlayer, _sel_useStoredAccessor); + } - static AudioChannelFlags fromValue(int value) => switch (value) { - 0 => kAudioChannelFlags_AllOff, - 1 => kAudioChannelFlags_RectangularCoordinates, - 2 => kAudioChannelFlags_SphericalCoordinates, - 4 => kAudioChannelFlags_Meters, - _ => throw ArgumentError("Unknown value for AudioChannelFlags: $value"), - }; -} + /// keyPathsForValuesAffectingValueForKey: + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_juohf7(_class_AVAudioPlayer, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_initWithLayout_ = objc.registerName("initWithLayout:"); -final _objc_msgSend_726 = 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_isEqual_ = objc.registerName("isEqual:"); -late final _sel_layoutWithLayoutTag_ = - objc.registerName("layoutWithLayoutTag:"); -final _objc_msgSend_727 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_layoutWithLayout_ = objc.registerName("layoutWithLayout:"); -late final _sel_layoutTag = objc.registerName("layoutTag"); -late final _sel_layout = objc.registerName("layout"); -final _objc_msgSend_728 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_channelCount = objc.registerName("channelCount"); -final _objc_msgSend_729 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Uint32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithStreamDescription_channelLayout_ = - objc.registerName("initWithStreamDescription:channelLayout:"); -final _objc_msgSend_730 = 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_initStandardFormatWithSampleRate_channels_ = - objc.registerName("initStandardFormatWithSampleRate:channels:"); -final _objc_msgSend_731 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Double, ffi.Uint32)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, double, int)>(); -late final _sel_initStandardFormatWithSampleRate_channelLayout_ = - objc.registerName("initStandardFormatWithSampleRate:channelLayout:"); -final _objc_msgSend_732 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_l8lotg(_class_AVAudioPlayer, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); + } -enum AVAudioCommonFormat { - AVAudioOtherFormat(0), - AVAudioPCMFormatFloat32(1), - AVAudioPCMFormatFloat64(2), - AVAudioPCMFormatInt16(3), - AVAudioPCMFormatInt32(4); + /// setKeys:triggerChangeNotificationsForDependentKey: + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_AVAudioPlayer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); + } - final int value; - const AVAudioCommonFormat(this.value); + /// classFallbacksForKeyedArchiver + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioPlayer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - static AVAudioCommonFormat fromValue(int value) => switch (value) { - 0 => AVAudioOtherFormat, - 1 => AVAudioPCMFormatFloat32, - 2 => AVAudioPCMFormatFloat64, - 3 => AVAudioPCMFormatInt16, - 4 => AVAudioPCMFormatInt32, - _ => - throw ArgumentError("Unknown value for AVAudioCommonFormat: $value"), - }; -} + /// classForKeyedUnarchiver + static objc.ObjCObjectBase classForKeyedUnarchiver() { + final _ret = _objc_msgSend_1unuoxw( + _class_AVAudioPlayer, _sel_classForKeyedUnarchiver); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } -late final _sel_initWithCommonFormat_sampleRate_channels_interleaved_ = - objc.registerName("initWithCommonFormat:sampleRate:channels:interleaved:"); -final _objc_msgSend_733 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Double, - ffi.Uint32, - ffi.Bool)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int, double, int, bool)>(); -late final _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_ = - objc.registerName( - "initWithCommonFormat:sampleRate:interleaved:channelLayout:"); -final _objc_msgSend_734 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Double, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - int, - double, - bool, - ffi.Pointer)>(); -late final _sel_initWithSettings_ = objc.registerName("initWithSettings:"); + /// self + AVAudioPlayer self() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); + return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); + } -final class opaqueCMFormatDescription extends ffi.Opaque {} + /// retain + AVAudioPlayer retain() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); + return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_initWithCMAudioFormatDescription_ = - objc.registerName("initWithCMAudioFormatDescription:"); -final _objc_msgSend_735 = 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_isStandard = objc.registerName("isStandard"); -late final _sel_commonFormat = objc.registerName("commonFormat"); -final _objc_msgSend_736 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isInterleaved = objc.registerName("isInterleaved"); -late final _sel_streamDescription = objc.registerName("streamDescription"); -final _objc_msgSend_737 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_channelLayout = objc.registerName("channelLayout"); -final _objc_msgSend_738 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_magicCookie = objc.registerName("magicCookie"); -late final _sel_setMagicCookie_ = objc.registerName("setMagicCookie:"); -late final _sel_formatDescription = objc.registerName("formatDescription"); -final _objc_msgSend_739 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_740 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isMeteringEnabled = objc.registerName("isMeteringEnabled"); -late final _sel_setMeteringEnabled_ = objc.registerName("setMeteringEnabled:"); -late final _sel_updateMeters = objc.registerName("updateMeters"); -late final _sel_peakPowerForChannel_ = - objc.registerName("peakPowerForChannel:"); -final _objc_msgSend_741 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_741Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_averagePowerForChannel_ = - objc.registerName("averagePowerForChannel:"); -late final _sel_channelAssignments = objc.registerName("channelAssignments"); -late final _sel_setChannelAssignments_ = - objc.registerName("setChannelAssignments:"); + /// autorelease + AVAudioPlayer autorelease() { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); + return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); + } +} diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart.m b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart.m index 9b748cd4b..02b011c09 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart.m +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart.m @@ -1,200 +1,113 @@ #include - #import -typedef void (^ListenerBlock)(NSDictionary* , struct _NSRange , BOOL * ); -ListenerBlock wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool(ListenerBlock block) { - ListenerBlock wrapper = [^void(NSDictionary* arg0, struct _NSRange arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; -} -typedef void (^ListenerBlock1)(id , struct _NSRange , BOOL * ); -ListenerBlock1 wrapListenerBlock_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool(ListenerBlock1 block) { - ListenerBlock1 wrapper = [^void(id arg0, struct _NSRange arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; -} +#if !__has_feature(objc_arc) +#error "This file must be compiled with ARC enabled" +#endif -typedef void (^ListenerBlock2)(NSDate* , BOOL , BOOL * ); -ListenerBlock2 wrapListenerBlock_ObjCBlock_ffiVoid_NSDate_bool_bool(ListenerBlock2 block) { - ListenerBlock2 wrapper = [^void(NSDate* arg0, BOOL arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; -} +id objc_retain(id); +id objc_retainBlock(id); -typedef void (^ListenerBlock3)(NSTimer* ); -ListenerBlock3 wrapListenerBlock_ObjCBlock_ffiVoid_NSTimer(ListenerBlock3 block) { - ListenerBlock3 wrapper = [^void(NSTimer* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline)(); +_ListenerTrampoline _wrapListenerBlock_ksby9f(_ListenerTrampoline block) NS_RETURNS_RETAINED { + return ^void() { + objc_retainBlock(block); + block(); + }; } -typedef void (^ListenerBlock4)(NSFileHandle* ); -ListenerBlock4 wrapListenerBlock_ObjCBlock_ffiVoid_NSFileHandle(ListenerBlock4 block) { - ListenerBlock4 wrapper = [^void(NSFileHandle* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline1)(id arg0, id arg1, BOOL * arg2); +_ListenerTrampoline1 _wrapListenerBlock_1k41wmu(_ListenerTrampoline1 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1), arg2); + }; } -typedef void (^ListenerBlock5)(NSError* ); -ListenerBlock5 wrapListenerBlock_ObjCBlock_ffiVoid_NSError(ListenerBlock5 block) { - ListenerBlock5 wrapper = [^void(NSError* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline2)(void * arg0, id arg1); +_ListenerTrampoline2 _wrapListenerBlock_sjfpmz(_ListenerTrampoline2 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1)); + }; } -typedef void (^ListenerBlock6)(NSDictionary* , NSError* ); -ListenerBlock6 wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSError(ListenerBlock6 block) { - ListenerBlock6 wrapper = [^void(NSDictionary* arg0, NSError* arg1) { - block([arg0 retain], [arg1 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline3)(id arg0, struct _NSRange arg1, BOOL * arg2); +_ListenerTrampoline3 _wrapListenerBlock_1j7ar3u(_ListenerTrampoline3 block) NS_RETURNS_RETAINED { + return ^void(id arg0, struct _NSRange arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, arg2); + }; } -typedef void (^ListenerBlock7)(NSArray* ); -ListenerBlock7 wrapListenerBlock_ObjCBlock_ffiVoid_NSArray(ListenerBlock7 block) { - ListenerBlock7 wrapper = [^void(NSArray* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline4)(id arg0, BOOL arg1, BOOL * arg2); +_ListenerTrampoline4 _wrapListenerBlock_rvgf02(_ListenerTrampoline4 block) NS_RETURNS_RETAINED { + return ^void(id arg0, BOOL arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, arg2); + }; } -typedef void (^ListenerBlock8)(NSTextCheckingResult* , NSMatchingFlags , BOOL * ); -ListenerBlock8 wrapListenerBlock_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool(ListenerBlock8 block) { - ListenerBlock8 wrapper = [^void(NSTextCheckingResult* arg0, NSMatchingFlags arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline5)(id arg0); +_ListenerTrampoline5 _wrapListenerBlock_ukcdfq(_ListenerTrampoline5 block) NS_RETURNS_RETAINED { + return ^void(id arg0) { + objc_retainBlock(block); + block(objc_retain(arg0)); + }; } -typedef void (^ListenerBlock9)(NSCachedURLResponse* ); -ListenerBlock9 wrapListenerBlock_ObjCBlock_ffiVoid_NSCachedURLResponse(ListenerBlock9 block) { - ListenerBlock9 wrapper = [^void(NSCachedURLResponse* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline6)(id arg0, id arg1); +_ListenerTrampoline6 _wrapListenerBlock_1tjlcwl(_ListenerTrampoline6 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1)); + }; } -typedef void (^ListenerBlock10)(NSURLResponse* , NSData* , NSError* ); -ListenerBlock10 wrapListenerBlock_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError(ListenerBlock10 block) { - ListenerBlock10 wrapper = [^void(NSURLResponse* arg0, NSData* arg1, NSError* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline7)(void * arg0); +_ListenerTrampoline7 _wrapListenerBlock_hepzs(_ListenerTrampoline7 block) NS_RETURNS_RETAINED { + return ^void(void * arg0) { + objc_retainBlock(block); + block(arg0); + }; } -typedef void (^ListenerBlock11)(NSDictionary* ); -ListenerBlock11 wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary(ListenerBlock11 block) { - ListenerBlock11 wrapper = [^void(NSDictionary* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline8)(BOOL arg0); +_ListenerTrampoline8 _wrapListenerBlock_117qins(_ListenerTrampoline8 block) NS_RETURNS_RETAINED { + return ^void(BOOL arg0) { + objc_retainBlock(block); + block(arg0); + }; } -typedef void (^ListenerBlock12)(NSURLCredential* ); -ListenerBlock12 wrapListenerBlock_ObjCBlock_ffiVoid_NSURLCredential(ListenerBlock12 block) { - ListenerBlock12 wrapper = [^void(NSURLCredential* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline9)(id arg0, NSMatchingFlags arg1, BOOL * arg2); +_ListenerTrampoline9 _wrapListenerBlock_9w6y6n(_ListenerTrampoline9 block) NS_RETURNS_RETAINED { + return ^void(id arg0, NSMatchingFlags arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, arg2); + }; } -typedef void (^ListenerBlock13)(NSArray* , NSArray* , NSArray* ); -ListenerBlock13 wrapListenerBlock_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray(ListenerBlock13 block) { - ListenerBlock13 wrapper = [^void(NSArray* arg0, NSArray* arg1, NSArray* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline10)(id arg0, id arg1, id arg2); +_ListenerTrampoline10 _wrapListenerBlock_tenbla(_ListenerTrampoline10 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, id arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1), objc_retain(arg2)); + }; } -typedef void (^ListenerBlock14)(NSArray* ); -ListenerBlock14 wrapListenerBlock_ObjCBlock_ffiVoid_NSArray1(ListenerBlock14 block) { - ListenerBlock14 wrapper = [^void(NSArray* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock15)(NSData* ); -ListenerBlock15 wrapListenerBlock_ObjCBlock_ffiVoid_NSData(ListenerBlock15 block) { - ListenerBlock15 wrapper = [^void(NSData* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock16)(NSData* , BOOL , NSError* ); -ListenerBlock16 wrapListenerBlock_ObjCBlock_ffiVoid_NSData_bool_NSError(ListenerBlock16 block) { - ListenerBlock16 wrapper = [^void(NSData* arg0, BOOL arg1, NSError* arg2) { - block([arg0 retain], arg1, [arg2 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock17)(NSURLSessionWebSocketMessage* , NSError* ); -ListenerBlock17 wrapListenerBlock_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError(ListenerBlock17 block) { - ListenerBlock17 wrapper = [^void(NSURLSessionWebSocketMessage* arg0, NSError* arg1) { - block([arg0 retain], [arg1 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock18)(NSData* , NSURLResponse* , NSError* ); -ListenerBlock18 wrapListenerBlock_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError(ListenerBlock18 block) { - ListenerBlock18 wrapper = [^void(NSData* arg0, NSURLResponse* arg1, NSError* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock19)(NSURL* , NSURLResponse* , NSError* ); -ListenerBlock19 wrapListenerBlock_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError(ListenerBlock19 block) { - ListenerBlock19 wrapper = [^void(NSURL* arg0, NSURLResponse* arg1, NSError* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock20)(NSTask* ); -ListenerBlock20 wrapListenerBlock_ObjCBlock_ffiVoid_NSTask(ListenerBlock20 block) { - ListenerBlock20 wrapper = [^void(NSTask* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; -} +typedef void (^_ListenerTrampoline11)(id arg0, BOOL arg1, id arg2); +_ListenerTrampoline11 _wrapListenerBlock_hfhq9m(_ListenerTrampoline11 block) NS_RETURNS_RETAINED { + return ^void(id arg0, BOOL arg1, id arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, objc_retain(arg2)); + }; +} -typedef void (^ListenerBlock21)(BOOL , NSError* ); -ListenerBlock21 wrapListenerBlock_ObjCBlock_ffiVoid_bool_NSError(ListenerBlock21 block) { - ListenerBlock21 wrapper = [^void(BOOL arg0, NSError* arg1) { - block(arg0, [arg1 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline12)(BOOL arg0, id arg1); +_ListenerTrampoline12 _wrapListenerBlock_1ej8563(_ListenerTrampoline12 block) NS_RETURNS_RETAINED { + return ^void(BOOL arg0, id arg1) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1)); + }; } diff --git a/pkgs/ffigen/example/swift/swift_api_bindings.dart b/pkgs/ffigen/example/swift/swift_api_bindings.dart index e074966f0..aca53c506 100644 --- a/pkgs/ffigen/example/swift/swift_api_bindings.dart +++ b/pkgs/ffigen/example/swift/swift_api_bindings.dart @@ -9,107 +9,228 @@ // ignore_for_file: library_private_types_in_public_api // 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; import 'package:ffi/ffi.dart' as pkg_ffi; -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_ksby9f(ffi.Pointer block, + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ksby9f( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1k41wmu(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1k41wmu( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_sjfpmz(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_sjfpmz( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1j7ar3u(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1j7ar3u( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_rvgf02(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_rvgf02( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_ukcdfq(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ukcdfq( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1tjlcwl(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1tjlcwl( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_hepzs(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_hepzs( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_117qins(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_117qins( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_9w6y6n(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_9w6y6n( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_tenbla(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_tenbla( + ffi.Pointer block, ); -@ffi.Native Function(ffi.Pointer )>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_hfhq9m(ffi.Pointer block, +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_hfhq9m( + ffi.Pointer block, ); late final _class_NSProgress = objc.getClass("NSProgress"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -final _objc_msgSend_l8lotg = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_l8lotg = 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_currentProgress = objc.registerName("currentProgress"); -final _objc_msgSend_1unuoxw = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>(); -late final _sel_progressWithTotalUnitCount_ = objc.registerName("progressWithTotalUnitCount:"); -final _objc_msgSend_n9eq1n = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Int64 )>>().asFunction 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_105mybv = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Int64 , ffi.Pointer , ffi.Int64 )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer , int )>(); +final _objc_msgSend_1unuoxw = 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_n9eq1n = 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_105mybv = 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_iq11qg = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_becomeCurrentWithPendingUnitCount_ = objc.registerName("becomeCurrentWithPendingUnitCount:"); -final _objc_msgSend_rrr3q = objc.msgSendPointer.cast , ffi.Pointer , ffi.Int64 )>>().asFunction , ffi.Pointer , int )>(); -void _ObjCBlock_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ) => - block.ref.target.cast>() +late final _sel_initWithParent_userInfo_ = + objc.registerName("initWithParent:userInfo:"); +final _objc_msgSend_iq11qg = 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_becomeCurrentWithPendingUnitCount_ = + objc.registerName("becomeCurrentWithPendingUnitCount:"); +final _objc_msgSend_rrr3q = 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()(); -ffi.Pointer _ObjCBlock_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer )>(_ObjCBlock_ffiVoid_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_closureTrampoline(ffi.Pointer block, ) => +ffi.Pointer _ObjCBlock_ffiVoid_fnPtrCallable = ffi.Pointer + .fromFunction)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer block, +) => (objc.getBlockClosure(block) as void Function())(); -ffi.Pointer _ObjCBlock_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer )>(_ObjCBlock_ffiVoid_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_listenerTrampoline(ffi.Pointer block, ) { +ffi.Pointer _ObjCBlock_ffiVoid_closureCallable = ffi.Pointer + .fromFunction)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_listenerTrampoline( + ffi.Pointer block, +) { (objc.getBlockClosure(block) as void Function())(); objc.objectRelease(block.cast()); } -ffi.NativeCallable )> _ObjCBlock_ffiVoid_listenerCallable = ffi.NativeCallable )>.listener( - _ObjCBlock_ffiVoid_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable)> + _ObjCBlock_ffiVoid_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -117,8 +238,10 @@ abstract final class ObjCBlock_ffiVoid { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock fromFunction(void Function() fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_closureCallable, () => fn()), - retain: false, release: true); + objc.ObjCBlock( + objc.newClosureBlock(_ObjCBlock_ffiVoid_closureCallable, () => fn()), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -134,83 +257,247 @@ abstract final class ObjCBlock_ffiVoid { _ObjCBlock_ffiVoid_listenerCallable.nativeFunction.cast(), () => fn()); final wrapper = _wrapListenerBlock_ksby9f(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_CallExtension on objc.ObjCBlock { - void call() =>ref.pointer.ref.invoke.cast block)>>().asFunction )>()( - ref.pointer, ); -} - -late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); -final _objc_msgSend_19q84do = objc.msgSendPointer.cast , ffi.Pointer , ffi.Int64 , ffi.Pointer )>>().asFunction , ffi.Pointer , int , ffi.Pointer )>(); +extension ObjCBlock_ffiVoid_CallExtension + on objc.ObjCBlock { + void call() => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block)>>() + .asFunction)>()( + ref.pointer, + ); +} + +late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = + objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); +final _objc_msgSend_19q84do = 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_ksby9f = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_addChild_withPendingUnitCount_ = objc.registerName("addChild:withPendingUnitCount:"); -final _objc_msgSend_2citz1 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Int64 )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); +final _objc_msgSend_ksby9f = 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_2citz1 = 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_1voti03 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1voti03 = 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:"); late final _sel_completedUnitCount = objc.registerName("completedUnitCount"); -late final _sel_setCompletedUnitCount_ = objc.registerName("setCompletedUnitCount:"); -late final _sel_localizedDescription = objc.registerName("localizedDescription"); -late final _sel_setLocalizedDescription_ = objc.registerName("setLocalizedDescription:"); -final _objc_msgSend_ukcdfq = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -late final _sel_localizedAdditionalDescription = objc.registerName("localizedAdditionalDescription"); -late final _sel_setLocalizedAdditionalDescription_ = objc.registerName("setLocalizedAdditionalDescription:"); +late final _sel_setCompletedUnitCount_ = + objc.registerName("setCompletedUnitCount:"); +late final _sel_localizedDescription = + objc.registerName("localizedDescription"); +late final _sel_setLocalizedDescription_ = + objc.registerName("setLocalizedDescription:"); +final _objc_msgSend_ukcdfq = 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_olxnu1 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_olxnu1 = 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_117qins = objc.msgSendPointer.cast , ffi.Pointer , ffi.Bool )>>().asFunction , ffi.Pointer , bool )>(); +final _objc_msgSend_117qins = 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_2osec1 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>(); -late final _sel_setCancellationHandler_ = objc.registerName("setCancellationHandler:"); -void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_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); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline(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); +final _objc_msgSend_2osec1 = 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:"); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_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); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_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); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline( + 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); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. abstract final class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer)> fromFunction(void Function(objc.ObjCObjectBase , objc.ObjCObjectBase , ffi.Pointer ) fn) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(objc.ObjCObjectBase(arg0, retain: true, release: true), objc.ObjCObjectBase(arg1, retain: true, release: true), arg2)), - retain: false, release: true); + static objc + .ObjCBlock, ffi.Pointer, ffi.Pointer)> + fromFunction(void Function(objc.ObjCObjectBase, objc.ObjCObjectBase, ffi.Pointer) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + arg2)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -221,32 +508,102 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer)> listener(void Function(objc.ObjCObjectBase , objc.ObjCObjectBase , ffi.Pointer ) fn) { + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> listener( + void Function( + objc.ObjCObjectBase, objc.ObjCObjectBase, ffi.Pointer) + fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(objc.ObjCObjectBase(arg0, retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), arg2)); + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(objc.ObjCObjectBase(arg0, retain: false, release: true), + objc.ObjCObjectBase(arg1, retain: false, release: true), arg2)); final wrapper = _wrapListenerBlock_1k41wmu(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_CallExtension on objc.ObjCBlock, ffi.Pointer, ffi.Pointer)> { - void call(objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1, ffi.Pointer arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2); -} - -final _objc_msgSend_4daxhl = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +extension ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + void call(objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1, + ffi.Pointer arg2) => + ref.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)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2); +} + +final _objc_msgSend_4daxhl = 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_1tjlcwl = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); +late final _sel_setUserInfoObject_forKey_ = + objc.registerName("setUserInfoObject:forKey:"); +final _objc_msgSend_1tjlcwl = 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_10noklm = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -final _objc_msgSend_10noklmFpret = objc.msgSendFpretPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_10noklm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_10noklmFpret = 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"); @@ -254,322 +611,454 @@ late final _sel_resume = objc.registerName("resume"); late final _sel_userInfo = objc.registerName("userInfo"); late final _sel_kind = objc.registerName("kind"); late final _sel_setKind_ = objc.registerName("setKind:"); -late final _sel_estimatedTimeRemaining = objc.registerName("estimatedTimeRemaining"); -late final _sel_setEstimatedTimeRemaining_ = objc.registerName("setEstimatedTimeRemaining:"); +late final _sel_estimatedTimeRemaining = + objc.registerName("estimatedTimeRemaining"); +late final _sel_setEstimatedTimeRemaining_ = + objc.registerName("setEstimatedTimeRemaining:"); 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_setFileOperationKind_ = + objc.registerName("setFileOperationKind:"); late final _sel_fileURL = objc.registerName("fileURL"); late final _sel_setFileURL_ = objc.registerName("setFileURL:"); 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_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 Function(ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSProgress_closureTrampoline ).cast(); +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_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock? Function(NSProgress)>`. abstract final class ObjCBlock_ffiVoid_NSProgress { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock? Function(NSProgress)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock? Function(NSProgress)>(pointer, retain: retain, release: release); + static objc + .ObjCBlock? Function(NSProgress)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.ObjCBlock? Function( + 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. - static objc.ObjCBlock? Function(NSProgress)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock? Function(NSProgress)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSProgress_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc + .ObjCBlock? Function(NSProgress)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSProgress_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock? Function(NSProgress)> fromFunction(objc.ObjCBlock? Function(NSProgress ) fn) => - objc.ObjCBlock? Function(NSProgress)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSProgress_closureCallable, (ffi.Pointer arg0) => fn(NSProgress.castFromPointer(arg0, retain: true, release: true))?.ref.retainAndAutorelease() ?? ffi.nullptr), - retain: false, release: true); + static objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress)> fromFunction( + objc.ObjCBlock? Function(NSProgress) fn) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSProgress_closureCallable, + (ffi.Pointer arg0) => + fn(NSProgress.castFromPointer(arg0, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock? Function(NSProgress)>`. -extension ObjCBlock_ffiVoid_NSProgress_CallExtension on objc.ObjCBlock? Function(NSProgress)> { - objc.ObjCBlock? call(NSProgress arg0) =>ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction Function(ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer).address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction Function(ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer), retain: true, release: true); -} - -late final _sel_addSubscriberForFileURL_withPublishingHandler_ = objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); -final _objc_msgSend_1kkhn3j = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); +extension ObjCBlock_ffiVoid_NSProgress_CallExtension on objc + .ObjCBlock? Function(NSProgress)> { + objc.ObjCBlock? call(NSProgress arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0.ref.pointer) + .address == + 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer( + ref.pointer.ref.invoke + .cast Function(ffi.Pointer block, ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0.ref.pointer), + retain: true, + release: true); +} + +late final _sel_addSubscriberForFileURL_withPublishingHandler_ = + objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); +final _objc_msgSend_1kkhn3j = 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:"); 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{ -} + +final class _NSZone extends ffi.Opaque {} late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -final _objc_msgSend_1b3ihd0 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer<_NSZone> )>>().asFunction , ffi.Pointer , ffi.Pointer<_NSZone> )>(); +final _objc_msgSend_1b3ihd0 = 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_cqxsqq = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , 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_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc + .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); +final _objc_msgSend_cqxsqq = 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_juohf7 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_automaticallyNotifiesObserversForKey_ = objc.registerName("automaticallyNotifiesObserversForKey:"); -late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); -late final _sel_classFallbacksForKeyedArchiver = objc.registerName("classFallbacksForKeyedArchiver"); -late final _sel_classForKeyedUnarchiver = objc.registerName("classForKeyedUnarchiver"); +late final _sel_keyPathsForValuesAffectingValueForKey_ = + objc.registerName("keyPathsForValuesAffectingValueForKey:"); +final _objc_msgSend_juohf7 = 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:"); +late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = + objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); +late final _sel_classFallbacksForKeyedArchiver = + objc.registerName("classFallbacksForKeyedArchiver"); +late final _sel_classForKeyedUnarchiver = + objc.registerName("classForKeyedUnarchiver"); /// NSProgress class NSProgress extends objc.NSObject { NSProgress._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSProgress.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSProgress); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSProgress); } /// currentProgress static NSProgress? currentProgress() { final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_currentProgress); - return _ret.address == 0 ? null : NSProgress.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSProgress.castFromPointer(_ret, retain: true, release: true); } /// progressWithTotalUnitCount: static NSProgress progressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_n9eq1n(_class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); + final _ret = _objc_msgSend_n9eq1n( + _class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// discreteProgressWithTotalUnitCount: static NSProgress discreteProgressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_n9eq1n(_class_NSProgress, _sel_discreteProgressWithTotalUnitCount_, unitCount); + final _ret = _objc_msgSend_n9eq1n( + _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_105mybv(_class_NSProgress, _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, unitCount, parent.ref.pointer, portionOfParentTotalUnitCount); + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + int unitCount, NSProgress parent, int portionOfParentTotalUnitCount) { + final _ret = _objc_msgSend_105mybv( + _class_NSProgress, + _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, + unitCount, + parent.ref.pointer, + portionOfParentTotalUnitCount); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// initWithParent:userInfo: - NSProgress initWithParent_userInfo_(NSProgress? parentProgressOrNil, objc.ObjCObjectBase? userInfoOrNil) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithParent_userInfo_, parentProgressOrNil?.ref.pointer ?? ffi.nullptr, userInfoOrNil?.ref.pointer ?? ffi.nullptr); + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, objc.ObjCObjectBase? userInfoOrNil) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithParent_userInfo_, + parentProgressOrNil?.ref.pointer ?? ffi.nullptr, + userInfoOrNil?.ref.pointer ?? ffi.nullptr); return NSProgress.castFromPointer(_ret, retain: false, release: true); } /// becomeCurrentWithPendingUnitCount: void becomeCurrentWithPendingUnitCount_(int unitCount) { -_objc_msgSend_rrr3q(this.ref.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); - + _objc_msgSend_rrr3q( + this.ref.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); } /// performAsCurrentWithPendingUnitCount:usingBlock: - void performAsCurrentWithPendingUnitCount_usingBlock_(int unitCount, objc.ObjCBlock work) { -_objc_msgSend_19q84do(this.ref.pointer, _sel_performAsCurrentWithPendingUnitCount_usingBlock_, unitCount, work.ref.pointer); - + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, objc.ObjCBlock work) { + _objc_msgSend_19q84do( + this.ref.pointer, + _sel_performAsCurrentWithPendingUnitCount_usingBlock_, + unitCount, + work.ref.pointer); } /// resignCurrent void resignCurrent() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_resignCurrent); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resignCurrent); } /// addChild:withPendingUnitCount: void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { -_objc_msgSend_2citz1(this.ref.pointer, _sel_addChild_withPendingUnitCount_, child.ref.pointer, inUnitCount); - + _objc_msgSend_2citz1(this.ref.pointer, _sel_addChild_withPendingUnitCount_, + child.ref.pointer, inUnitCount); } /// totalUnitCount int get totalUnitCount { return _objc_msgSend_1voti03(this.ref.pointer, _sel_totalUnitCount); - } /// setTotalUnitCount: - set totalUnitCount(int value) { - return _objc_msgSend_rrr3q(this.ref.pointer, _sel_setTotalUnitCount_, value); - + set totalUnitCount(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setTotalUnitCount_, value); } /// completedUnitCount int get completedUnitCount { return _objc_msgSend_1voti03(this.ref.pointer, _sel_completedUnitCount); - } /// setCompletedUnitCount: - set completedUnitCount(int value) { - return _objc_msgSend_rrr3q(this.ref.pointer, _sel_setCompletedUnitCount_, value); - + set completedUnitCount(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCompletedUnitCount_, value); } /// localizedDescription objc.NSString get localizedDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedDescription); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedDescription); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setLocalizedDescription: - set localizedDescription(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDescription_, value.ref.pointer); - + set localizedDescription(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocalizedDescription_, value.ref.pointer); } /// localizedAdditionalDescription objc.NSString get localizedAdditionalDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedAdditionalDescription); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_localizedAdditionalDescription); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setLocalizedAdditionalDescription: - set localizedAdditionalDescription(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedAdditionalDescription_, value.ref.pointer); - + set localizedAdditionalDescription(objc.NSString value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setLocalizedAdditionalDescription_, value.ref.pointer); } /// isCancellable bool get cancellable { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancellable); - } /// setCancellable: - set cancellable(bool value) { + set cancellable(bool value) { return _objc_msgSend_117qins(this.ref.pointer, _sel_setCancellable_, value); - } /// isPausable bool get pausable { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPausable); - } /// setPausable: - set pausable(bool value) { + set pausable(bool value) { return _objc_msgSend_117qins(this.ref.pointer, _sel_setPausable_, value); - } /// isCancelled bool get cancelled { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); - } /// isPaused bool get paused { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPaused); - } /// cancellationHandler objc.ObjCBlock? get cancellationHandler { - final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_cancellationHandler); - return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_cancellationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setCancellationHandler: - set cancellationHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCancellationHandler_, value?.ref.pointer ?? ffi.nullptr); - + set cancellationHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCancellationHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// pausingHandler objc.ObjCBlock? get pausingHandler { final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_pausingHandler); - return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setPausingHandler: - set pausingHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setPausingHandler_, value?.ref.pointer ?? ffi.nullptr); - + set pausingHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setPausingHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// resumingHandler objc.ObjCBlock? get resumingHandler { final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_resumingHandler); - return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setResumingHandler: - set resumingHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setResumingHandler_, value?.ref.pointer ?? ffi.nullptr); - + set resumingHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setResumingHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// setUserInfoObject:forKey: - void setUserInfoObject_forKey_(objc.ObjCObjectBase? objectOrNil, objc.NSString key) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setUserInfoObject_forKey_, objectOrNil?.ref.pointer ?? ffi.nullptr, key.ref.pointer); - + void setUserInfoObject_forKey_( + objc.ObjCObjectBase? objectOrNil, objc.NSString key) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setUserInfoObject_forKey_, + objectOrNil?.ref.pointer ?? ffi.nullptr, key.ref.pointer); } /// isIndeterminate bool get indeterminate { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isIndeterminate); - } /// fractionCompleted double get fractionCompleted { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_fractionCompleted) : _objc_msgSend_10noklm(this.ref.pointer, _sel_fractionCompleted); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_fractionCompleted) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_fractionCompleted); } /// isFinished bool get finished { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); - } /// cancel void cancel() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } /// pause void pause() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_pause); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_pause); } /// resume void resume() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); } /// userInfo @@ -581,120 +1070,142 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); /// kind objc.NSString? get kind { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_kind); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setKind: - set kind(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setKind_, value?.ref.pointer ?? ffi.nullptr); - + set kind(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setKind_, value?.ref.pointer ?? ffi.nullptr); } /// estimatedTimeRemaining objc.NSNumber? get estimatedTimeRemaining { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_estimatedTimeRemaining); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_ukcdfq(this.ref.pointer, _sel_setEstimatedTimeRemaining_, value?.ref.pointer ?? ffi.nullptr); - + set estimatedTimeRemaining(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setEstimatedTimeRemaining_, value?.ref.pointer ?? ffi.nullptr); } /// throughput objc.NSNumber? get throughput { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_throughput); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setThroughput: - set throughput(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setThroughput_, value?.ref.pointer ?? ffi.nullptr); - + set throughput(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setThroughput_, + value?.ref.pointer ?? ffi.nullptr); } /// fileOperationKind objc.NSString? get fileOperationKind { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileOperationKind); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_ukcdfq(this.ref.pointer, _sel_setFileOperationKind_, value?.ref.pointer ?? ffi.nullptr); - + set fileOperationKind(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileOperationKind_, + value?.ref.pointer ?? ffi.nullptr); } /// fileURL objc.NSURL? get fileURL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setFileURL: - set fileURL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileURL_, value?.ref.pointer ?? ffi.nullptr); - + set fileURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFileURL_, value?.ref.pointer ?? ffi.nullptr); } /// fileTotalCount objc.NSNumber? get fileTotalCount { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileTotalCount); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setFileTotalCount: - set fileTotalCount(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileTotalCount_, value?.ref.pointer ?? ffi.nullptr); - + set fileTotalCount(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileTotalCount_, + value?.ref.pointer ?? ffi.nullptr); } /// fileCompletedCount objc.NSNumber? get fileCompletedCount { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileCompletedCount); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_ukcdfq(this.ref.pointer, _sel_setFileCompletedCount_, value?.ref.pointer ?? ffi.nullptr); - + set fileCompletedCount(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileCompletedCount_, + value?.ref.pointer ?? ffi.nullptr); } /// publish void publish() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); } /// unpublish void unpublish() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_unpublish); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_unpublish); } /// addSubscriberForFileURL:withPublishingHandler: - static objc.ObjCObjectBase addSubscriberForFileURL_withPublishingHandler_(objc.NSURL url, objc.ObjCBlock? Function(NSProgress)> publishingHandler) { - final _ret = _objc_msgSend_1kkhn3j(_class_NSProgress, _sel_addSubscriberForFileURL_withPublishingHandler_, url.ref.pointer, publishingHandler.ref.pointer); + static objc.ObjCObjectBase addSubscriberForFileURL_withPublishingHandler_( + objc.NSURL url, + objc.ObjCBlock? Function(NSProgress)> + publishingHandler) { + final _ret = _objc_msgSend_1kkhn3j( + _class_NSProgress, + _sel_addSubscriberForFileURL_withPublishingHandler_, + url.ref.pointer, + publishingHandler.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// removeSubscriber: static void removeSubscriber_(objc.ObjCObjectBase subscriber) { -_objc_msgSend_ukcdfq(_class_NSProgress, _sel_removeSubscriber_, subscriber.ref.pointer); - + _objc_msgSend_ukcdfq( + _class_NSProgress, _sel_removeSubscriber_, subscriber.ref.pointer); } /// isOld bool get old { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isOld); - } /// init NSProgress init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSProgress.castFromPointer(_ret, retain: false, release: true); } @@ -706,7 +1217,8 @@ _objc_msgSend_ukcdfq(_class_NSProgress, _sel_removeSubscriber_, subscriber.ref.p /// allocWithZone: static NSProgress allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSProgress, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSProgress, _sel_allocWithZone_, zone); return NSProgress.castFromPointer(_ret, retain: false, release: true); } @@ -717,56 +1229,70 @@ _objc_msgSend_ukcdfq(_class_NSProgress, _sel_removeSubscriber_, subscriber.ref.p } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSProgress, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSProgress, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSProgress, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSProgress, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSProgress, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSProgress, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSProgress, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSProgress, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSProgress, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSProgress, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSProgress, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSProgress, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSProgress, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSProgress, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSProgress, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } @@ -778,20 +1304,35 @@ late final _sel_initWithPath_ = objc.registerName("initWithPath:"); late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); late final _sel_initWithURL_ = objc.registerName("initWithURL:"); late final _sel_bundleForClass_ = objc.registerName("bundleForClass:"); -late final _sel_bundleWithIdentifier_ = objc.registerName("bundleWithIdentifier:"); +late final _sel_bundleWithIdentifier_ = + objc.registerName("bundleWithIdentifier:"); 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_1rk90ll = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer> )>(); +late final _sel_preflightAndReturnError_ = + objc.registerName("preflightAndReturnError:"); +final _objc_msgSend_1rk90ll = 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"); late final _sel_resourceURL = objc.registerName("resourceURL"); late final _sel_executableURL = objc.registerName("executableURL"); -late final _sel_URLForAuxiliaryExecutable_ = objc.registerName("URLForAuxiliaryExecutable:"); -late final _sel_privateFrameworksURL = objc.registerName("privateFrameworksURL"); +late final _sel_URLForAuxiliaryExecutable_ = + objc.registerName("URLForAuxiliaryExecutable:"); +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"); @@ -799,112 +1340,282 @@ 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:"); -late final _sel_privateFrameworksPath = objc.registerName("privateFrameworksPath"); -late final _sel_sharedFrameworksPath = objc.registerName("sharedFrameworksPath"); +late final _sel_pathForAuxiliaryExecutable_ = + objc.registerName("pathForAuxiliaryExecutable:"); +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_1qje3rk = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction 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_aud7dn = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_URLForResource_withExtension_ = objc.registerName("URLForResource:withExtension:"); -late final _sel_URLForResource_withExtension_subdirectory_ = objc.registerName("URLForResource:withExtension:subdirectory:"); -late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc.registerName("URLForResource:withExtension:subdirectory:localization:"); -late final _sel_URLsForResourcesWithExtension_subdirectory_ = objc.registerName("URLsForResourcesWithExtension:subdirectory:"); -late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc.registerName("URLsForResourcesWithExtension:subdirectory:localization:"); -late final _sel_pathForResource_ofType_inDirectory_ = objc.registerName("pathForResource:ofType:inDirectory:"); -late final _sel_pathsForResourcesOfType_inDirectory_ = objc.registerName("pathsForResourcesOfType:inDirectory:"); -late final _sel_pathForResource_ofType_ = objc.registerName("pathForResource:ofType:"); -late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = objc.registerName("pathForResource:ofType:inDirectory:forLocalization:"); -late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = objc.registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); -late final _sel_localizedStringForKey_value_table_ = objc.registerName("localizedStringForKey:value:table:"); +late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLForResource:withExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_1qje3rk = 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_aud7dn = 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:"); +late final _sel_URLForResource_withExtension_subdirectory_ = + objc.registerName("URLForResource:withExtension:subdirectory:"); +late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc + .registerName("URLForResource:withExtension:subdirectory:localization:"); +late final _sel_URLsForResourcesWithExtension_subdirectory_ = + objc.registerName("URLsForResourcesWithExtension:subdirectory:"); +late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc + .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); +late final _sel_pathForResource_ofType_inDirectory_ = + objc.registerName("pathForResource:ofType:inDirectory:"); +late final _sel_pathsForResourcesOfType_inDirectory_ = + objc.registerName("pathsForResourcesOfType:inDirectory:"); +late final _sel_pathForResource_ofType_ = + objc.registerName("pathForResource:ofType:"); +late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = + objc.registerName("pathForResource:ofType:inDirectory:forLocalization:"); +late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = + objc.registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); +late final _sel_localizedStringForKey_value_table_ = + objc.registerName("localizedStringForKey:value:table:"); late final _class_NSAttributedString = objc.getClass("NSAttributedString"); late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) => - block.ref.target.cast Function(ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1)>>() - .asFunction Function(ffi.Pointer , ffi.Pointer<_NSZone> )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer<_NSZone> )>(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer , ffi.Pointer<_NSZone> ))(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer<_NSZone> )>(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline ).cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSZone>)>( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer<_NSZone>))(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSZone>)>( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid_NSZone { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1)>> ptr) => - objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)>(objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer , ffi.Pointer<_NSZone> ) fn) => - objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)>(objc.newClosureBlock(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable, (ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) => fn(arg0, arg1).ref.retainAndReturnPointer()), - retain: false, release: true); + static objc + .ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer<_NSZone>) fn) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable, + (ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) => + fn(arg0, arg1).ref.retainAndReturnPointer()), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_NSZone_CallExtension on objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer<_NSZone>)> { - objc.ObjCObjectBase call(ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) =>objc.ObjCObjectBase(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer<_NSZone> )>()( - ref.pointer, arg0, arg1), retain: false, release: true); -} - -late final _sel_mutableCopyWithZone_ = objc.registerName("mutableCopyWithZone:"); +extension ObjCBlock_objcObjCObject_ffiVoid_NSZone_CallExtension + on objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer<_NSZone>)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, ffi.Pointer<_NSZone> arg1) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer<_NSZone> arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSZone>)>()(ref.pointer, arg0, arg1), + retain: false, + release: true); +} + +late final _sel_mutableCopyWithZone_ = + objc.registerName("mutableCopyWithZone:"); late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); -void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_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); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock, objc.NSCoder)>`. abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, objc.NSCoder)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock, objc.NSCoder)>(pointer, retain: retain, release: release); + static objc.ObjCBlock, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + objc.NSCoder)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, objc.NSCoder)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock, objc.NSCoder)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock, objc.NSCoder)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, objc.NSCoder)> fromFunction(void Function(ffi.Pointer , objc.NSCoder ) fn) => - objc.ObjCBlock, objc.NSCoder)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock, objc.NSCoder)> + fromFunction(void Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + objc.NSCoder.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -915,181 +1626,447 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock, objc.NSCoder)> listener(void Function(ffi.Pointer , objc.NSCoder ) fn) { + static objc.ObjCBlock, objc.NSCoder)> + listener(void Function(ffi.Pointer, objc.NSCoder) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: false, release: true))); + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + objc.NSCoder.castFromPointer(arg1, retain: false, release: true))); final wrapper = _wrapListenerBlock_sjfpmz(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock, objc.NSCoder)>(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSCoder)>(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock, objc.NSCoder)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension on objc.ObjCBlock, objc.NSCoder)> { - void call(ffi.Pointer arg0, objc.NSCoder arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1.ref.pointer); +extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock, objc.NSCoder)> { + void call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .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)>()( + ref.pointer, arg0, arg1.ref.pointer); } late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); -instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline ).cast(); -instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as instancetype Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline ).cast(); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as instancetype Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, + objc.NSCoder)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>(objc.newPointerBlock(_ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)>( + objc.newPointerBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> fromFunction(Dartinstancetype? Function(ffi.Pointer , objc.NSCoder ) fn) => - objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>(objc.newClosureBlock(_ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: true, release: true))?.ref.retainAndReturnPointer() ?? ffi.nullptr), - retain: false, release: true); + static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> fromFunction( + Dartinstancetype? Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndReturnPointer() ?? + ffi.nullptr), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. -extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension on objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> { - Dartinstancetype? call(ffi.Pointer arg0, objc.NSCoder arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1.ref.pointer).address == 0 ? null : objc.ObjCObjectBase(ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1.ref.pointer), retain: false, release: true); -} - -late final _sel_supportsSecureCoding = objc.registerName("supportsSecureCoding"); -bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_bool_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_fnPtrTrampoline , false).cast(); -bool _ObjCBlock_bool_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as bool Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_bool_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_closureTrampoline , false).cast(); +extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> { + Dartinstancetype? call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0, arg1.ref.pointer) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer), + retain: false, + release: true); +} + +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); +bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_closureTrampoline, false) + .cast(); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_bool_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(bool Function(ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0)), - retain: false, release: true); + static objc.ObjCBlock)> fromFunction( + bool Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_bool_ffiVoid_CallExtension on objc.ObjCBlock)> { - bool call(ffi.Pointer arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0); +extension ObjCBlock_bool_ffiVoid_CallExtension + on objc.ObjCBlock)> { + bool call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } late final _sel_string = objc.registerName("string"); -late final _sel_attributesAtIndex_effectiveRange_ = objc.registerName("attributesAtIndex:effectiveRange:"); -final _objc_msgSend_1lz7qql = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); +late final _sel_attributesAtIndex_effectiveRange_ = + objc.registerName("attributesAtIndex:effectiveRange:"); +final _objc_msgSend_1lz7qql = 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_length = objc.registerName("length"); -final _objc_msgSend_eldhrq = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_attribute_atIndex_effectiveRange_ = objc.registerName("attribute:atIndex:effectiveRange:"); -final _objc_msgSend_6erk1e = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_attributedSubstringFromRange_ = objc.registerName("attributedSubstringFromRange:"); -final _objc_msgSend_176f8tz = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , objc.NSRange )>>().asFunction Function(ffi.Pointer , ffi.Pointer , objc.NSRange )>(); -late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); -final _objc_msgSend_7mxs62 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , objc.NSRange )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer , objc.NSRange )>(); -late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); -final _objc_msgSend_1hy2clh = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , objc.NSRange )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer , objc.NSRange )>(); -late final _sel_isEqualToAttributedString_ = objc.registerName("isEqualToAttributedString:"); +final _objc_msgSend_eldhrq = 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_6erk1e = 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_attributedSubstringFromRange_ = + objc.registerName("attributedSubstringFromRange:"); +final _objc_msgSend_176f8tz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>(); +late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = + objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_7mxs62 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = + objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_1hy2clh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_isEqualToAttributedString_ = + objc.registerName("isEqualToAttributedString:"); late final _sel_initWithString_ = objc.registerName("initWithString:"); -late final _sel_initWithString_attributes_ = objc.registerName("initWithString:attributes:"); -late final _sel_initWithAttributedString_ = objc.registerName("initWithAttributedString:"); +late final _sel_initWithString_attributes_ = + objc.registerName("initWithString:attributes:"); +late final _sel_initWithAttributedString_ = + objc.registerName("initWithAttributedString:"); + 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, objc.NSRange arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, objc.NSRange arg1, ffi.Pointer arg2)>>() - .asFunction , objc.NSRange , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer , objc.NSRange , ffi.Pointer ))(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , objc.NSRange , ffi.Pointer ))(arg0, arg1, arg2); + 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, + objc.NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + objc.NSRange arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, objc.NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , objc.NSRange , ffi.Pointer )> _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerCallable = ffi.NativeCallable , ffi.Pointer , objc.NSRange , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc + .ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(void Function(objc.NSDictionary , objc.NSRange , ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureCallable, (ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) => fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)), - retain: false, release: true); + static objc.ObjCBlock< + ffi.Void Function(objc.NSDictionary, objc.NSRange, ffi.Pointer)> + fromFunction(void Function(objc.NSDictionary, objc.NSRange, ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureCallable, + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -1100,63 +2077,181 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock)> listener(void Function(objc.NSDictionary , objc.NSRange , ffi.Pointer ) fn) { + static objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> listener( + void Function(objc.NSDictionary, objc.NSRange, ffi.Pointer) + fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) => fn(objc.NSDictionary.castFromPointer(arg0, retain: false, release: true), arg1, arg2)); + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn( + objc.NSDictionary.castFromPointer(arg0, + retain: false, release: true), + arg1, + arg2)); final wrapper = _wrapListenerBlock_1j7ar3u(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(objc.NSDictionary, objc.NSRange, + ffi.Pointer)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_CallExtension on objc.ObjCBlock)> { - void call(objc.NSDictionary arg0, objc.NSRange arg1, ffi.Pointer arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , objc.NSRange , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer, arg1, arg2); -} - -late final _sel_enumerateAttributesInRange_options_usingBlock_ = objc.registerName("enumerateAttributesInRange:options:usingBlock:"); -final _objc_msgSend_1g4s41q = objc.msgSendPointer.cast , ffi.Pointer , objc.NSRange , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , objc.NSRange , int , ffi.Pointer )>(); -void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, objc.NSRange arg1, ffi.Pointer arg2)>>() - .asFunction , objc.NSRange , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer )>(_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer , objc.NSRange , ffi.Pointer ))(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer )>(_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , objc.NSRange , ffi.Pointer ))(arg0, arg1, arg2); +extension ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> { + void call(objc.NSDictionary arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1, arg2); +} + +late final _sel_enumerateAttributesInRange_options_usingBlock_ = + objc.registerName("enumerateAttributesInRange:options:usingBlock:"); +final _objc_msgSend_1g4s41q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + objc.NSRange arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, objc.NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + objc.NSRange, ffi.Pointer))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , objc.NSRange , ffi.Pointer )> _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerCallable = ffi.NativeCallable , ffi.Pointer , objc.NSRange , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange, ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>`. abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock?, objc.NSRange, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock?, objc.NSRange, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc + .ObjCBlock?, objc.NSRange, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock?, objc.NSRange, ffi.Pointer)> fromFunction(void Function(objc.ObjCObjectBase? , objc.NSRange , ffi.Pointer ) fn) => - objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureCallable, (ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: true, release: true), arg1, arg2)), - retain: false, release: true); + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, ffi.Pointer)> + fromFunction(void Function(objc.ObjCObjectBase?, objc.NSRange, ffi.Pointer) fn) => + objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureCallable, + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: true, release: true), arg1, arg2)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -1167,113 +2262,256 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock?, objc.NSRange, ffi.Pointer)> listener(void Function(objc.ObjCObjectBase? , objc.NSRange , ffi.Pointer ) fn) { + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> listener( + void Function(objc.ObjCObjectBase?, objc.NSRange, ffi.Pointer) + fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), arg1, arg2)); + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: false, release: true), + arg1, + arg2)); final wrapper = _wrapListenerBlock_1j7ar3u(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock?, objc.NSRange, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_CallExtension on objc.ObjCBlock?, objc.NSRange, ffi.Pointer)> { - void call(objc.ObjCObjectBase? arg0, objc.NSRange arg1, ffi.Pointer arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, objc.NSRange arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , objc.NSRange , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1, arg2); -} +extension ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> { + void call(objc.ObjCObjectBase? arg0, objc.NSRange arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + objc.NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateAttribute_inRange_options_usingBlock_ = + objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); +final _objc_msgSend_o0ok8d = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + int, + ffi.Pointer)>(); +late final _class_NSAttributedStringMarkdownParsingOptions = + objc.getClass("NSAttributedStringMarkdownParsingOptions"); +late final _sel_allowsExtendedAttributes = + objc.registerName("allowsExtendedAttributes"); +late final _sel_setAllowsExtendedAttributes_ = + objc.registerName("setAllowsExtendedAttributes:"); -late final _sel_enumerateAttribute_inRange_options_usingBlock_ = objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); -final _objc_msgSend_o0ok8d = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , objc.NSRange , int , ffi.Pointer )>(); -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"), - }; - + 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_1pa46zt = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setInterpretedSyntax_ = objc.registerName("setInterpretedSyntax:"); -final _objc_msgSend_1fjzvvc = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_1pa46zt = 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_1fjzvvc = 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"), - }; - + 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_gdi6fo = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_gdi6fo = 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_9ynxkb = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_9ynxkb = 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_appliesSourcePositionAttributes = + objc.registerName("appliesSourcePositionAttributes"); +late final _sel_setAppliesSourcePositionAttributes_ = + objc.registerName("setAppliesSourcePositionAttributes:"); late final _sel_self = objc.registerName("self"); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast Function(ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer )>()(arg0); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline ).cast(); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_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_objcObjCObject_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock Function(ffi.Pointer)>(pointer, retain: retain, release: release); + static objc + .ObjCBlock Function(ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock Function(ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer ) fn) => - objc.ObjCBlock Function(ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_objcObjCObject_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0).ref.retainAndAutorelease()), - retain: false, release: true); + static objc + .ObjCBlock Function(ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc.ObjCBlock Function(ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0) =>objc.ObjCObjectBase(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction Function(ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0), retain: true, release: true); +extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc + .ObjCBlock Function(ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); } late final _sel_retain = objc.registerName("retain"); @@ -1281,53 +2519,60 @@ late final _sel_autorelease = objc.registerName("autorelease"); /// NSAttributedStringMarkdownParsingOptions class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { - NSAttributedStringMarkdownParsingOptions._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + 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.ref.pointer, retain: true, release: true); + NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + 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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSAttributedStringMarkdownParsingOptions); + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSAttributedStringMarkdownParsingOptions); } /// init NSAttributedStringMarkdownParsingOptions init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } /// allowsExtendedAttributes bool get allowsExtendedAttributes { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsExtendedAttributes); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExtendedAttributes); } /// setAllowsExtendedAttributes: - set allowsExtendedAttributes(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsExtendedAttributes_, value); - + set allowsExtendedAttributes(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExtendedAttributes_, value); } /// interpretedSyntax NSAttributedStringMarkdownInterpretedSyntax get interpretedSyntax { - final _ret = _objc_msgSend_1pa46zt(this.ref.pointer, _sel_interpretedSyntax); + final _ret = + _objc_msgSend_1pa46zt(this.ref.pointer, _sel_interpretedSyntax); return NSAttributedStringMarkdownInterpretedSyntax.fromValue(_ret); } /// setInterpretedSyntax: - set interpretedSyntax(NSAttributedStringMarkdownInterpretedSyntax value) { - return _objc_msgSend_1fjzvvc(this.ref.pointer, _sel_setInterpretedSyntax_, value.value); - + set interpretedSyntax(NSAttributedStringMarkdownInterpretedSyntax value) { + return _objc_msgSend_1fjzvvc( + this.ref.pointer, _sel_setInterpretedSyntax_, value.value); } /// failurePolicy @@ -1337,176 +2582,283 @@ class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { } /// setFailurePolicy: - set failurePolicy(NSAttributedStringMarkdownParsingFailurePolicy value) { - return _objc_msgSend_9ynxkb(this.ref.pointer, _sel_setFailurePolicy_, value.value); - + set failurePolicy(NSAttributedStringMarkdownParsingFailurePolicy value) { + return _objc_msgSend_9ynxkb( + this.ref.pointer, _sel_setFailurePolicy_, value.value); } /// languageCode objc.NSString? get languageCode { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_languageCode); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setLanguageCode: - set languageCode(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLanguageCode_, value?.ref.pointer ?? ffi.nullptr); - + set languageCode(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLanguageCode_, + value?.ref.pointer ?? ffi.nullptr); } /// appliesSourcePositionAttributes bool get appliesSourcePositionAttributes { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_appliesSourcePositionAttributes); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_appliesSourcePositionAttributes); } /// setAppliesSourcePositionAttributes: - set appliesSourcePositionAttributes(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAppliesSourcePositionAttributes_, value); - + set appliesSourcePositionAttributes(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAppliesSourcePositionAttributes_, value); } /// new static NSAttributedStringMarkdownParsingOptions new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedStringMarkdownParsingOptions, _sel_new); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedStringMarkdownParsingOptions, _sel_new); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: - static NSAttributedStringMarkdownParsingOptions allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSAttributedStringMarkdownParsingOptions, _sel_allocWithZone_, zone); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: false, release: true); + static NSAttributedStringMarkdownParsingOptions allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_allocWithZone_, + zone); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSAttributedStringMarkdownParsingOptions alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1unuoxw( + _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_cqxsqq(_class_NSAttributedStringMarkdownParsingOptions, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSAttributedStringMarkdownParsingOptions, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSAttributedStringMarkdownParsingOptions, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1(_class_NSAttributedStringMarkdownParsingOptions, + _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSAttributedStringMarkdownParsingOptions, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1(_class_NSAttributedStringMarkdownParsingOptions, + _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSAttributedStringMarkdownParsingOptions, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_keyPathsForValuesAffectingValueForKey_, + key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSAttributedStringMarkdownParsingOptions, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSAttributedStringMarkdownParsingOptions, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSAttributedStringMarkdownParsingOptions, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedStringMarkdownParsingOptions, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedStringMarkdownParsingOptions, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSAttributedStringMarkdownParsingOptions self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: true, release: true); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); } /// retain NSAttributedStringMarkdownParsingOptions retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: true, release: true); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSAttributedStringMarkdownParsingOptions autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, retain: true, release: true); - } -} + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = + objc.registerName( + "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); +final _objc_msgSend_w9wiqt = 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:"); +late final _sel_initWithMarkdownString_options_baseURL_error_ = + objc.registerName("initWithMarkdownString:options:baseURL:error:"); -late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = objc.registerName("initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); -final _objc_msgSend_w9wiqt = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_initWithMarkdown_options_baseURL_error_ = objc.registerName("initWithMarkdown:options:baseURL:error:"); -late final _sel_initWithMarkdownString_options_baseURL_error_ = objc.registerName("initWithMarkdownString:options:baseURL:error:"); 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_4x8h9q = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_localizedAttributedStringWithFormat_ = objc.registerName("localizedAttributedStringWithFormat:"); -late final _sel_localizedAttributedStringWithFormat_options_ = objc.registerName("localizedAttributedStringWithFormat:options:"); -final _objc_msgSend_1vfncet = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_initWithFormat_options_locale_context_ = objc.registerName("initWithFormat:options:locale:context:"); -final _objc_msgSend_xvcwe5 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer )>(); -late final _sel_localizedAttributedStringWithFormat_context_ = objc.registerName("localizedAttributedStringWithFormat:context:"); -late final _sel_localizedAttributedStringWithFormat_options_context_ = objc.registerName("localizedAttributedStringWithFormat:options:context:"); -late final _sel_attributedStringByInflectingString = objc.registerName("attributedStringByInflectingString"); + 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_4x8h9q = 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_localizedAttributedStringWithFormat_ = + objc.registerName("localizedAttributedStringWithFormat:"); +late final _sel_localizedAttributedStringWithFormat_options_ = + objc.registerName("localizedAttributedStringWithFormat:options:"); +final _objc_msgSend_1vfncet = 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_xvcwe5 = 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_context_ = + objc.registerName("localizedAttributedStringWithFormat:context:"); +late final _sel_localizedAttributedStringWithFormat_options_context_ = + objc.registerName("localizedAttributedStringWithFormat:options:context:"); +late final _sel_attributedStringByInflectingString = + objc.registerName("attributedStringByInflectingString"); /// NSAttributedString class NSAttributedString extends objc.NSObject { NSAttributedString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSAttributedString); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSAttributedString); } /// string @@ -1516,290 +2868,505 @@ class NSAttributedString extends objc.NSObject { } /// attributesAtIndex:effectiveRange: - objc.NSDictionary attributesAtIndex_effectiveRange_(int location, ffi.Pointer range) { - final _ret = _objc_msgSend_1lz7qql(this.ref.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); + objc.NSDictionary attributesAtIndex_effectiveRange_( + int location, ffi.Pointer range) { + final _ret = _objc_msgSend_1lz7qql(this.ref.pointer, + _sel_attributesAtIndex_effectiveRange_, location, range); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// length int get length { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_length); - } /// attribute:atIndex:effectiveRange: - objc.ObjCObjectBase? attribute_atIndex_effectiveRange_(objc.NSString attrName, int location, ffi.Pointer range) { - final _ret = _objc_msgSend_6erk1e(this.ref.pointer, _sel_attribute_atIndex_effectiveRange_, attrName.ref.pointer, location, range); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + objc.ObjCObjectBase? attribute_atIndex_effectiveRange_( + objc.NSString attrName, int location, ffi.Pointer range) { + final _ret = _objc_msgSend_6erk1e( + this.ref.pointer, + _sel_attribute_atIndex_effectiveRange_, + attrName.ref.pointer, + location, + range); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributedSubstringFromRange: NSAttributedString attributedSubstringFromRange_(objc.NSRange range) { - final _ret = _objc_msgSend_176f8tz(this.ref.pointer, _sel_attributedSubstringFromRange_, range); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_176f8tz( + this.ref.pointer, _sel_attributedSubstringFromRange_, range); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// attributesAtIndex:longestEffectiveRange:inRange: - objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_(int location, ffi.Pointer range, objc.NSRange rangeLimit) { - final _ret = _objc_msgSend_7mxs62(this.ref.pointer, _sel_attributesAtIndex_longestEffectiveRange_inRange_, location, range, rangeLimit); + objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( + int location, ffi.Pointer range, objc.NSRange rangeLimit) { + final _ret = _objc_msgSend_7mxs62( + this.ref.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 range, objc.NSRange rangeLimit) { - final _ret = _objc_msgSend_1hy2clh(this.ref.pointer, _sel_attribute_atIndex_longestEffectiveRange_inRange_, attrName.ref.pointer, location, range, rangeLimit); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + objc.ObjCObjectBase? attribute_atIndex_longestEffectiveRange_inRange_( + objc.NSString attrName, + int location, + ffi.Pointer range, + objc.NSRange rangeLimit) { + final _ret = _objc_msgSend_1hy2clh( + this.ref.pointer, + _sel_attribute_atIndex_longestEffectiveRange_inRange_, + attrName.ref.pointer, + location, + range, + rangeLimit); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// isEqualToAttributedString: bool isEqualToAttributedString_(NSAttributedString other) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isEqualToAttributedString_, other.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqualToAttributedString_, other.ref.pointer); } /// initWithString: NSAttributedString initWithString_(objc.NSString str) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithString_, str.ref.pointer); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, str.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// initWithString:attributes: - NSAttributedString initWithString_attributes_(objc.NSString str, objc.NSDictionary? attrs) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithString_attributes_, str.ref.pointer, attrs?.ref.pointer ?? ffi.nullptr); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + NSAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithString_attributes_, + str.ref.pointer, + attrs?.ref.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// initWithAttributedString: NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithAttributedString_, attrStr.ref.pointer); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithAttributedString_, attrStr.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// enumerateAttributesInRange:options:usingBlock: - void enumerateAttributesInRange_options_usingBlock_(objc.NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, objc.ObjCBlock)> block) { -_objc_msgSend_1g4s41q(this.ref.pointer, _sel_enumerateAttributesInRange_options_usingBlock_, enumerationRange, opts.value, block.ref.pointer); - + void enumerateAttributesInRange_options_usingBlock_( + objc.NSRange enumerationRange, + NSAttributedStringEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function( + objc.NSDictionary, objc.NSRange, ffi.Pointer)> + block) { + _objc_msgSend_1g4s41q( + this.ref.pointer, + _sel_enumerateAttributesInRange_options_usingBlock_, + enumerationRange, + opts.value, + block.ref.pointer); } /// enumerateAttribute:inRange:options:usingBlock: - void enumerateAttribute_inRange_options_usingBlock_(objc.NSString attrName, objc.NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, objc.ObjCBlock?, objc.NSRange, ffi.Pointer)> block) { -_objc_msgSend_o0ok8d(this.ref.pointer, _sel_enumerateAttribute_inRange_options_usingBlock_, attrName.ref.pointer, enumerationRange, opts.value, block.ref.pointer); - + void enumerateAttribute_inRange_options_usingBlock_( + objc.NSString attrName, + objc.NSRange enumerationRange, + NSAttributedStringEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSRange, + ffi.Pointer)> + block) { + _objc_msgSend_o0ok8d( + this.ref.pointer, + _sel_enumerateAttribute_inRange_options_usingBlock_, + attrName.ref.pointer, + enumerationRange, + opts.value, + block.ref.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_w9wiqt(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, markdownFile.ref.pointer, options?.ref.pointer ?? ffi.nullptr, baseURL?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: false, release: true); + NSAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, + retain: false, 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_w9wiqt(this.ref.retainAndReturnPointer(), _sel_initWithMarkdown_options_baseURL_error_, markdown.ref.pointer, options?.ref.pointer ?? ffi.nullptr, baseURL?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: false, release: true); + NSAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdown_options_baseURL_error_, + markdown.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, + retain: false, 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_w9wiqt(this.ref.retainAndReturnPointer(), _sel_initWithMarkdownString_options_baseURL_error_, markdownString.ref.pointer, options?.ref.pointer ?? ffi.nullptr, baseURL?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: false, release: true); + NSAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// initWithFormat:options:locale: - NSAttributedString initWithFormat_options_locale_(NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale) { - final _ret = _objc_msgSend_4x8h9q(this.ref.retainAndReturnPointer(), _sel_initWithFormat_options_locale_, format.ref.pointer, options.value, locale?.ref.pointer ?? ffi.nullptr); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + NSAttributedString initWithFormat_options_locale_(NSAttributedString format, + NSAttributedStringFormattingOptions options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_4x8h9q( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// localizedAttributedStringWithFormat: - static NSAttributedString localizedAttributedStringWithFormat_(NSAttributedString format) { - final _ret = _objc_msgSend_juohf7(_class_NSAttributedString, _sel_localizedAttributedStringWithFormat_, format.ref.pointer); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_juohf7(_class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_, format.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// localizedAttributedStringWithFormat:options: - static NSAttributedString localizedAttributedStringWithFormat_options_(NSAttributedString format, NSAttributedStringFormattingOptions options) { - final _ret = _objc_msgSend_1vfncet(_class_NSAttributedString, _sel_localizedAttributedStringWithFormat_options_, format.ref.pointer, options.value); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, NSAttributedStringFormattingOptions options) { + final _ret = _objc_msgSend_1vfncet( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.ref.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_xvcwe5(this.ref.retainAndReturnPointer(), _sel_initWithFormat_options_locale_context_, format.ref.pointer, options.value, locale?.ref.pointer ?? ffi.nullptr, context.ref.pointer); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + NSAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_xvcwe5( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_context_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr, + context.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// localizedAttributedStringWithFormat:context: - static NSAttributedString localizedAttributedStringWithFormat_context_(NSAttributedString format, objc.NSDictionary context) { - final _ret = _objc_msgSend_iq11qg(_class_NSAttributedString, _sel_localizedAttributedStringWithFormat_context_, format.ref.pointer, context.ref.pointer); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_iq11qg( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.ref.pointer, + context.ref.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_4x8h9q(_class_NSAttributedString, _sel_localizedAttributedStringWithFormat_options_context_, format.ref.pointer, options.value, context.ref.pointer); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSDictionary context) { + final _ret = _objc_msgSend_4x8h9q( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.ref.pointer, + options.value, + context.ref.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// attributedStringByInflectingString NSAttributedString attributedStringByInflectingString() { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringByInflectingString); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_attributedStringByInflectingString); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// init NSAttributedString init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// new static NSAttributedString new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedString, _sel_new); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSAttributedString, _sel_allocWithZone_, zone); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSAttributedString, _sel_allocWithZone_, zone); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSAttributedString alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedString, _sel_alloc); - return NSAttributedString.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSAttributedString, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSAttributedString, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSAttributedString, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSAttributedString, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSAttributedString, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSAttributedString, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAttributedString, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAttributedString, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSAttributedString self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// retain NSAttributedString retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSAttributedString autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSAttributedString, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSAttributedString, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSAttributedString? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } } -late final _sel_localizedAttributedStringForKey_value_table_ = objc.registerName("localizedAttributedStringForKey:value:table:"); +late final _sel_localizedAttributedStringForKey_value_table_ = + objc.registerName("localizedAttributedStringForKey:value:table:"); late final _sel_bundleIdentifier = objc.registerName("bundleIdentifier"); late final _sel_infoDictionary = objc.registerName("infoDictionary"); -late final _sel_localizedInfoDictionary = objc.registerName("localizedInfoDictionary"); -late final _sel_objectForInfoDictionaryKey_ = objc.registerName("objectForInfoDictionaryKey:"); +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"); -late final _sel_preferredLocalizations = objc.registerName("preferredLocalizations"); +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:"); -late final _sel_preferredLocalizationsFromArray_forPreferences_ = objc.registerName("preferredLocalizationsFromArray:forPreferences:"); -late final _sel_executableArchitectures = objc.registerName("executableArchitectures"); -late final _sel_setPreservationPriority_forTags_ = objc.registerName("setPreservationPriority:forTags:"); -final _objc_msgSend_13ndgwe = objc.msgSendPointer.cast , ffi.Pointer , ffi.Double , ffi.Pointer )>>().asFunction , ffi.Pointer , double , ffi.Pointer )>(); -late final _sel_preservationPriorityForTag_ = objc.registerName("preservationPriorityForTag:"); -final _objc_msgSend_om71r5 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -final _objc_msgSend_om71r5Fpret = objc.msgSendFpretPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +late final _sel_developmentLocalization = + objc.registerName("developmentLocalization"); +late final _sel_preferredLocalizationsFromArray_ = + objc.registerName("preferredLocalizationsFromArray:"); +late final _sel_preferredLocalizationsFromArray_forPreferences_ = + objc.registerName("preferredLocalizationsFromArray:forPreferences:"); +late final _sel_executableArchitectures = + objc.registerName("executableArchitectures"); +late final _sel_setPreservationPriority_forTags_ = + objc.registerName("setPreservationPriority:forTags:"); +final _objc_msgSend_13ndgwe = 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_om71r5 = 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_om71r5Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); /// NSBundle class NSBundle extends objc.NSObject { NSBundle._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSBundle.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSBundle); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSBundle); } /// mainBundle @@ -1810,38 +3377,54 @@ class NSBundle extends objc.NSObject { /// bundleWithPath: static NSBundle? bundleWithPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(_class_NSBundle, _sel_bundleWithPath_, path.ref.pointer); - return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleWithPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// initWithPath: NSBundle? initWithPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithPath_, path.ref.pointer); - return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: false, release: true); } /// bundleWithURL: static NSBundle? bundleWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7(_class_NSBundle, _sel_bundleWithURL_, url.ref.pointer); - return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleWithURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// initWithURL: NSBundle? initWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithURL_, url.ref.pointer); - return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: false, release: true); } /// bundleForClass: static NSBundle bundleForClass_(objc.ObjCObjectBase aClass) { - final _ret = _objc_msgSend_juohf7(_class_NSBundle, _sel_bundleForClass_, aClass.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleForClass_, aClass.ref.pointer); return NSBundle.castFromPointer(_ret, retain: true, release: true); } /// bundleWithIdentifier: static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { - final _ret = _objc_msgSend_juohf7(_class_NSBundle, _sel_bundleWithIdentifier_, identifier.ref.pointer); - return _ret.address == 0 ? null : NSBundle.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSBundle, _sel_bundleWithIdentifier_, identifier.ref.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } /// allBundles @@ -1859,31 +3442,29 @@ class NSBundle extends objc.NSObject { /// load bool load() { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_load); - } /// isLoaded bool get loaded { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLoaded); - } /// unload bool unload() { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_unload); - } /// preflightAndReturnError: - bool preflightAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_1rk90ll(this.ref.pointer, _sel_preflightAndReturnError_, error); - + bool preflightAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_preflightAndReturnError_, error); } /// loadAndReturnError: bool loadAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_1rk90ll(this.ref.pointer, _sel_loadAndReturnError_, error); - + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_loadAndReturnError_, error); } /// bundleURL @@ -1895,49 +3476,70 @@ class NSBundle extends objc.NSObject { /// resourceURL objc.NSURL? get resourceURL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_resourceURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// executableURL objc.NSURL? get executableURL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executableURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// URLForAuxiliaryExecutable: objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_URLForAuxiliaryExecutable_, executableName.ref.pointer); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_URLForAuxiliaryExecutable_, executableName.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// privateFrameworksURL objc.NSURL? get privateFrameworksURL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_privateFrameworksURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_sharedFrameworksURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_sharedSupportURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// builtInPlugInsURL objc.NSURL? get builtInPlugInsURL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_builtInPlugInsURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_appStoreReceiptURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_appStoreReceiptURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// bundlePath @@ -1949,168 +3551,321 @@ class NSBundle extends objc.NSObject { /// resourcePath objc.NSString? get resourcePath { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_resourcePath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// executablePath objc.NSString? get executablePath { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executablePath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// pathForAuxiliaryExecutable: objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_pathForAuxiliaryExecutable_, executableName.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_pathForAuxiliaryExecutable_, executableName.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// privateFrameworksPath objc.NSString? get privateFrameworksPath { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_privateFrameworksPath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_sharedFrameworksPath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_sharedSupportPath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_builtInPlugInsPath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1qje3rk(_class_NSBundle, _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_, name?.ref.pointer ?? ffi.nullptr, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr, bundleURL.ref.pointer); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + static objc.NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSURL bundleURL) { + final _ret = _objc_msgSend_1qje3rk( + _class_NSBundle, + _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + bundleURL.ref.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_aud7dn(_class_NSBundle, _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr, bundleURL.ref.pointer); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + static objc.NSArray? + URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( + objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { + final _ret = _objc_msgSend_aud7dn( + _class_NSBundle, + _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + bundleURL.ref.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_iq11qg(this.ref.pointer, _sel_URLForResource_withExtension_, name?.ref.pointer ?? ffi.nullptr, ext?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + objc.NSURL? URLForResource_withExtension_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_URLForResource_withExtension_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.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_aud7dn(this.ref.pointer, _sel_URLForResource_withExtension_subdirectory_, name?.ref.pointer ?? ffi.nullptr, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + objc.NSURL? URLForResource_withExtension_subdirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_URLForResource_withExtension_subdirectory_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.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_1qje3rk(this.ref.pointer, _sel_URLForResource_withExtension_subdirectory_localization_, name?.ref.pointer ?? ffi.nullptr, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr, localizationName?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + objc.NSURL? URLForResource_withExtension_subdirectory_localization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_1qje3rk( + this.ref.pointer, + _sel_URLForResource_withExtension_subdirectory_localization_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.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_iq11qg(this.ref.pointer, _sel_URLsForResourcesWithExtension_subdirectory_, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.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_aud7dn(this.ref.pointer, _sel_URLsForResourcesWithExtension_subdirectory_localization_, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr, localizationName?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_localization_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.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_aud7dn(this.ref.pointer, _sel_pathForResource_ofType_inDirectory_, name?.ref.pointer ?? ffi.nullptr, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + objc.NSString? pathForResource_ofType_inDirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_pathForResource_ofType_inDirectory_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.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_iq11qg(this.ref.pointer, _sel_pathsForResourcesOfType_inDirectory_, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr); + objc.NSArray pathsForResourcesOfType_inDirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_pathsForResourcesOfType_inDirectory_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.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_iq11qg(this.ref.pointer, _sel_pathForResource_ofType_, name?.ref.pointer ?? ffi.nullptr, ext?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + objc.NSString? pathForResource_ofType_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_pathForResource_ofType_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.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_1qje3rk(this.ref.pointer, _sel_pathForResource_ofType_inDirectory_forLocalization_, name?.ref.pointer ?? ffi.nullptr, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr, localizationName?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + objc.NSString? pathForResource_ofType_inDirectory_forLocalization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_1qje3rk( + this.ref.pointer, + _sel_pathForResource_ofType_inDirectory_forLocalization_, + name?.ref.pointer ?? ffi.nullptr, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.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_aud7dn(this.ref.pointer, _sel_pathsForResourcesOfType_inDirectory_forLocalization_, ext?.ref.pointer ?? ffi.nullptr, subpath?.ref.pointer ?? ffi.nullptr, localizationName?.ref.pointer ?? ffi.nullptr); + objc.NSArray pathsForResourcesOfType_inDirectory_forLocalization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_pathsForResourcesOfType_inDirectory_forLocalization_, + ext?.ref.pointer ?? ffi.nullptr, + subpath?.ref.pointer ?? ffi.nullptr, + localizationName?.ref.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_aud7dn(this.ref.pointer, _sel_localizedStringForKey_value_table_, key.ref.pointer, value?.ref.pointer ?? ffi.nullptr, tableName?.ref.pointer ?? ffi.nullptr); + objc.NSString localizedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_localizedStringForKey_value_table_, + key.ref.pointer, + value?.ref.pointer ?? ffi.nullptr, + tableName?.ref.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_aud7dn(this.ref.pointer, _sel_localizedAttributedStringForKey_value_table_, key.ref.pointer, value?.ref.pointer ?? ffi.nullptr, tableName?.ref.pointer ?? ffi.nullptr); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + NSAttributedString localizedAttributedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_aud7dn( + this.ref.pointer, + _sel_localizedAttributedStringForKey_value_table_, + key.ref.pointer, + value?.ref.pointer ?? ffi.nullptr, + tableName?.ref.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// bundleIdentifier objc.NSString? get bundleIdentifier { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_bundleIdentifier); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// infoDictionary objc.NSDictionary? get infoDictionary { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_infoDictionary); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// localizedInfoDictionary objc.NSDictionary? get localizedInfoDictionary { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedInfoDictionary); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_juohf7(this.ref.pointer, _sel_objectForInfoDictionaryKey_, key.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_objectForInfoDictionaryKey_, key.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// classNamed: objc.ObjCObjectBase? classNamed_(objc.NSString className) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_classNamed_, className.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_classNamed_, className.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// principalClass objc.ObjCObjectBase? get principalClass { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_principalClass); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// preferredLocalizations objc.NSArray get preferredLocalizations { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredLocalizations); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredLocalizations); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -2122,43 +3877,60 @@ class NSBundle extends objc.NSObject { /// developmentLocalization objc.NSString? get developmentLocalization { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_developmentLocalization); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_juohf7(_class_NSBundle, _sel_preferredLocalizationsFromArray_, localizationsArray.ref.pointer); + static objc.NSArray preferredLocalizationsFromArray_( + objc.NSArray localizationsArray) { + final _ret = _objc_msgSend_juohf7(_class_NSBundle, + _sel_preferredLocalizationsFromArray_, localizationsArray.ref.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_iq11qg(_class_NSBundle, _sel_preferredLocalizationsFromArray_forPreferences_, localizationsArray.ref.pointer, preferencesArray?.ref.pointer ?? ffi.nullptr); + static objc.NSArray preferredLocalizationsFromArray_forPreferences_( + objc.NSArray localizationsArray, objc.NSArray? preferencesArray) { + final _ret = _objc_msgSend_iq11qg( + _class_NSBundle, + _sel_preferredLocalizationsFromArray_forPreferences_, + localizationsArray.ref.pointer, + preferencesArray?.ref.pointer ?? ffi.nullptr); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// executableArchitectures objc.NSArray? get executableArchitectures { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executableArchitectures); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_13ndgwe(this.ref.pointer, _sel_setPreservationPriority_forTags_, priority, tags.ref.pointer); - + _objc_msgSend_13ndgwe(this.ref.pointer, + _sel_setPreservationPriority_forTags_, priority, tags.ref.pointer); } /// preservationPriorityForTag: double preservationPriorityForTag_(objc.NSString tag) { - return objc.useMsgSendVariants ? _objc_msgSend_om71r5Fpret(this.ref.pointer, _sel_preservationPriorityForTag_, tag.ref.pointer) : _objc_msgSend_om71r5(this.ref.pointer, _sel_preservationPriorityForTag_, tag.ref.pointer); - + return objc.useMsgSendVariants + ? _objc_msgSend_om71r5Fpret( + this.ref.pointer, _sel_preservationPriorityForTag_, tag.ref.pointer) + : _objc_msgSend_om71r5(this.ref.pointer, + _sel_preservationPriorityForTag_, tag.ref.pointer); } /// init NSBundle init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSBundle.castFromPointer(_ret, retain: false, release: true); } @@ -2170,7 +3942,8 @@ _objc_msgSend_13ndgwe(this.ref.pointer, _sel_setPreservationPriority_forTags_, p /// allocWithZone: static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSBundle, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSBundle, _sel_allocWithZone_, zone); return NSBundle.castFromPointer(_ret, retain: false, release: true); } @@ -2181,56 +3954,70 @@ _objc_msgSend_13ndgwe(this.ref.pointer, _sel_setPreservationPriority_forTags_, p } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSBundle, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSBundle, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSBundle, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSBundle, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSBundle, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSBundle, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSBundle, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSBundle, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSBundle, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSBundle, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSBundle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSBundle, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSBundle, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSBundle, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -2253,384 +4040,684 @@ _objc_msgSend_1tjlcwl(_class_NSBundle, _sel_setKeys_triggerChangeNotificationsFo } } -late final _class_NSMutableAttributedString = objc.getClass("NSMutableAttributedString"); -late final _sel_replaceCharactersInRange_withString_ = objc.registerName("replaceCharactersInRange:withString:"); -final _objc_msgSend_85e5ih = objc.msgSendPointer.cast , ffi.Pointer , objc.NSRange , ffi.Pointer )>>().asFunction , ffi.Pointer , objc.NSRange , ffi.Pointer )>(); -late final _sel_setAttributes_range_ = objc.registerName("setAttributes:range:"); -final _objc_msgSend_lusc9 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , objc.NSRange )>>().asFunction , ffi.Pointer , ffi.Pointer , objc.NSRange )>(); +late final _class_NSMutableAttributedString = + objc.getClass("NSMutableAttributedString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_85e5ih = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_setAttributes_range_ = + objc.registerName("setAttributes:range:"); +final _objc_msgSend_lusc9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>(); late final _sel_mutableString = objc.registerName("mutableString"); -late final _sel_addAttribute_value_range_ = objc.registerName("addAttribute:value:range:"); -final _objc_msgSend_1fmqvtu = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , objc.NSRange )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , objc.NSRange )>(); -late final _sel_addAttributes_range_ = objc.registerName("addAttributes:range:"); -late final _sel_removeAttribute_range_ = objc.registerName("removeAttribute:range:"); -late final _sel_replaceCharactersInRange_withAttributedString_ = objc.registerName("replaceCharactersInRange:withAttributedString:"); -late final _sel_insertAttributedString_atIndex_ = objc.registerName("insertAttributedString:atIndex:"); -final _objc_msgSend_cjm5ga = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_appendAttributedString_ = objc.registerName("appendAttributedString:"); -late final _sel_deleteCharactersInRange_ = objc.registerName("deleteCharactersInRange:"); -final _objc_msgSend_9xf7uy = objc.msgSendPointer.cast , ffi.Pointer , objc.NSRange )>>().asFunction , ffi.Pointer , objc.NSRange )>(); -late final _sel_setAttributedString_ = objc.registerName("setAttributedString:"); +late final _sel_addAttribute_value_range_ = + objc.registerName("addAttribute:value:range:"); +final _objc_msgSend_1fmqvtu = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_addAttributes_range_ = + objc.registerName("addAttributes:range:"); +late final _sel_removeAttribute_range_ = + objc.registerName("removeAttribute:range:"); +late final _sel_replaceCharactersInRange_withAttributedString_ = + objc.registerName("replaceCharactersInRange:withAttributedString:"); +late final _sel_insertAttributedString_atIndex_ = + objc.registerName("insertAttributedString:atIndex:"); +final _objc_msgSend_cjm5ga = 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:"); +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +final _objc_msgSend_9xf7uy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, objc.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:"); +late final _sel_appendLocalizedFormat_ = + objc.registerName("appendLocalizedFormat:"); /// NSMutableAttributedString class NSMutableAttributedString extends NSAttributedString { NSMutableAttributedString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSMutableAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); } /// replaceCharactersInRange:withString: - void replaceCharactersInRange_withString_(objc.NSRange range, objc.NSString str) { -_objc_msgSend_85e5ih(this.ref.pointer, _sel_replaceCharactersInRange_withString_, range, str.ref.pointer); - + void replaceCharactersInRange_withString_( + objc.NSRange range, objc.NSString str) { + _objc_msgSend_85e5ih(this.ref.pointer, + _sel_replaceCharactersInRange_withString_, range, str.ref.pointer); } /// setAttributes:range: void setAttributes_range_(objc.NSDictionary? attrs, objc.NSRange range) { -_objc_msgSend_lusc9(this.ref.pointer, _sel_setAttributes_range_, attrs?.ref.pointer ?? ffi.nullptr, range); - + _objc_msgSend_lusc9(this.ref.pointer, _sel_setAttributes_range_, + attrs?.ref.pointer ?? ffi.nullptr, range); } /// mutableString objc.NSMutableString get mutableString { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mutableString); - return objc.NSMutableString.castFromPointer(_ret, retain: true, release: true); + return objc.NSMutableString.castFromPointer(_ret, + retain: true, release: true); } /// addAttribute:value:range: - void addAttribute_value_range_(objc.NSString name, objc.ObjCObjectBase value, objc.NSRange range) { -_objc_msgSend_1fmqvtu(this.ref.pointer, _sel_addAttribute_value_range_, name.ref.pointer, value.ref.pointer, range); - + void addAttribute_value_range_( + objc.NSString name, objc.ObjCObjectBase value, objc.NSRange range) { + _objc_msgSend_1fmqvtu(this.ref.pointer, _sel_addAttribute_value_range_, + name.ref.pointer, value.ref.pointer, range); } /// addAttributes:range: void addAttributes_range_(objc.NSDictionary attrs, objc.NSRange range) { -_objc_msgSend_lusc9(this.ref.pointer, _sel_addAttributes_range_, attrs.ref.pointer, range); - + _objc_msgSend_lusc9( + this.ref.pointer, _sel_addAttributes_range_, attrs.ref.pointer, range); } /// removeAttribute:range: void removeAttribute_range_(objc.NSString name, objc.NSRange range) { -_objc_msgSend_lusc9(this.ref.pointer, _sel_removeAttribute_range_, name.ref.pointer, range); - + _objc_msgSend_lusc9( + this.ref.pointer, _sel_removeAttribute_range_, name.ref.pointer, range); } /// replaceCharactersInRange:withAttributedString: - void replaceCharactersInRange_withAttributedString_(objc.NSRange range, NSAttributedString attrString) { -_objc_msgSend_85e5ih(this.ref.pointer, _sel_replaceCharactersInRange_withAttributedString_, range, attrString.ref.pointer); - + void replaceCharactersInRange_withAttributedString_( + objc.NSRange range, NSAttributedString attrString) { + _objc_msgSend_85e5ih( + this.ref.pointer, + _sel_replaceCharactersInRange_withAttributedString_, + range, + attrString.ref.pointer); } /// insertAttributedString:atIndex: void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { -_objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertAttributedString_atIndex_, attrString.ref.pointer, loc); - + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertAttributedString_atIndex_, + attrString.ref.pointer, loc); } /// appendAttributedString: void appendAttributedString_(NSAttributedString attrString) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_appendAttributedString_, attrString.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_appendAttributedString_, attrString.ref.pointer); } /// deleteCharactersInRange: void deleteCharactersInRange_(objc.NSRange range) { -_objc_msgSend_9xf7uy(this.ref.pointer, _sel_deleteCharactersInRange_, range); - + _objc_msgSend_9xf7uy( + this.ref.pointer, _sel_deleteCharactersInRange_, range); } /// setAttributedString: void setAttributedString_(NSAttributedString attrString) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributedString_, attrString.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAttributedString_, attrString.ref.pointer); } /// beginEditing void beginEditing() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_beginEditing); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_beginEditing); } /// endEditing void endEditing() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_endEditing); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_endEditing); } /// appendLocalizedFormat: void appendLocalizedFormat_(NSAttributedString format) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_appendLocalizedFormat_, format.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_appendLocalizedFormat_, format.ref.pointer); } /// initWithString: NSMutableAttributedString initWithString_(objc.NSString str) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithString_, str.ref.pointer); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, str.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// initWithString:attributes: - NSMutableAttributedString initWithString_attributes_(objc.NSString str, objc.NSDictionary? attrs) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithString_attributes_, str.ref.pointer, attrs?.ref.pointer ?? ffi.nullptr); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + NSMutableAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithString_attributes_, + str.ref.pointer, + attrs?.ref.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// initWithAttributedString: - NSMutableAttributedString initWithAttributedString_(NSAttributedString attrStr) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithAttributedString_, attrStr.ref.pointer); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + NSMutableAttributedString initWithAttributedString_( + NSAttributedString attrStr) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithAttributedString_, attrStr.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, 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_w9wiqt(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, markdownFile.ref.pointer, options?.ref.pointer ?? ffi.nullptr, baseURL?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + NSMutableAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, 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_w9wiqt(this.ref.retainAndReturnPointer(), _sel_initWithMarkdown_options_baseURL_error_, markdown.ref.pointer, options?.ref.pointer ?? ffi.nullptr, baseURL?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdown_options_baseURL_error_, + markdown.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, 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_w9wiqt(this.ref.retainAndReturnPointer(), _sel_initWithMarkdownString_options_baseURL_error_, markdownString.ref.pointer, options?.ref.pointer ?? ffi.nullptr, baseURL?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_w9wiqt( + this.ref.retainAndReturnPointer(), + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + baseURL?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// initWithFormat:options:locale: - NSMutableAttributedString initWithFormat_options_locale_(NSAttributedString format, NSAttributedStringFormattingOptions options, objc.NSLocale? locale) { - final _ret = _objc_msgSend_4x8h9q(this.ref.retainAndReturnPointer(), _sel_initWithFormat_options_locale_, format.ref.pointer, options.value, locale?.ref.pointer ?? ffi.nullptr); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + NSMutableAttributedString initWithFormat_options_locale_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSLocale? locale) { + final _ret = _objc_msgSend_4x8h9q( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// localizedAttributedStringWithFormat: - static NSMutableAttributedString localizedAttributedStringWithFormat_(NSAttributedString format) { - final _ret = _objc_msgSend_juohf7(_class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_, format.ref.pointer); - return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_juohf7(_class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_, format.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// localizedAttributedStringWithFormat:options: - static NSMutableAttributedString localizedAttributedStringWithFormat_options_(NSAttributedString format, NSAttributedStringFormattingOptions options) { - final _ret = _objc_msgSend_1vfncet(_class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_options_, format.ref.pointer, options.value); - return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, NSAttributedStringFormattingOptions options) { + final _ret = _objc_msgSend_1vfncet( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.ref.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_xvcwe5(this.ref.retainAndReturnPointer(), _sel_initWithFormat_options_locale_context_, format.ref.pointer, options.value, locale?.ref.pointer ?? ffi.nullptr, context.ref.pointer); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + NSMutableAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_xvcwe5( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_options_locale_context_, + format.ref.pointer, + options.value, + locale?.ref.pointer ?? ffi.nullptr, + context.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// localizedAttributedStringWithFormat:context: - static NSMutableAttributedString localizedAttributedStringWithFormat_context_(NSAttributedString format, objc.NSDictionary context) { - final _ret = _objc_msgSend_iq11qg(_class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_context_, format.ref.pointer, context.ref.pointer); - return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_iq11qg( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.ref.pointer, + context.ref.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_4x8h9q(_class_NSMutableAttributedString, _sel_localizedAttributedStringWithFormat_options_context_, format.ref.pointer, options.value, context.ref.pointer); - return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); + static NSMutableAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, + NSAttributedStringFormattingOptions options, + objc.NSDictionary context) { + final _ret = _objc_msgSend_4x8h9q( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.ref.pointer, + options.value, + context.ref.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// init NSMutableAttributedString init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// new static NSMutableAttributedString new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableAttributedString, _sel_new); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSMutableAttributedString, _sel_new); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSMutableAttributedString, _sel_allocWithZone_, zone); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSMutableAttributedString, _sel_allocWithZone_, zone); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSMutableAttributedString alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableAttributedString, _sel_alloc); - return NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_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_cqxsqq(_class_NSMutableAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSMutableAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSMutableAttributedString, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSMutableAttributedString, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSMutableAttributedString, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMutableAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSMutableAttributedString, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSMutableAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSMutableAttributedString, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSMutableAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSMutableAttributedString self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// retain NSMutableAttributedString retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSMutableAttributedString autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSMutableAttributedString.castFromPointer(_ret, retain: true, release: true); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSMutableAttributedString, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSMutableAttributedString, _sel_supportsSecureCoding); } /// initWithCoder: NSMutableAttributedString? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSMutableAttributedString.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } } late final _class_NSFormatter = objc.getClass("NSFormatter"); -late final _sel_stringForObjectValue_ = objc.registerName("stringForObjectValue:"); -late final _sel_attributedStringForObjectValue_withDefaultAttributes_ = objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); -late final _sel_editingStringForObjectValue_ = objc.registerName("editingStringForObjectValue:"); -late final _sel_getObjectValue_forString_errorDescription_ = objc.registerName("getObjectValue:forString:errorDescription:"); -final _objc_msgSend_1tdtroe = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_isPartialStringValid_newEditingString_errorDescription_ = objc.registerName("isPartialStringValid:newEditingString:errorDescription:"); -final _objc_msgSend_to8xlo = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.Pointer> )>(); -late final _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_ = objc.registerName("isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); -final _objc_msgSend_1hu6x2w = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer> )>(); +late final _sel_stringForObjectValue_ = + objc.registerName("stringForObjectValue:"); +late final _sel_attributedStringForObjectValue_withDefaultAttributes_ = + objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); +late final _sel_editingStringForObjectValue_ = + objc.registerName("editingStringForObjectValue:"); +late final _sel_getObjectValue_forString_errorDescription_ = + objc.registerName("getObjectValue:forString:errorDescription:"); +final _objc_msgSend_1tdtroe = 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_isPartialStringValid_newEditingString_errorDescription_ = objc + .registerName("isPartialStringValid:newEditingString:errorDescription:"); +final _objc_msgSend_to8xlo = 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_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_ = + objc.registerName( + "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); +final _objc_msgSend_1hu6x2w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer>)>(); /// NSFormatter class NSFormatter extends objc.NSObject { NSFormatter._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSFormatter] that points to the same underlying object as [other]. - NSFormatter.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSFormatter] that wraps the given raw object pointer. NSFormatter.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSFormatter]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSFormatter); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFormatter); } /// stringForObjectValue: objc.NSString? stringForObjectValue_(objc.ObjCObjectBase? obj) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_stringForObjectValue_, obj?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_stringForObjectValue_, obj?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// attributedStringForObjectValue:withDefaultAttributes: - NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_(objc.ObjCObjectBase obj, objc.NSDictionary? attrs) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_attributedStringForObjectValue_withDefaultAttributes_, obj.ref.pointer, attrs?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSAttributedString.castFromPointer(_ret, retain: true, release: true); + NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( + objc.ObjCObjectBase obj, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_attributedStringForObjectValue_withDefaultAttributes_, + obj.ref.pointer, + attrs?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } /// editingStringForObjectValue: objc.NSString? editingStringForObjectValue_(objc.ObjCObjectBase obj) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_editingStringForObjectValue_, obj.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_editingStringForObjectValue_, obj.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// getObjectValue:forString:errorDescription: - bool getObjectValue_forString_errorDescription_(ffi.Pointer> obj, objc.NSString string, ffi.Pointer> error) { - return _objc_msgSend_1tdtroe(this.ref.pointer, _sel_getObjectValue_forString_errorDescription_, obj, string.ref.pointer, error); - + bool getObjectValue_forString_errorDescription_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer> error) { + return _objc_msgSend_1tdtroe( + this.ref.pointer, + _sel_getObjectValue_forString_errorDescription_, + obj, + string.ref.pointer, + error); } /// isPartialStringValid:newEditingString:errorDescription: - bool isPartialStringValid_newEditingString_errorDescription_(objc.NSString partialString, ffi.Pointer> newString, ffi.Pointer> error) { - return _objc_msgSend_to8xlo(this.ref.pointer, _sel_isPartialStringValid_newEditingString_errorDescription_, partialString.ref.pointer, newString, error); - + bool isPartialStringValid_newEditingString_errorDescription_( + objc.NSString partialString, + ffi.Pointer> newString, + ffi.Pointer> error) { + return _objc_msgSend_to8xlo( + this.ref.pointer, + _sel_isPartialStringValid_newEditingString_errorDescription_, + partialString.ref.pointer, + newString, + error); } /// isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription: - bool isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_(ffi.Pointer> partialStringPtr, ffi.Pointer proposedSelRangePtr, objc.NSString origString, objc.NSRange origSelRange, ffi.Pointer> error) { - return _objc_msgSend_1hu6x2w(this.ref.pointer, _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, partialStringPtr, proposedSelRangePtr, origString.ref.pointer, origSelRange, error); - + bool + isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( + ffi.Pointer> partialStringPtr, + ffi.Pointer proposedSelRangePtr, + objc.NSString origString, + objc.NSRange origSelRange, + ffi.Pointer> error) { + return _objc_msgSend_1hu6x2w( + this.ref.pointer, + _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, + partialStringPtr, + proposedSelRangePtr, + origString.ref.pointer, + origSelRange, + error); } /// init NSFormatter init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSFormatter.castFromPointer(_ret, retain: false, release: true); } @@ -2642,7 +4729,8 @@ class NSFormatter extends objc.NSObject { /// allocWithZone: static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSFormatter, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSFormatter, _sel_allocWithZone_, zone); return NSFormatter.castFromPointer(_ret, retain: false, release: true); } @@ -2653,56 +4741,70 @@ class NSFormatter extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSFormatter, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSFormatter, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSFormatter, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSFormatter, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSFormatter, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSFormatter, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSFormatter, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSFormatter, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFormatter, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFormatter, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSFormatter, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -2726,18 +4828,22 @@ _objc_msgSend_1tjlcwl(_class_NSFormatter, _sel_setKeys_triggerChangeNotification /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSFormatter? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSFormatter.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSFormatter.castFromPointer(_ret, retain: false, release: true); } } late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); + enum NSFormattingContext { NSFormattingContextUnknown(0), NSFormattingContextDynamic(1), @@ -2746,30 +4852,63 @@ enum NSFormattingContext { NSFormattingContextBeginningOfSentence(4), NSFormattingContextMiddleOfSentence(5); - final int value; const NSFormattingContext(this.value); static NSFormattingContext fromValue(int value) => switch (value) { - 0 => NSFormattingContextUnknown, - 1 => NSFormattingContextDynamic, - 2 => NSFormattingContextStandalone, - 3 => NSFormattingContextListItem, - 4 => NSFormattingContextBeginningOfSentence, - 5 => NSFormattingContextMiddleOfSentence, - _ => throw ArgumentError("Unknown value for NSFormattingContext: $value"), - }; - + 0 => NSFormattingContextUnknown, + 1 => NSFormattingContextDynamic, + 2 => NSFormattingContextStandalone, + 3 => NSFormattingContextListItem, + 4 => NSFormattingContextBeginningOfSentence, + 5 => NSFormattingContextMiddleOfSentence, + _ => + throw ArgumentError("Unknown value for NSFormattingContext: $value"), + }; } late final _sel_formattingContext = objc.registerName("formattingContext"); -final _objc_msgSend_10wicfq = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setFormattingContext_ = objc.registerName("setFormattingContext:"); -final _objc_msgSend_1gtwv7x = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_getObjectValue_forString_range_error_ = objc.registerName("getObjectValue:forString:range:error:"); -final _objc_msgSend_bl9kx = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); +final _objc_msgSend_10wicfq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFormattingContext_ = + objc.registerName("setFormattingContext:"); +final _objc_msgSend_1gtwv7x = 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_getObjectValue_forString_range_error_ = + objc.registerName("getObjectValue:forString:range:error:"); +final _objc_msgSend_bl9kx = 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_stringFromDate_ = objc.registerName("stringFromDate:"); late final _sel_dateFromString_ = objc.registerName("dateFromString:"); + enum NSDateFormatterStyle { NSDateFormatterNoStyle(0), NSDateFormatterShortStyle(1), @@ -2777,88 +4916,180 @@ enum NSDateFormatterStyle { NSDateFormatterLongStyle(3), NSDateFormatterFullStyle(4); - final int value; const NSDateFormatterStyle(this.value); static NSDateFormatterStyle fromValue(int value) => switch (value) { - 0 => NSDateFormatterNoStyle, - 1 => NSDateFormatterShortStyle, - 2 => NSDateFormatterMediumStyle, - 3 => NSDateFormatterLongStyle, - 4 => NSDateFormatterFullStyle, - _ => throw ArgumentError("Unknown value for NSDateFormatterStyle: $value"), - }; - -} + 0 => NSDateFormatterNoStyle, + 1 => NSDateFormatterShortStyle, + 2 => NSDateFormatterMediumStyle, + 3 => NSDateFormatterLongStyle, + 4 => NSDateFormatterFullStyle, + _ => + throw ArgumentError("Unknown value for NSDateFormatterStyle: $value"), + }; +} + +late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = + objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); +final _objc_msgSend_1sgexgh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int)>(); +late final _sel_dateFormatFromTemplate_options_locale_ = + objc.registerName("dateFormatFromTemplate:options:locale:"); +final _objc_msgSend_1czjmpk = 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_localizedStringFromDate_dateStyle_timeStyle_ = objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); -final _objc_msgSend_1sgexgh = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , int )>(); -late final _sel_dateFormatFromTemplate_options_locale_ = objc.registerName("dateFormatFromTemplate:options:locale:"); -final _objc_msgSend_1czjmpk = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); enum NSDateFormatterBehavior { NSDateFormatterBehaviorDefault(0), NSDateFormatterBehavior10_0(1000), NSDateFormatterBehavior10_4(1040); - final int value; const NSDateFormatterBehavior(this.value); static NSDateFormatterBehavior fromValue(int value) => switch (value) { - 0 => NSDateFormatterBehaviorDefault, - 1000 => NSDateFormatterBehavior10_0, - 1040 => NSDateFormatterBehavior10_4, - _ => throw ArgumentError("Unknown value for NSDateFormatterBehavior: $value"), - }; - -} - -late final _sel_defaultFormatterBehavior = objc.registerName("defaultFormatterBehavior"); -final _objc_msgSend_ti9wzk = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setDefaultFormatterBehavior_ = objc.registerName("setDefaultFormatterBehavior:"); -final _objc_msgSend_ffb1q7 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_setLocalizedDateFormatFromTemplate_ = objc.registerName("setLocalizedDateFormatFromTemplate:"); + 0 => NSDateFormatterBehaviorDefault, + 1000 => NSDateFormatterBehavior10_0, + 1040 => NSDateFormatterBehavior10_4, + _ => throw ArgumentError( + "Unknown value for NSDateFormatterBehavior: $value"), + }; +} + +late final _sel_defaultFormatterBehavior = + objc.registerName("defaultFormatterBehavior"); +final _objc_msgSend_ti9wzk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultFormatterBehavior_ = + objc.registerName("setDefaultFormatterBehavior:"); +final _objc_msgSend_ffb1q7 = 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_setLocalizedDateFormatFromTemplate_ = + objc.registerName("setLocalizedDateFormatFromTemplate:"); late final _sel_dateFormat = objc.registerName("dateFormat"); late final _sel_setDateFormat_ = objc.registerName("setDateFormat:"); late final _sel_dateStyle = objc.registerName("dateStyle"); -final _objc_msgSend_r4ksf1 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_r4ksf1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); -final _objc_msgSend_7hnqfw = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_7hnqfw = 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_timeStyle = objc.registerName("timeStyle"); late final _sel_setTimeStyle_ = objc.registerName("setTimeStyle:"); late final _sel_locale = objc.registerName("locale"); late final _sel_setLocale_ = objc.registerName("setLocale:"); -late final _sel_generatesCalendarDates = objc.registerName("generatesCalendarDates"); -late final _sel_setGeneratesCalendarDates_ = objc.registerName("setGeneratesCalendarDates:"); +late final _sel_generatesCalendarDates = + objc.registerName("generatesCalendarDates"); +late final _sel_setGeneratesCalendarDates_ = + objc.registerName("setGeneratesCalendarDates:"); late final _sel_formatterBehavior = objc.registerName("formatterBehavior"); -late final _sel_setFormatterBehavior_ = objc.registerName("setFormatterBehavior:"); +late final _sel_setFormatterBehavior_ = + objc.registerName("setFormatterBehavior:"); late final _class_NSTimeZone = objc.getClass("NSTimeZone"); late final _sel_name = objc.registerName("name"); late final _sel_data = objc.registerName("data"); -late final _sel_secondsFromGMTForDate_ = objc.registerName("secondsFromGMTForDate:"); -final _objc_msgSend_hrsqsi = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -late final _sel_abbreviationForDate_ = objc.registerName("abbreviationForDate:"); -late final _sel_isDaylightSavingTimeForDate_ = objc.registerName("isDaylightSavingTimeForDate:"); -late final _sel_daylightSavingTimeOffsetForDate_ = objc.registerName("daylightSavingTimeOffsetForDate:"); -late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); +late final _sel_secondsFromGMTForDate_ = + objc.registerName("secondsFromGMTForDate:"); +final _objc_msgSend_hrsqsi = 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:"); +late final _sel_isDaylightSavingTimeForDate_ = + objc.registerName("isDaylightSavingTimeForDate:"); +late final _sel_daylightSavingTimeOffsetForDate_ = + objc.registerName("daylightSavingTimeOffsetForDate:"); +late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = + objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); 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:"); +late final _sel_abbreviationDictionary = + objc.registerName("abbreviationDictionary"); +late final _sel_setAbbreviationDictionary_ = + objc.registerName("setAbbreviationDictionary:"); late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); -final _objc_msgSend_z1fx1b = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_z1fx1b = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); 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_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:"); + enum NSTimeZoneNameStyle { NSTimeZoneNameStyleStandard(0), NSTimeZoneNameStyleShortStandard(1), @@ -2867,51 +5098,74 @@ enum NSTimeZoneNameStyle { 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_1c91ngg = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); + 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_1c91ngg = 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:"); +late final _sel_timeZoneWithName_data_ = + objc.registerName("timeZoneWithName:data:"); 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_crtxa9 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Long )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_timeZoneWithAbbreviation_ = objc.registerName("timeZoneWithAbbreviation:"); +late final _sel_timeZoneForSecondsFromGMT_ = + objc.registerName("timeZoneForSecondsFromGMT:"); +final _objc_msgSend_crtxa9 = 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:"); /// NSTimeZone class NSTimeZone extends objc.NSObject { NSTimeZone._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSTimeZone.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSTimeZone); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTimeZone); } /// name @@ -2928,32 +5182,41 @@ class NSTimeZone extends objc.NSObject { /// secondsFromGMTForDate: int secondsFromGMTForDate_(objc.NSDate aDate) { - return _objc_msgSend_hrsqsi(this.ref.pointer, _sel_secondsFromGMTForDate_, aDate.ref.pointer); - + return _objc_msgSend_hrsqsi( + this.ref.pointer, _sel_secondsFromGMTForDate_, aDate.ref.pointer); } /// abbreviationForDate: objc.NSString? abbreviationForDate_(objc.NSDate aDate) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_abbreviationForDate_, aDate.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_abbreviationForDate_, aDate.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// isDaylightSavingTimeForDate: bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isDaylightSavingTimeForDate_, aDate.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDaylightSavingTimeForDate_, aDate.ref.pointer); } /// daylightSavingTimeOffsetForDate: double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { - return objc.useMsgSendVariants ? _objc_msgSend_om71r5Fpret(this.ref.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.ref.pointer) : _objc_msgSend_om71r5(this.ref.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.ref.pointer); - + return objc.useMsgSendVariants + ? _objc_msgSend_om71r5Fpret(this.ref.pointer, + _sel_daylightSavingTimeOffsetForDate_, aDate.ref.pointer) + : _objc_msgSend_om71r5(this.ref.pointer, + _sel_daylightSavingTimeOffsetForDate_, aDate.ref.pointer); } /// nextDaylightSavingTimeTransitionAfterDate: objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.ref.pointer); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// systemTimeZone @@ -2964,8 +5227,7 @@ class NSTimeZone extends objc.NSObject { /// resetSystemTimeZone static void resetSystemTimeZone() { -_objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); - + _objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); } /// defaultTimeZone @@ -2976,8 +5238,8 @@ _objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); /// setDefaultTimeZone: static void setDefaultTimeZone(NSTimeZone value) { - return _objc_msgSend_ukcdfq(_class_NSTimeZone, _sel_setDefaultTimeZone_, value.ref.pointer); - + return _objc_msgSend_ukcdfq( + _class_NSTimeZone, _sel_setDefaultTimeZone_, value.ref.pointer); } /// localTimeZone @@ -2988,56 +5250,65 @@ _objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); /// knownTimeZoneNames static objc.NSArray getKnownTimeZoneNames() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_knownTimeZoneNames); + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_knownTimeZoneNames); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// abbreviationDictionary static objc.NSDictionary getAbbreviationDictionary() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_abbreviationDictionary); + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_abbreviationDictionary); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setAbbreviationDictionary: static void setAbbreviationDictionary(objc.NSDictionary value) { - return _objc_msgSend_ukcdfq(_class_NSTimeZone, _sel_setAbbreviationDictionary_, value.ref.pointer); - + return _objc_msgSend_ukcdfq( + _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.ref.pointer); } /// timeZoneDataVersion static objc.NSString getTimeZoneDataVersion() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_timeZoneDataVersion); + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_timeZoneDataVersion); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// secondsFromGMT int get secondsFromGMT { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_secondsFromGMT); - } /// abbreviation objc.NSString? get abbreviation { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_abbreviation); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// isDaylightSavingTime bool get daylightSavingTime { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDaylightSavingTime); - } /// daylightSavingTimeOffset double get daylightSavingTimeOffset { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_daylightSavingTimeOffset) : _objc_msgSend_10noklm(this.ref.pointer, _sel_daylightSavingTimeOffset); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_daylightSavingTimeOffset) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_daylightSavingTimeOffset); } /// nextDaylightSavingTimeTransition objc.NSDate? get nextDaylightSavingTimeTransition { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_nextDaylightSavingTimeTransition); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_nextDaylightSavingTimeTransition); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// description @@ -3048,55 +5319,86 @@ _objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); /// isEqualToTimeZone: bool isEqualToTimeZone_(NSTimeZone aTimeZone) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isEqualToTimeZone_, aTimeZone.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqualToTimeZone_, aTimeZone.ref.pointer); } /// localizedName:locale: - objc.NSString? localizedName_locale_(NSTimeZoneNameStyle style, objc.NSLocale? locale) { - final _ret = _objc_msgSend_1c91ngg(this.ref.pointer, _sel_localizedName_locale_, style.value, locale?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + objc.NSString? localizedName_locale_( + NSTimeZoneNameStyle style, objc.NSLocale? locale) { + final _ret = _objc_msgSend_1c91ngg( + this.ref.pointer, + _sel_localizedName_locale_, + style.value, + locale?.ref.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_juohf7(_class_NSTimeZone, _sel_timeZoneWithName_, tzName.ref.pointer); - return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSTimeZone, _sel_timeZoneWithName_, tzName.ref.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_iq11qg(_class_NSTimeZone, _sel_timeZoneWithName_data_, tzName.ref.pointer, aData?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + static NSTimeZone? timeZoneWithName_data_( + objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_iq11qg( + _class_NSTimeZone, + _sel_timeZoneWithName_data_, + tzName.ref.pointer, + aData?.ref.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_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithName_, tzName.ref.pointer); - return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithName_, tzName.ref.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: false, release: true); } /// initWithName:data: NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithName_data_, tzName.ref.pointer, aData?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithName_data_, + tzName.ref.pointer, + aData?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: false, release: true); } /// timeZoneForSecondsFromGMT: static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { - final _ret = _objc_msgSend_crtxa9(_class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); + final _ret = _objc_msgSend_crtxa9( + _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// timeZoneWithAbbreviation: static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { - final _ret = _objc_msgSend_juohf7(_class_NSTimeZone, _sel_timeZoneWithAbbreviation_, abbreviation.ref.pointer); - return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSTimeZone, + _sel_timeZoneWithAbbreviation_, abbreviation.ref.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// init NSTimeZone init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } @@ -3108,7 +5410,8 @@ _objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); /// allocWithZone: static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSTimeZone, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSTimeZone, _sel_allocWithZone_, zone); return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } @@ -3119,63 +5422,76 @@ _objc_msgSend_ksby9f(_class_NSTimeZone, _sel_resetSystemTimeZone); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSTimeZone, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSTimeZone, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSTimeZone, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSTimeZone, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSTimeZone, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSTimeZone, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSTimeZone, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSTimeZone, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSTimeZone, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSTimeZone, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimeZone, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { return _objc_msgSend_olxnu1(_class_NSTimeZone, _sel_supportsSecureCoding); - } } @@ -3183,35 +5499,58 @@ late final _sel_timeZone = objc.registerName("timeZone"); late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); late final _class_NSCalendar = objc.getClass("NSCalendar"); late final _sel_currentCalendar = objc.registerName("currentCalendar"); -late final _sel_autoupdatingCurrentCalendar = objc.registerName("autoupdatingCurrentCalendar"); -late final _sel_calendarWithIdentifier_ = objc.registerName("calendarWithIdentifier:"); -late final _sel_initWithCalendarIdentifier_ = objc.registerName("initWithCalendarIdentifier:"); +late final _sel_autoupdatingCurrentCalendar = + objc.registerName("autoupdatingCurrentCalendar"); +late final _sel_calendarWithIdentifier_ = + objc.registerName("calendarWithIdentifier:"); +late final _sel_initWithCalendarIdentifier_ = + objc.registerName("initWithCalendarIdentifier:"); late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); late final _sel_firstWeekday = objc.registerName("firstWeekday"); late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); -final _objc_msgSend_1k4zaz5 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_minimumDaysInFirstWeek = objc.registerName("minimumDaysInFirstWeek"); -late final _sel_setMinimumDaysInFirstWeek_ = objc.registerName("setMinimumDaysInFirstWeek:"); +final _objc_msgSend_1k4zaz5 = 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_minimumDaysInFirstWeek = + objc.registerName("minimumDaysInFirstWeek"); +late final _sel_setMinimumDaysInFirstWeek_ = + objc.registerName("setMinimumDaysInFirstWeek:"); late final _sel_eraSymbols = objc.registerName("eraSymbols"); late final _sel_longEraSymbols = objc.registerName("longEraSymbols"); late final _sel_monthSymbols = objc.registerName("monthSymbols"); late final _sel_shortMonthSymbols = objc.registerName("shortMonthSymbols"); -late final _sel_veryShortMonthSymbols = objc.registerName("veryShortMonthSymbols"); -late final _sel_standaloneMonthSymbols = objc.registerName("standaloneMonthSymbols"); -late final _sel_shortStandaloneMonthSymbols = objc.registerName("shortStandaloneMonthSymbols"); -late final _sel_veryShortStandaloneMonthSymbols = objc.registerName("veryShortStandaloneMonthSymbols"); +late final _sel_veryShortMonthSymbols = + objc.registerName("veryShortMonthSymbols"); +late final _sel_standaloneMonthSymbols = + objc.registerName("standaloneMonthSymbols"); +late final _sel_shortStandaloneMonthSymbols = + objc.registerName("shortStandaloneMonthSymbols"); +late final _sel_veryShortStandaloneMonthSymbols = + objc.registerName("veryShortStandaloneMonthSymbols"); late final _sel_weekdaySymbols = objc.registerName("weekdaySymbols"); late final _sel_shortWeekdaySymbols = objc.registerName("shortWeekdaySymbols"); -late final _sel_veryShortWeekdaySymbols = objc.registerName("veryShortWeekdaySymbols"); -late final _sel_standaloneWeekdaySymbols = objc.registerName("standaloneWeekdaySymbols"); -late final _sel_shortStandaloneWeekdaySymbols = objc.registerName("shortStandaloneWeekdaySymbols"); -late final _sel_veryShortStandaloneWeekdaySymbols = objc.registerName("veryShortStandaloneWeekdaySymbols"); +late final _sel_veryShortWeekdaySymbols = + objc.registerName("veryShortWeekdaySymbols"); +late final _sel_standaloneWeekdaySymbols = + objc.registerName("standaloneWeekdaySymbols"); +late final _sel_shortStandaloneWeekdaySymbols = + objc.registerName("shortStandaloneWeekdaySymbols"); +late final _sel_veryShortStandaloneWeekdaySymbols = + objc.registerName("veryShortStandaloneWeekdaySymbols"); late final _sel_quarterSymbols = objc.registerName("quarterSymbols"); late final _sel_shortQuarterSymbols = objc.registerName("shortQuarterSymbols"); -late final _sel_standaloneQuarterSymbols = objc.registerName("standaloneQuarterSymbols"); -late final _sel_shortStandaloneQuarterSymbols = objc.registerName("shortStandaloneQuarterSymbols"); +late final _sel_standaloneQuarterSymbols = + objc.registerName("standaloneQuarterSymbols"); +late final _sel_shortStandaloneQuarterSymbols = + objc.registerName("shortStandaloneQuarterSymbols"); late final _sel_AMSymbol = objc.registerName("AMSymbol"); late final _sel_PMSymbol = objc.registerName("PMSymbol"); + enum NSCalendarUnit { NSCalendarUnitEra(2), NSCalendarUnitYear(4), @@ -3243,7 +5582,8 @@ enum NSCalendarUnit { static const NSQuarterCalendarUnit = NSCalendarUnitQuarter; static const NSWeekOfMonthCalendarUnit = NSCalendarUnitWeekOfMonth; static const NSWeekOfYearCalendarUnit = NSCalendarUnitWeekOfYear; - static const NSYearForWeekOfYearCalendarUnit = NSCalendarUnitYearForWeekOfYear; + static const NSYearForWeekOfYearCalendarUnit = + NSCalendarUnitYearForWeekOfYear; static const NSCalendarCalendarUnit = NSCalendarUnitCalendar; static const NSTimeZoneCalendarUnit = NSCalendarUnitTimeZone; @@ -3251,63 +5591,170 @@ enum NSCalendarUnit { const NSCalendarUnit(this.value); static NSCalendarUnit fromValue(int value) => switch (value) { - 2 => NSCalendarUnitEra, - 4 => NSCalendarUnitYear, - 8 => NSCalendarUnitMonth, - 16 => NSCalendarUnitDay, - 32 => NSCalendarUnitHour, - 64 => NSCalendarUnitMinute, - 128 => NSCalendarUnitSecond, - 512 => NSCalendarUnitWeekday, - 1024 => NSCalendarUnitWeekdayOrdinal, - 2048 => NSCalendarUnitQuarter, - 4096 => NSCalendarUnitWeekOfMonth, - 8192 => NSCalendarUnitWeekOfYear, - 16384 => NSCalendarUnitYearForWeekOfYear, - 32768 => NSCalendarUnitNanosecond, - 1048576 => NSCalendarUnitCalendar, - 2097152 => NSCalendarUnitTimeZone, - 256 => NSWeekCalendarUnit, - _ => throw ArgumentError("Unknown value for NSCalendarUnit: $value"), - }; + 2 => NSCalendarUnitEra, + 4 => NSCalendarUnitYear, + 8 => NSCalendarUnitMonth, + 16 => NSCalendarUnitDay, + 32 => NSCalendarUnitHour, + 64 => NSCalendarUnitMinute, + 128 => NSCalendarUnitSecond, + 512 => NSCalendarUnitWeekday, + 1024 => NSCalendarUnitWeekdayOrdinal, + 2048 => NSCalendarUnitQuarter, + 4096 => NSCalendarUnitWeekOfMonth, + 8192 => NSCalendarUnitWeekOfYear, + 16384 => NSCalendarUnitYearForWeekOfYear, + 32768 => NSCalendarUnitNanosecond, + 1048576 => NSCalendarUnitCalendar, + 2097152 => NSCalendarUnitTimeZone, + 256 => NSWeekCalendarUnit, + _ => throw ArgumentError("Unknown value for NSCalendarUnit: $value"), + }; @override String toString() { - if (this == NSCalendarUnitEra) return "NSCalendarUnit.NSCalendarUnitEra, NSCalendarUnit.NSEraCalendarUnit"; - if (this == NSCalendarUnitYear) return "NSCalendarUnit.NSCalendarUnitYear, NSCalendarUnit.NSYearCalendarUnit"; - if (this == NSCalendarUnitMonth) return "NSCalendarUnit.NSCalendarUnitMonth, NSCalendarUnit.NSMonthCalendarUnit"; - if (this == NSCalendarUnitDay) return "NSCalendarUnit.NSCalendarUnitDay, NSCalendarUnit.NSDayCalendarUnit"; - if (this == NSCalendarUnitHour) return "NSCalendarUnit.NSCalendarUnitHour, NSCalendarUnit.NSHourCalendarUnit"; - if (this == NSCalendarUnitMinute) return "NSCalendarUnit.NSCalendarUnitMinute, NSCalendarUnit.NSMinuteCalendarUnit"; - if (this == NSCalendarUnitSecond) return "NSCalendarUnit.NSCalendarUnitSecond, NSCalendarUnit.NSSecondCalendarUnit"; - if (this == NSCalendarUnitWeekday) return "NSCalendarUnit.NSCalendarUnitWeekday, NSCalendarUnit.NSWeekdayCalendarUnit"; - if (this == NSCalendarUnitWeekdayOrdinal) return "NSCalendarUnit.NSCalendarUnitWeekdayOrdinal, NSCalendarUnit.NSWeekdayOrdinalCalendarUnit"; - if (this == NSCalendarUnitQuarter) return "NSCalendarUnit.NSCalendarUnitQuarter, NSCalendarUnit.NSQuarterCalendarUnit"; - if (this == NSCalendarUnitWeekOfMonth) return "NSCalendarUnit.NSCalendarUnitWeekOfMonth, NSCalendarUnit.NSWeekOfMonthCalendarUnit"; - if (this == NSCalendarUnitWeekOfYear) return "NSCalendarUnit.NSCalendarUnitWeekOfYear, NSCalendarUnit.NSWeekOfYearCalendarUnit"; - if (this == NSCalendarUnitYearForWeekOfYear) return "NSCalendarUnit.NSCalendarUnitYearForWeekOfYear, NSCalendarUnit.NSYearForWeekOfYearCalendarUnit"; - if (this == NSCalendarUnitCalendar) return "NSCalendarUnit.NSCalendarUnitCalendar, NSCalendarUnit.NSCalendarCalendarUnit"; - if (this == NSCalendarUnitTimeZone) return "NSCalendarUnit.NSCalendarUnitTimeZone, NSCalendarUnit.NSTimeZoneCalendarUnit"; + if (this == NSCalendarUnitEra) + return "NSCalendarUnit.NSCalendarUnitEra, NSCalendarUnit.NSEraCalendarUnit"; + if (this == NSCalendarUnitYear) + return "NSCalendarUnit.NSCalendarUnitYear, NSCalendarUnit.NSYearCalendarUnit"; + if (this == NSCalendarUnitMonth) + return "NSCalendarUnit.NSCalendarUnitMonth, NSCalendarUnit.NSMonthCalendarUnit"; + if (this == NSCalendarUnitDay) + return "NSCalendarUnit.NSCalendarUnitDay, NSCalendarUnit.NSDayCalendarUnit"; + if (this == NSCalendarUnitHour) + return "NSCalendarUnit.NSCalendarUnitHour, NSCalendarUnit.NSHourCalendarUnit"; + if (this == NSCalendarUnitMinute) + return "NSCalendarUnit.NSCalendarUnitMinute, NSCalendarUnit.NSMinuteCalendarUnit"; + if (this == NSCalendarUnitSecond) + return "NSCalendarUnit.NSCalendarUnitSecond, NSCalendarUnit.NSSecondCalendarUnit"; + if (this == NSCalendarUnitWeekday) + return "NSCalendarUnit.NSCalendarUnitWeekday, NSCalendarUnit.NSWeekdayCalendarUnit"; + if (this == NSCalendarUnitWeekdayOrdinal) + return "NSCalendarUnit.NSCalendarUnitWeekdayOrdinal, NSCalendarUnit.NSWeekdayOrdinalCalendarUnit"; + if (this == NSCalendarUnitQuarter) + return "NSCalendarUnit.NSCalendarUnitQuarter, NSCalendarUnit.NSQuarterCalendarUnit"; + if (this == NSCalendarUnitWeekOfMonth) + return "NSCalendarUnit.NSCalendarUnitWeekOfMonth, NSCalendarUnit.NSWeekOfMonthCalendarUnit"; + if (this == NSCalendarUnitWeekOfYear) + return "NSCalendarUnit.NSCalendarUnitWeekOfYear, NSCalendarUnit.NSWeekOfYearCalendarUnit"; + if (this == NSCalendarUnitYearForWeekOfYear) + return "NSCalendarUnit.NSCalendarUnitYearForWeekOfYear, NSCalendarUnit.NSYearForWeekOfYearCalendarUnit"; + if (this == NSCalendarUnitCalendar) + return "NSCalendarUnit.NSCalendarUnitCalendar, NSCalendarUnit.NSCalendarCalendarUnit"; + if (this == NSCalendarUnitTimeZone) + return "NSCalendarUnit.NSCalendarUnitTimeZone, NSCalendarUnit.NSTimeZoneCalendarUnit"; return super.toString(); - }} + } +} late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); -final _objc_msgSend_8biqtb = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -final _objc_msgSend_8biqtbStret = objc.msgSendStretPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); +final _objc_msgSend_8biqtb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_8biqtbStret = objc.msgSendStretPointer + .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_maximumRangeOfUnit_ = objc.registerName("maximumRangeOfUnit:"); -late final _sel_rangeOfUnit_inUnit_forDate_ = objc.registerName("rangeOfUnit:inUnit:forDate:"); -final _objc_msgSend_1lmqh7m = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , int , int , ffi.Pointer )>(); -final _objc_msgSend_1lmqh7mStret = objc.msgSendStretPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , int , int , ffi.Pointer )>(); -late final _sel_ordinalityOfUnit_inUnit_forDate_ = objc.registerName("ordinalityOfUnit:inUnit:forDate:"); -final _objc_msgSend_1bi4n7h = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , int , int , ffi.Pointer )>(); -late final _sel_rangeOfUnit_startDate_interval_forDate_ = objc.registerName("rangeOfUnit:startDate:interval:forDate:"); -final _objc_msgSend_amvrpq = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , int , ffi.Pointer> , ffi.Pointer , ffi.Pointer )>(); +late final _sel_rangeOfUnit_inUnit_forDate_ = + objc.registerName("rangeOfUnit:inUnit:forDate:"); +final _objc_msgSend_1lmqh7m = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +final _objc_msgSend_1lmqh7mStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_ordinalityOfUnit_inUnit_forDate_ = + objc.registerName("ordinalityOfUnit:inUnit:forDate:"); +final _objc_msgSend_1bi4n7h = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_rangeOfUnit_startDate_interval_forDate_ = + objc.registerName("rangeOfUnit:startDate:interval:forDate:"); +final _objc_msgSend_amvrpq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); late final _class_NSDateComponents = objc.getClass("NSDateComponents"); late final _sel_calendar = objc.registerName("calendar"); late final _sel_setCalendar_ = objc.registerName("setCalendar:"); late final _sel_era = objc.registerName("era"); late final _sel_setEra_ = objc.registerName("setEra:"); -final _objc_msgSend_ke7qz2 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Long )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_ke7qz2 = 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_year = objc.registerName("year"); late final _sel_setYear_ = objc.registerName("setYear:"); late final _sel_month = objc.registerName("month"); @@ -3333,289 +5780,282 @@ late final _sel_setWeekOfMonth_ = objc.registerName("setWeekOfMonth:"); late final _sel_weekOfYear = objc.registerName("weekOfYear"); late final _sel_setWeekOfYear_ = objc.registerName("setWeekOfYear:"); late final _sel_yearForWeekOfYear = objc.registerName("yearForWeekOfYear"); -late final _sel_setYearForWeekOfYear_ = objc.registerName("setYearForWeekOfYear:"); +late final _sel_setYearForWeekOfYear_ = + objc.registerName("setYearForWeekOfYear:"); late final _sel_isLeapMonth = objc.registerName("isLeapMonth"); late final _sel_setLeapMonth_ = objc.registerName("setLeapMonth:"); late final _sel_date = objc.registerName("date"); late final _sel_week = objc.registerName("week"); late final _sel_setWeek_ = objc.registerName("setWeek:"); -late final _sel_setValue_forComponent_ = objc.registerName("setValue:forComponent:"); -final _objc_msgSend_13g4496 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Long , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int , int )>(); +late final _sel_setValue_forComponent_ = + objc.registerName("setValue:forComponent:"); +final _objc_msgSend_13g4496 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); -final _objc_msgSend_1uobo2v = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_1uobo2v = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_isValidDate = objc.registerName("isValidDate"); -late final _sel_isValidDateInCalendar_ = objc.registerName("isValidDateInCalendar:"); +late final _sel_isValidDateInCalendar_ = + objc.registerName("isValidDateInCalendar:"); /// NSDateComponents class NSDateComponents extends objc.NSObject { NSDateComponents._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSDateComponents] that points to the same underlying object as [other]. - NSDateComponents.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSDateComponents.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSDateComponents] that wraps the given raw object pointer. NSDateComponents.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSDateComponents]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateComponents); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateComponents); } /// calendar NSCalendar? get calendar { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_calendar); - return _ret.address == 0 ? null : NSCalendar.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } /// setCalendar: - set calendar(NSCalendar? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCalendar_, value?.ref.pointer ?? ffi.nullptr); - + set calendar(NSCalendar? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCalendar_, value?.ref.pointer ?? ffi.nullptr); } /// timeZone NSTimeZone? get timeZone { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_timeZone); - return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// setTimeZone: - set timeZone(NSTimeZone? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTimeZone_, value?.ref.pointer ?? ffi.nullptr); - + set timeZone(NSTimeZone? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTimeZone_, value?.ref.pointer ?? ffi.nullptr); } /// era int get era { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_era); - } /// setEra: - set era(int value) { + set era(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setEra_, value); - } /// year int get year { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_year); - } /// setYear: - set year(int value) { + set year(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setYear_, value); - } /// month int get month { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_month); - } /// setMonth: - set month(int value) { + set month(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setMonth_, value); - } /// day int get day { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_day); - } /// setDay: - set day(int value) { + set day(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setDay_, value); - } /// hour int get hour { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_hour); - } /// setHour: - set hour(int value) { + set hour(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setHour_, value); - } /// minute int get minute { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_minute); - } /// setMinute: - set minute(int value) { + set minute(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setMinute_, value); - } /// second int get second { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_second); - } /// setSecond: - set second(int value) { + set second(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setSecond_, value); - } /// nanosecond int get nanosecond { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_nanosecond); - } /// setNanosecond: - set nanosecond(int value) { + set nanosecond(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setNanosecond_, value); - } /// weekday int get weekday { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekday); - } /// setWeekday: - set weekday(int value) { + set weekday(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeekday_, value); - } /// weekdayOrdinal int get weekdayOrdinal { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekdayOrdinal); - } /// setWeekdayOrdinal: - set weekdayOrdinal(int value) { - return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeekdayOrdinal_, value); - + set weekdayOrdinal(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setWeekdayOrdinal_, value); } /// quarter int get quarter { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_quarter); - } /// setQuarter: - set quarter(int value) { + set quarter(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setQuarter_, value); - } /// weekOfMonth int get weekOfMonth { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekOfMonth); - } /// setWeekOfMonth: - set weekOfMonth(int value) { + set weekOfMonth(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeekOfMonth_, value); - } /// weekOfYear int get weekOfYear { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_weekOfYear); - } /// setWeekOfYear: - set weekOfYear(int value) { + set weekOfYear(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeekOfYear_, value); - } /// yearForWeekOfYear int get yearForWeekOfYear { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_yearForWeekOfYear); - } /// setYearForWeekOfYear: - set yearForWeekOfYear(int value) { - return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setYearForWeekOfYear_, value); - + set yearForWeekOfYear(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setYearForWeekOfYear_, value); } /// isLeapMonth bool get leapMonth { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLeapMonth); - } /// setLeapMonth: - set leapMonth(bool value) { + set leapMonth(bool value) { return _objc_msgSend_117qins(this.ref.pointer, _sel_setLeapMonth_, value); - } /// date objc.NSDate? get date { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_date); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// week int week() { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_week); - } /// setWeek: void setWeek_(int v) { -_objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeek_, v); - + _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setWeek_, v); } /// setValue:forComponent: void setValue_forComponent_(int value, NSCalendarUnit unit) { -_objc_msgSend_13g4496(this.ref.pointer, _sel_setValue_forComponent_, value, unit.value); - + _objc_msgSend_13g4496( + this.ref.pointer, _sel_setValue_forComponent_, value, unit.value); } /// valueForComponent: int valueForComponent_(NSCalendarUnit unit) { - return _objc_msgSend_1uobo2v(this.ref.pointer, _sel_valueForComponent_, unit.value); - + return _objc_msgSend_1uobo2v( + this.ref.pointer, _sel_valueForComponent_, unit.value); } /// isValidDate bool get validDate { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValidDate); - } /// isValidDateInCalendar: bool isValidDateInCalendar_(NSCalendar calendar) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isValidDateInCalendar_, calendar.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isValidDateInCalendar_, calendar.ref.pointer); } /// init NSDateComponents init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } @@ -3627,7 +6067,8 @@ _objc_msgSend_13g4496(this.ref.pointer, _sel_setValue_forComponent_, value, unit /// allocWithZone: static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSDateComponents, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDateComponents, _sel_allocWithZone_, zone); return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } @@ -3638,56 +6079,71 @@ _objc_msgSend_13g4496(this.ref.pointer, _sel_setValue_forComponent_, value, unit } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSDateComponents, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSDateComponents, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSDateComponents, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSDateComponents, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSDateComponents, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSDateComponents, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSDateComponents, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSDateComponents, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSDateComponents, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSDateComponents, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSDateComponents, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSDateComponents, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSDateComponents, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDateComponents, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateComponents, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -3711,26 +6167,44 @@ _objc_msgSend_1tjlcwl(_class_NSDateComponents, _sel_setKeys_triggerChangeNotific /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSDateComponents, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSDateComponents, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSDateComponents? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSDateComponents.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDateComponents.castFromPointer(_ret, retain: false, release: true); } } late final _sel_dateFromComponents_ = objc.registerName("dateFromComponents:"); -late final _sel_components_fromDate_ = objc.registerName("components:fromDate:"); -final _objc_msgSend_t9w2ff = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); +late final _sel_components_fromDate_ = + objc.registerName("components:fromDate:"); +final _objc_msgSend_t9w2ff = 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)>(); + enum NSCalendarOptions { NSCalendarWrapComponents(1), NSCalendarMatchStrictly(2), @@ -3741,96 +6215,357 @@ enum NSCalendarOptions { NSCalendarMatchFirst(4096), NSCalendarMatchLast(8192); - final int value; const NSCalendarOptions(this.value); static NSCalendarOptions fromValue(int value) => switch (value) { - 1 => NSCalendarWrapComponents, - 2 => NSCalendarMatchStrictly, - 4 => NSCalendarSearchBackwards, - 256 => NSCalendarMatchPreviousTimePreservingSmallerUnits, - 512 => NSCalendarMatchNextTimePreservingSmallerUnits, - 1024 => NSCalendarMatchNextTime, - 4096 => NSCalendarMatchFirst, - 8192 => NSCalendarMatchLast, - _ => throw ArgumentError("Unknown value for NSCalendarOptions: $value"), - }; - -} - -late final _sel_dateByAddingComponents_toDate_options_ = objc.registerName("dateByAddingComponents:toDate:options:"); -final _objc_msgSend_2sm1zi = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_components_fromDate_toDate_options_ = objc.registerName("components:fromDate:toDate:options:"); -final _objc_msgSend_1jc93x2 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_getEra_year_month_day_fromDate_ = objc.registerName("getEra:year:month:day:fromDate:"); -final _objc_msgSend_1ermmsa = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_ = objc.registerName("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); -late final _sel_getHour_minute_second_nanosecond_fromDate_ = objc.registerName("getHour:minute:second:nanosecond:fromDate:"); + 1 => NSCalendarWrapComponents, + 2 => NSCalendarMatchStrictly, + 4 => NSCalendarSearchBackwards, + 256 => NSCalendarMatchPreviousTimePreservingSmallerUnits, + 512 => NSCalendarMatchNextTimePreservingSmallerUnits, + 1024 => NSCalendarMatchNextTime, + 4096 => NSCalendarMatchFirst, + 8192 => NSCalendarMatchLast, + _ => throw ArgumentError("Unknown value for NSCalendarOptions: $value"), + }; +} + +late final _sel_dateByAddingComponents_toDate_options_ = + objc.registerName("dateByAddingComponents:toDate:options:"); +final _objc_msgSend_2sm1zi = 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_components_fromDate_toDate_options_ = + objc.registerName("components:fromDate:toDate:options:"); +final _objc_msgSend_1jc93x2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_getEra_year_month_day_fromDate_ = + objc.registerName("getEra:year:month:day:fromDate:"); +final _objc_msgSend_1ermmsa = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + 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, + ffi.Pointer)>(); +late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_ = + objc.registerName("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); +late final _sel_getHour_minute_second_nanosecond_fromDate_ = + objc.registerName("getHour:minute:second:nanosecond:fromDate:"); late final _sel_component_fromDate_ = objc.registerName("component:fromDate:"); -final _objc_msgSend_tm9h70 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_ = objc.registerName("dateWithEra:year:month:day:hour:minute:second:nanosecond:"); -final _objc_msgSend_1747i7s = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Long , ffi.Long , ffi.Long , ffi.Long , ffi.Long , ffi.Long , ffi.Long , ffi.Long )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , int , int , int , int , int , int , int )>(); -late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_ = objc.registerName("dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); +final _objc_msgSend_tm9h70 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_ = objc + .registerName("dateWithEra:year:month:day:hour:minute:second:nanosecond:"); +final _objc_msgSend_1747i7s = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int, + int, + int, + int, + int)>(); +late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_ = + objc.registerName( + "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); late final _sel_startOfDayForDate_ = objc.registerName("startOfDayForDate:"); -late final _sel_componentsInTimeZone_fromDate_ = objc.registerName("componentsInTimeZone:fromDate:"); -late final _sel_compareDate_toDate_toUnitGranularity_ = objc.registerName("compareDate:toDate:toUnitGranularity:"); -final _objc_msgSend_jpc2bg = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_isDate_equalToDate_toUnitGranularity_ = objc.registerName("isDate:equalToDate:toUnitGranularity:"); -final _objc_msgSend_188aig1 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_isDate_inSameDayAsDate_ = objc.registerName("isDate:inSameDayAsDate:"); -final _objc_msgSend_1ywe6ev = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); +late final _sel_componentsInTimeZone_fromDate_ = + objc.registerName("componentsInTimeZone:fromDate:"); +late final _sel_compareDate_toDate_toUnitGranularity_ = + objc.registerName("compareDate:toDate:toUnitGranularity:"); +final _objc_msgSend_jpc2bg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_equalToDate_toUnitGranularity_ = + objc.registerName("isDate:equalToDate:toUnitGranularity:"); +final _objc_msgSend_188aig1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_inSameDayAsDate_ = + objc.registerName("isDate:inSameDayAsDate:"); +final _objc_msgSend_1ywe6ev = 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_isDateInToday_ = objc.registerName("isDateInToday:"); late final _sel_isDateInYesterday_ = objc.registerName("isDateInYesterday:"); late final _sel_isDateInTomorrow_ = objc.registerName("isDateInTomorrow:"); late final _sel_isDateInWeekend_ = objc.registerName("isDateInWeekend:"); -late final _sel_rangeOfWeekendStartDate_interval_containingDate_ = objc.registerName("rangeOfWeekendStartDate:interval:containingDate:"); -final _objc_msgSend_seipso = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.Pointer )>(); -late final _sel_nextWeekendStartDate_interval_options_afterDate_ = objc.registerName("nextWeekendStartDate:interval:options:afterDate:"); -final _objc_msgSend_1brdgri = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer> , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer> , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_components_fromDateComponents_toDateComponents_options_ = objc.registerName("components:fromDateComponents:toDateComponents:options:"); -late final _sel_dateByAddingUnit_value_toDate_options_ = objc.registerName("dateByAddingUnit:value:toDate:options:"); -final _objc_msgSend_b1fge4 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Long , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , int , ffi.Pointer , int )>(); -void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.Bool arg1, ffi.Pointer arg2)>>() - .asFunction , bool , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Bool , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer , bool , ffi.Pointer ))(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Bool , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , bool , ffi.Pointer ))(arg0, arg1, arg2); +late final _sel_rangeOfWeekendStartDate_interval_containingDate_ = + objc.registerName("rangeOfWeekendStartDate:interval:containingDate:"); +final _objc_msgSend_seipso = 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_nextWeekendStartDate_interval_options_afterDate_ = + objc.registerName("nextWeekendStartDate:interval:options:afterDate:"); +final _objc_msgSend_1brdgri = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_components_fromDateComponents_toDateComponents_options_ = objc + .registerName("components:fromDateComponents:toDateComponents:options:"); +late final _sel_dateByAddingUnit_value_toDate_options_ = + objc.registerName("dateByAddingUnit:value:toDate:options:"); +final _objc_msgSend_b1fge4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Long, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int)>(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Bool , ffi.Pointer )> _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Bool , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiVoid_NSDate_bool_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + objc.NSDate?, ffi.Bool, ffi.Pointer)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(void Function(objc.NSDate? , bool , ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSDate_bool_bool_closureCallable, (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: true, release: true), arg1, arg2)), - retain: false, release: true); + static objc.ObjCBlock)> fromFunction( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureCallable, + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : objc.NSDate.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -3841,52 +6576,161 @@ abstract final class ObjCBlock_ffiVoid_NSDate_bool_bool { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock)> listener(void Function(objc.NSDate? , bool , ffi.Pointer ) fn) { + static objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + listener(void Function(objc.NSDate?, bool, ffi.Pointer) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: false, release: true), arg1, arg2)); + _ObjCBlock_ffiVoid_NSDate_bool_bool_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSDate.castFromPointer(arg0, + retain: false, release: true), + arg1, + arg2)); final wrapper = _wrapListenerBlock_rvgf02(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, + ffi.Pointer)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSDate_bool_bool_CallExtension on objc.ObjCBlock)> { - void call(objc.NSDate? arg0, bool arg1, ffi.Pointer arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , bool , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1, arg2); -} - -late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = objc.registerName("enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); -final _objc_msgSend_z9v2cv = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_nextDateAfterDate_matchingComponents_options_ = objc.registerName("nextDateAfterDate:matchingComponents:options:"); -late final _sel_nextDateAfterDate_matchingUnit_value_options_ = objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); -final _objc_msgSend_1im3h6w = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Long , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , int , int )>(); -late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); -final _objc_msgSend_tio5o0 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Long , ffi.Long , ffi.Long , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , int , int , int )>(); -late final _sel_dateBySettingUnit_value_ofDate_options_ = objc.registerName("dateBySettingUnit:value:ofDate:options:"); -late final _sel_dateBySettingHour_minute_second_ofDate_options_ = objc.registerName("dateBySettingHour:minute:second:ofDate:options:"); -final _objc_msgSend_16h627a = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Long , ffi.Long , ffi.Long , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , int , int , ffi.Pointer , int )>(); -late final _sel_date_matchesComponents_ = objc.registerName("date:matchesComponents:"); +extension ObjCBlock_ffiVoid_NSDate_bool_bool_CallExtension on objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> { + void call(objc.NSDate? arg0, bool arg1, ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = + objc.registerName( + "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); +final _objc_msgSend_z9v2cv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_nextDateAfterDate_matchingComponents_options_ = + objc.registerName("nextDateAfterDate:matchingComponents:options:"); +late final _sel_nextDateAfterDate_matchingUnit_value_options_ = + objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); +final _objc_msgSend_1im3h6w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Long, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>(); +late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = + objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); +final _objc_msgSend_tio5o0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int)>(); +late final _sel_dateBySettingUnit_value_ofDate_options_ = + objc.registerName("dateBySettingUnit:value:ofDate:options:"); +late final _sel_dateBySettingHour_minute_second_ofDate_options_ = + objc.registerName("dateBySettingHour:minute:second:ofDate:options:"); +final _objc_msgSend_16h627a = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + ffi.Pointer, + int)>(); +late final _sel_date_matchesComponents_ = + objc.registerName("date:matchesComponents:"); /// NSCalendar class NSCalendar extends objc.NSObject { NSCalendar._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSCalendar] that points to the same underlying object as [other]. - NSCalendar.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSCalendar.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSCalendar] that wraps the given raw object pointer. NSCalendar.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSCalendar]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSCalendar); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSCalendar); } /// currentCalendar @@ -3897,44 +6741,56 @@ class NSCalendar extends objc.NSObject { /// autoupdatingCurrentCalendar static NSCalendar getAutoupdatingCurrentCalendar() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); + final _ret = _objc_msgSend_1unuoxw( + _class_NSCalendar, _sel_autoupdatingCurrentCalendar); return NSCalendar.castFromPointer(_ret, retain: true, release: true); } /// calendarWithIdentifier: - static NSCalendar? calendarWithIdentifier_(objc.NSString calendarIdentifierConstant) { - final _ret = _objc_msgSend_juohf7(_class_NSCalendar, _sel_calendarWithIdentifier_, calendarIdentifierConstant.ref.pointer); - return _ret.address == 0 ? null : NSCalendar.castFromPointer(_ret, retain: true, release: true); + static NSCalendar? calendarWithIdentifier_( + objc.NSString calendarIdentifierConstant) { + final _ret = _objc_msgSend_juohf7(_class_NSCalendar, + _sel_calendarWithIdentifier_, calendarIdentifierConstant.ref.pointer); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } /// init NSCalendar init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSCalendar.castFromPointer(_ret, retain: false, release: true); } /// initWithCalendarIdentifier: objc.ObjCObjectBase? initWithCalendarIdentifier_(objc.NSString ident) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCalendarIdentifier_, ident.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCalendarIdentifier_, ident.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); } /// calendarIdentifier objc.NSString get calendarIdentifier { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_calendarIdentifier); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_calendarIdentifier); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// locale objc.NSLocale? get locale { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_locale); - return _ret.address == 0 ? null : objc.NSLocale.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } /// setLocale: - set locale(objc.NSLocale? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocale_, value?.ref.pointer ?? ffi.nullptr); - + set locale(objc.NSLocale? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value?.ref.pointer ?? ffi.nullptr); } /// timeZone @@ -3944,33 +6800,31 @@ class NSCalendar extends objc.NSObject { } /// setTimeZone: - set timeZone(NSTimeZone value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTimeZone_, value.ref.pointer); - + set timeZone(NSTimeZone value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTimeZone_, value.ref.pointer); } /// firstWeekday int get firstWeekday { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_firstWeekday); - } /// setFirstWeekday: - set firstWeekday(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setFirstWeekday_, value); - + set firstWeekday(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setFirstWeekday_, value); } /// minimumDaysInFirstWeek int get minimumDaysInFirstWeek { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_minimumDaysInFirstWeek); - } /// setMinimumDaysInFirstWeek: - set minimumDaysInFirstWeek(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMinimumDaysInFirstWeek_, value); - + set minimumDaysInFirstWeek(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumDaysInFirstWeek_, value); } /// eraSymbols @@ -3993,31 +6847,36 @@ class NSCalendar extends objc.NSObject { /// shortMonthSymbols objc.NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortMonthSymbols objc.NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// standaloneMonthSymbols objc.NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortStandaloneMonthSymbols objc.NSArray get shortStandaloneMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortStandaloneMonthSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortStandaloneMonthSymbols objc.NSArray get veryShortStandaloneMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortStandaloneMonthSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -4029,31 +6888,36 @@ class NSCalendar extends objc.NSObject { /// shortWeekdaySymbols objc.NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortWeekdaySymbols objc.NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// standaloneWeekdaySymbols objc.NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortStandaloneWeekdaySymbols objc.NSArray get shortStandaloneWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortStandaloneWeekdaySymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// veryShortStandaloneWeekdaySymbols objc.NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortStandaloneWeekdaySymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -4065,19 +6929,22 @@ class NSCalendar extends objc.NSObject { /// shortQuarterSymbols objc.NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortQuarterSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// standaloneQuarterSymbols objc.NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneQuarterSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// shortStandaloneQuarterSymbols objc.NSArray get shortStandaloneQuarterSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortStandaloneQuarterSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -4096,223 +6963,469 @@ class NSCalendar extends objc.NSObject { /// minimumRangeOfUnit: objc.NSRange minimumRangeOfUnit_(NSCalendarUnit unit) { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_8biqtbStret(_ptr, this.ref.pointer, _sel_minimumRangeOfUnit_, unit.value) : _ptr.ref = _objc_msgSend_8biqtb(this.ref.pointer, _sel_minimumRangeOfUnit_, unit.value); + objc.useMsgSendVariants + ? _objc_msgSend_8biqtbStret( + _ptr, this.ref.pointer, _sel_minimumRangeOfUnit_, unit.value) + : _ptr.ref = _objc_msgSend_8biqtb( + this.ref.pointer, _sel_minimumRangeOfUnit_, unit.value); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// maximumRangeOfUnit: objc.NSRange maximumRangeOfUnit_(NSCalendarUnit unit) { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_8biqtbStret(_ptr, this.ref.pointer, _sel_maximumRangeOfUnit_, unit.value) : _ptr.ref = _objc_msgSend_8biqtb(this.ref.pointer, _sel_maximumRangeOfUnit_, unit.value); + objc.useMsgSendVariants + ? _objc_msgSend_8biqtbStret( + _ptr, this.ref.pointer, _sel_maximumRangeOfUnit_, unit.value) + : _ptr.ref = _objc_msgSend_8biqtb( + this.ref.pointer, _sel_maximumRangeOfUnit_, unit.value); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// rangeOfUnit:inUnit:forDate: - objc.NSRange rangeOfUnit_inUnit_forDate_(NSCalendarUnit smaller, NSCalendarUnit larger, objc.NSDate date) { + objc.NSRange rangeOfUnit_inUnit_forDate_( + NSCalendarUnit smaller, NSCalendarUnit larger, objc.NSDate date) { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_1lmqh7mStret(_ptr, this.ref.pointer, _sel_rangeOfUnit_inUnit_forDate_, smaller.value, larger.value, date.ref.pointer) : _ptr.ref = _objc_msgSend_1lmqh7m(this.ref.pointer, _sel_rangeOfUnit_inUnit_forDate_, smaller.value, larger.value, date.ref.pointer); + objc.useMsgSendVariants + ? _objc_msgSend_1lmqh7mStret( + _ptr, + this.ref.pointer, + _sel_rangeOfUnit_inUnit_forDate_, + smaller.value, + larger.value, + date.ref.pointer) + : _ptr.ref = _objc_msgSend_1lmqh7m( + this.ref.pointer, + _sel_rangeOfUnit_inUnit_forDate_, + smaller.value, + larger.value, + date.ref.pointer); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// ordinalityOfUnit:inUnit:forDate: - int ordinalityOfUnit_inUnit_forDate_(NSCalendarUnit smaller, NSCalendarUnit larger, objc.NSDate date) { - return _objc_msgSend_1bi4n7h(this.ref.pointer, _sel_ordinalityOfUnit_inUnit_forDate_, smaller.value, larger.value, date.ref.pointer); - + int ordinalityOfUnit_inUnit_forDate_( + NSCalendarUnit smaller, NSCalendarUnit larger, objc.NSDate date) { + return _objc_msgSend_1bi4n7h( + this.ref.pointer, + _sel_ordinalityOfUnit_inUnit_forDate_, + smaller.value, + larger.value, + date.ref.pointer); } /// rangeOfUnit:startDate:interval:forDate: - bool rangeOfUnit_startDate_interval_forDate_(NSCalendarUnit unit, ffi.Pointer> datep, ffi.Pointer tip, objc.NSDate date) { - return _objc_msgSend_amvrpq(this.ref.pointer, _sel_rangeOfUnit_startDate_interval_forDate_, unit.value, datep, tip, date.ref.pointer); - + bool rangeOfUnit_startDate_interval_forDate_( + NSCalendarUnit unit, + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_amvrpq( + this.ref.pointer, + _sel_rangeOfUnit_startDate_interval_forDate_, + unit.value, + datep, + tip, + date.ref.pointer); } /// dateFromComponents: objc.NSDate? dateFromComponents_(NSDateComponents comps) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_dateFromComponents_, comps.ref.pointer); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dateFromComponents_, comps.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// components:fromDate: - NSDateComponents components_fromDate_(NSCalendarUnit unitFlags, objc.NSDate date) { - final _ret = _objc_msgSend_t9w2ff(this.ref.pointer, _sel_components_fromDate_, unitFlags.value, date.ref.pointer); + NSDateComponents components_fromDate_( + NSCalendarUnit unitFlags, objc.NSDate date) { + final _ret = _objc_msgSend_t9w2ff(this.ref.pointer, + _sel_components_fromDate_, unitFlags.value, date.ref.pointer); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } /// dateByAddingComponents:toDate:options: - objc.NSDate? dateByAddingComponents_toDate_options_(NSDateComponents comps, objc.NSDate date, NSCalendarOptions opts) { - final _ret = _objc_msgSend_2sm1zi(this.ref.pointer, _sel_dateByAddingComponents_toDate_options_, comps.ref.pointer, date.ref.pointer, opts.value); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? dateByAddingComponents_toDate_options_( + NSDateComponents comps, objc.NSDate date, NSCalendarOptions opts) { + final _ret = _objc_msgSend_2sm1zi( + this.ref.pointer, + _sel_dateByAddingComponents_toDate_options_, + comps.ref.pointer, + date.ref.pointer, + opts.value); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// components:fromDate:toDate:options: - NSDateComponents components_fromDate_toDate_options_(NSCalendarUnit unitFlags, objc.NSDate startingDate, objc.NSDate resultDate, NSCalendarOptions opts) { - final _ret = _objc_msgSend_1jc93x2(this.ref.pointer, _sel_components_fromDate_toDate_options_, unitFlags.value, startingDate.ref.pointer, resultDate.ref.pointer, opts.value); + NSDateComponents components_fromDate_toDate_options_( + NSCalendarUnit unitFlags, + objc.NSDate startingDate, + objc.NSDate resultDate, + NSCalendarOptions opts) { + final _ret = _objc_msgSend_1jc93x2( + this.ref.pointer, + _sel_components_fromDate_toDate_options_, + unitFlags.value, + startingDate.ref.pointer, + resultDate.ref.pointer, + opts.value); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } /// getEra:year:month:day:fromDate: - void getEra_year_month_day_fromDate_(ffi.Pointer eraValuePointer, ffi.Pointer yearValuePointer, ffi.Pointer monthValuePointer, ffi.Pointer dayValuePointer, objc.NSDate date) { -_objc_msgSend_1ermmsa(this.ref.pointer, _sel_getEra_year_month_day_fromDate_, eraValuePointer, yearValuePointer, monthValuePointer, dayValuePointer, date.ref.pointer); - + void getEra_year_month_day_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer monthValuePointer, + ffi.Pointer dayValuePointer, + objc.NSDate date) { + _objc_msgSend_1ermmsa( + this.ref.pointer, + _sel_getEra_year_month_day_fromDate_, + eraValuePointer, + yearValuePointer, + monthValuePointer, + dayValuePointer, + date.ref.pointer); } /// getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate: - void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_(ffi.Pointer eraValuePointer, ffi.Pointer yearValuePointer, ffi.Pointer weekValuePointer, ffi.Pointer weekdayValuePointer, objc.NSDate date) { -_objc_msgSend_1ermmsa(this.ref.pointer, _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, eraValuePointer, yearValuePointer, weekValuePointer, weekdayValuePointer, date.ref.pointer); - + void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer weekValuePointer, + ffi.Pointer weekdayValuePointer, + objc.NSDate date) { + _objc_msgSend_1ermmsa( + this.ref.pointer, + _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, + eraValuePointer, + yearValuePointer, + weekValuePointer, + weekdayValuePointer, + date.ref.pointer); } /// getHour:minute:second:nanosecond:fromDate: - void getHour_minute_second_nanosecond_fromDate_(ffi.Pointer hourValuePointer, ffi.Pointer minuteValuePointer, ffi.Pointer secondValuePointer, ffi.Pointer nanosecondValuePointer, objc.NSDate date) { -_objc_msgSend_1ermmsa(this.ref.pointer, _sel_getHour_minute_second_nanosecond_fromDate_, hourValuePointer, minuteValuePointer, secondValuePointer, nanosecondValuePointer, date.ref.pointer); - + void getHour_minute_second_nanosecond_fromDate_( + ffi.Pointer hourValuePointer, + ffi.Pointer minuteValuePointer, + ffi.Pointer secondValuePointer, + ffi.Pointer nanosecondValuePointer, + objc.NSDate date) { + _objc_msgSend_1ermmsa( + this.ref.pointer, + _sel_getHour_minute_second_nanosecond_fromDate_, + hourValuePointer, + minuteValuePointer, + secondValuePointer, + nanosecondValuePointer, + date.ref.pointer); } /// component:fromDate: int component_fromDate_(NSCalendarUnit unit, objc.NSDate date) { - return _objc_msgSend_tm9h70(this.ref.pointer, _sel_component_fromDate_, unit.value, date.ref.pointer); - + return _objc_msgSend_tm9h70(this.ref.pointer, _sel_component_fromDate_, + unit.value, date.ref.pointer); } /// dateWithEra:year:month:day:hour:minute:second:nanosecond: - objc.NSDate? dateWithEra_year_month_day_hour_minute_second_nanosecond_(int eraValue, int yearValue, int monthValue, int dayValue, int hourValue, int minuteValue, int secondValue, int nanosecondValue) { - final _ret = _objc_msgSend_1747i7s(this.ref.pointer, _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, eraValue, yearValue, monthValue, dayValue, hourValue, minuteValue, secondValue, nanosecondValue); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? dateWithEra_year_month_day_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int monthValue, + int dayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _objc_msgSend_1747i7s( + this.ref.pointer, + _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, + eraValue, + yearValue, + monthValue, + dayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond: - objc.NSDate? dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_(int eraValue, int yearValue, int weekValue, int weekdayValue, int hourValue, int minuteValue, int secondValue, int nanosecondValue) { - final _ret = _objc_msgSend_1747i7s(this.ref.pointer, _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, eraValue, yearValue, weekValue, weekdayValue, hourValue, minuteValue, secondValue, nanosecondValue); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? + dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int weekValue, + int weekdayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _objc_msgSend_1747i7s( + this.ref.pointer, + _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, + eraValue, + yearValue, + weekValue, + weekdayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// startOfDayForDate: objc.NSDate startOfDayForDate_(objc.NSDate date) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_startOfDayForDate_, date.ref.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_startOfDayForDate_, date.ref.pointer); return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// componentsInTimeZone:fromDate: - NSDateComponents componentsInTimeZone_fromDate_(NSTimeZone timezone, objc.NSDate date) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_componentsInTimeZone_fromDate_, timezone.ref.pointer, date.ref.pointer); + NSDateComponents componentsInTimeZone_fromDate_( + NSTimeZone timezone, objc.NSDate date) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_componentsInTimeZone_fromDate_, + timezone.ref.pointer, + date.ref.pointer); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } /// compareDate:toDate:toUnitGranularity: - objc.NSComparisonResult compareDate_toDate_toUnitGranularity_(objc.NSDate date1, objc.NSDate date2, NSCalendarUnit unit) { - final _ret = _objc_msgSend_jpc2bg(this.ref.pointer, _sel_compareDate_toDate_toUnitGranularity_, date1.ref.pointer, date2.ref.pointer, unit.value); + objc.NSComparisonResult compareDate_toDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, NSCalendarUnit unit) { + final _ret = _objc_msgSend_jpc2bg( + this.ref.pointer, + _sel_compareDate_toDate_toUnitGranularity_, + date1.ref.pointer, + date2.ref.pointer, + unit.value); return objc.NSComparisonResult.fromValue(_ret); } /// isDate:equalToDate:toUnitGranularity: - bool isDate_equalToDate_toUnitGranularity_(objc.NSDate date1, objc.NSDate date2, NSCalendarUnit unit) { - return _objc_msgSend_188aig1(this.ref.pointer, _sel_isDate_equalToDate_toUnitGranularity_, date1.ref.pointer, date2.ref.pointer, unit.value); - + bool isDate_equalToDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, NSCalendarUnit unit) { + return _objc_msgSend_188aig1( + this.ref.pointer, + _sel_isDate_equalToDate_toUnitGranularity_, + date1.ref.pointer, + date2.ref.pointer, + unit.value); } /// isDate:inSameDayAsDate: bool isDate_inSameDayAsDate_(objc.NSDate date1, objc.NSDate date2) { - return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_isDate_inSameDayAsDate_, date1.ref.pointer, date2.ref.pointer); - + return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_isDate_inSameDayAsDate_, + date1.ref.pointer, date2.ref.pointer); } /// isDateInToday: bool isDateInToday_(objc.NSDate date) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isDateInToday_, date.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInToday_, date.ref.pointer); } /// isDateInYesterday: bool isDateInYesterday_(objc.NSDate date) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isDateInYesterday_, date.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInYesterday_, date.ref.pointer); } /// isDateInTomorrow: bool isDateInTomorrow_(objc.NSDate date) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isDateInTomorrow_, date.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInTomorrow_, date.ref.pointer); } /// isDateInWeekend: bool isDateInWeekend_(objc.NSDate date) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isDateInWeekend_, date.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDateInWeekend_, date.ref.pointer); } /// rangeOfWeekendStartDate:interval:containingDate: - bool rangeOfWeekendStartDate_interval_containingDate_(ffi.Pointer> datep, ffi.Pointer tip, objc.NSDate date) { - return _objc_msgSend_seipso(this.ref.pointer, _sel_rangeOfWeekendStartDate_interval_containingDate_, datep, tip, date.ref.pointer); - + bool rangeOfWeekendStartDate_interval_containingDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_seipso( + this.ref.pointer, + _sel_rangeOfWeekendStartDate_interval_containingDate_, + datep, + tip, + date.ref.pointer); } /// nextWeekendStartDate:interval:options:afterDate: - bool nextWeekendStartDate_interval_options_afterDate_(ffi.Pointer> datep, ffi.Pointer tip, NSCalendarOptions options, objc.NSDate date) { - return _objc_msgSend_1brdgri(this.ref.pointer, _sel_nextWeekendStartDate_interval_options_afterDate_, datep, tip, options.value, date.ref.pointer); - + bool nextWeekendStartDate_interval_options_afterDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + NSCalendarOptions options, + objc.NSDate date) { + return _objc_msgSend_1brdgri( + this.ref.pointer, + _sel_nextWeekendStartDate_interval_options_afterDate_, + datep, + tip, + options.value, + date.ref.pointer); } /// components:fromDateComponents:toDateComponents:options: - NSDateComponents components_fromDateComponents_toDateComponents_options_(NSCalendarUnit unitFlags, NSDateComponents startingDateComp, NSDateComponents resultDateComp, NSCalendarOptions options) { - final _ret = _objc_msgSend_1jc93x2(this.ref.pointer, _sel_components_fromDateComponents_toDateComponents_options_, unitFlags.value, startingDateComp.ref.pointer, resultDateComp.ref.pointer, options.value); + NSDateComponents components_fromDateComponents_toDateComponents_options_( + NSCalendarUnit unitFlags, + NSDateComponents startingDateComp, + NSDateComponents resultDateComp, + NSCalendarOptions options) { + final _ret = _objc_msgSend_1jc93x2( + this.ref.pointer, + _sel_components_fromDateComponents_toDateComponents_options_, + unitFlags.value, + startingDateComp.ref.pointer, + resultDateComp.ref.pointer, + options.value); return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } /// dateByAddingUnit:value:toDate:options: - objc.NSDate? dateByAddingUnit_value_toDate_options_(NSCalendarUnit unit, int value, objc.NSDate date, NSCalendarOptions options) { - final _ret = _objc_msgSend_b1fge4(this.ref.pointer, _sel_dateByAddingUnit_value_toDate_options_, unit.value, value, date.ref.pointer, options.value); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? dateByAddingUnit_value_toDate_options_(NSCalendarUnit unit, + int value, objc.NSDate date, NSCalendarOptions options) { + final _ret = _objc_msgSend_b1fge4( + this.ref.pointer, + _sel_dateByAddingUnit_value_toDate_options_, + unit.value, + value, + date.ref.pointer, + options.value); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock: - void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_(objc.NSDate start, NSDateComponents comps, NSCalendarOptions opts, objc.ObjCBlock)> block) { -_objc_msgSend_z9v2cv(this.ref.pointer, _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, start.ref.pointer, comps.ref.pointer, opts.value, block.ref.pointer); - + void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( + objc.NSDate start, + NSDateComponents comps, + NSCalendarOptions opts, + objc.ObjCBlock< + ffi.Void Function(objc.NSDate?, ffi.Bool, ffi.Pointer)> + block) { + _objc_msgSend_z9v2cv( + this.ref.pointer, + _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, + start.ref.pointer, + comps.ref.pointer, + opts.value, + block.ref.pointer); } /// nextDateAfterDate:matchingComponents:options: - objc.NSDate? nextDateAfterDate_matchingComponents_options_(objc.NSDate date, NSDateComponents comps, NSCalendarOptions options) { - final _ret = _objc_msgSend_2sm1zi(this.ref.pointer, _sel_nextDateAfterDate_matchingComponents_options_, date.ref.pointer, comps.ref.pointer, options.value); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? nextDateAfterDate_matchingComponents_options_( + objc.NSDate date, NSDateComponents comps, NSCalendarOptions options) { + final _ret = _objc_msgSend_2sm1zi( + this.ref.pointer, + _sel_nextDateAfterDate_matchingComponents_options_, + date.ref.pointer, + comps.ref.pointer, + options.value); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// nextDateAfterDate:matchingUnit:value:options: - objc.NSDate? nextDateAfterDate_matchingUnit_value_options_(objc.NSDate date, NSCalendarUnit unit, int value, NSCalendarOptions options) { - final _ret = _objc_msgSend_1im3h6w(this.ref.pointer, _sel_nextDateAfterDate_matchingUnit_value_options_, date.ref.pointer, unit.value, value, options.value); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? nextDateAfterDate_matchingUnit_value_options_(objc.NSDate date, + NSCalendarUnit unit, int value, NSCalendarOptions options) { + final _ret = _objc_msgSend_1im3h6w( + this.ref.pointer, + _sel_nextDateAfterDate_matchingUnit_value_options_, + date.ref.pointer, + unit.value, + value, + options.value); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// nextDateAfterDate:matchingHour:minute:second:options: - objc.NSDate? nextDateAfterDate_matchingHour_minute_second_options_(objc.NSDate date, int hourValue, int minuteValue, int secondValue, NSCalendarOptions options) { - final _ret = _objc_msgSend_tio5o0(this.ref.pointer, _sel_nextDateAfterDate_matchingHour_minute_second_options_, date.ref.pointer, hourValue, minuteValue, secondValue, options.value); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? nextDateAfterDate_matchingHour_minute_second_options_( + objc.NSDate date, + int hourValue, + int minuteValue, + int secondValue, + NSCalendarOptions options) { + final _ret = _objc_msgSend_tio5o0( + this.ref.pointer, + _sel_nextDateAfterDate_matchingHour_minute_second_options_, + date.ref.pointer, + hourValue, + minuteValue, + secondValue, + options.value); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateBySettingUnit:value:ofDate:options: - objc.NSDate? dateBySettingUnit_value_ofDate_options_(NSCalendarUnit unit, int v, objc.NSDate date, NSCalendarOptions opts) { - final _ret = _objc_msgSend_b1fge4(this.ref.pointer, _sel_dateBySettingUnit_value_ofDate_options_, unit.value, v, date.ref.pointer, opts.value); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? dateBySettingUnit_value_ofDate_options_( + NSCalendarUnit unit, int v, objc.NSDate date, NSCalendarOptions opts) { + final _ret = _objc_msgSend_b1fge4( + this.ref.pointer, + _sel_dateBySettingUnit_value_ofDate_options_, + unit.value, + v, + date.ref.pointer, + opts.value); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateBySettingHour:minute:second:ofDate:options: - objc.NSDate? dateBySettingHour_minute_second_ofDate_options_(int h, int m, int s, objc.NSDate date, NSCalendarOptions opts) { - final _ret = _objc_msgSend_16h627a(this.ref.pointer, _sel_dateBySettingHour_minute_second_ofDate_options_, h, m, s, date.ref.pointer, opts.value); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + objc.NSDate? dateBySettingHour_minute_second_ofDate_options_( + int h, int m, int s, objc.NSDate date, NSCalendarOptions opts) { + final _ret = _objc_msgSend_16h627a( + this.ref.pointer, + _sel_dateBySettingHour_minute_second_ofDate_options_, + h, + m, + s, + date.ref.pointer, + opts.value); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// date:matchesComponents: bool date_matchesComponents_(objc.NSDate date, NSDateComponents components) { - return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_date_matchesComponents_, date.ref.pointer, components.ref.pointer); - + return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_date_matchesComponents_, + date.ref.pointer, components.ref.pointer); } /// new @@ -4323,7 +7436,8 @@ _objc_msgSend_z9v2cv(this.ref.pointer, _sel_enumerateDatesStartingAfterDate_matc /// allocWithZone: static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSCalendar, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSCalendar, _sel_allocWithZone_, zone); return NSCalendar.castFromPointer(_ret, retain: false, release: true); } @@ -4334,56 +7448,70 @@ _objc_msgSend_z9v2cv(this.ref.pointer, _sel_enumerateDatesStartingAfterDate_matc } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSCalendar, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSCalendar, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSCalendar, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSCalendar, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSCalendar, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSCalendar, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSCalendar, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSCalendar, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSCalendar, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSCalendar, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSCalendar, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSCalendar, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSCalendar, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSCalendar, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSCalendar, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -4408,135 +7536,202 @@ _objc_msgSend_1tjlcwl(_class_NSCalendar, _sel_setKeys_triggerChangeNotifications /// supportsSecureCoding static bool supportsSecureCoding() { return _objc_msgSend_olxnu1(_class_NSCalendar, _sel_supportsSecureCoding); - } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSCalendar? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSCalendar.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: false, release: true); } } late final _sel_isLenient = objc.registerName("isLenient"); late final _sel_setLenient_ = objc.registerName("setLenient:"); late final _sel_twoDigitStartDate = objc.registerName("twoDigitStartDate"); -late final _sel_setTwoDigitStartDate_ = objc.registerName("setTwoDigitStartDate:"); +late final _sel_setTwoDigitStartDate_ = + objc.registerName("setTwoDigitStartDate:"); late final _sel_defaultDate = objc.registerName("defaultDate"); late final _sel_setDefaultDate_ = objc.registerName("setDefaultDate:"); late final _sel_setEraSymbols_ = objc.registerName("setEraSymbols:"); late final _sel_setMonthSymbols_ = objc.registerName("setMonthSymbols:"); -late final _sel_setShortMonthSymbols_ = objc.registerName("setShortMonthSymbols:"); +late final _sel_setShortMonthSymbols_ = + objc.registerName("setShortMonthSymbols:"); late final _sel_setWeekdaySymbols_ = objc.registerName("setWeekdaySymbols:"); -late final _sel_setShortWeekdaySymbols_ = objc.registerName("setShortWeekdaySymbols:"); +late final _sel_setShortWeekdaySymbols_ = + objc.registerName("setShortWeekdaySymbols:"); late final _sel_setAMSymbol_ = objc.registerName("setAMSymbol:"); late final _sel_setPMSymbol_ = objc.registerName("setPMSymbol:"); late final _sel_setLongEraSymbols_ = objc.registerName("setLongEraSymbols:"); -late final _sel_setVeryShortMonthSymbols_ = objc.registerName("setVeryShortMonthSymbols:"); -late final _sel_setStandaloneMonthSymbols_ = objc.registerName("setStandaloneMonthSymbols:"); -late final _sel_setShortStandaloneMonthSymbols_ = objc.registerName("setShortStandaloneMonthSymbols:"); -late final _sel_setVeryShortStandaloneMonthSymbols_ = objc.registerName("setVeryShortStandaloneMonthSymbols:"); -late final _sel_setVeryShortWeekdaySymbols_ = objc.registerName("setVeryShortWeekdaySymbols:"); -late final _sel_setStandaloneWeekdaySymbols_ = objc.registerName("setStandaloneWeekdaySymbols:"); -late final _sel_setShortStandaloneWeekdaySymbols_ = objc.registerName("setShortStandaloneWeekdaySymbols:"); -late final _sel_setVeryShortStandaloneWeekdaySymbols_ = objc.registerName("setVeryShortStandaloneWeekdaySymbols:"); +late final _sel_setVeryShortMonthSymbols_ = + objc.registerName("setVeryShortMonthSymbols:"); +late final _sel_setStandaloneMonthSymbols_ = + objc.registerName("setStandaloneMonthSymbols:"); +late final _sel_setShortStandaloneMonthSymbols_ = + objc.registerName("setShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortStandaloneMonthSymbols_ = + objc.registerName("setVeryShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortWeekdaySymbols_ = + objc.registerName("setVeryShortWeekdaySymbols:"); +late final _sel_setStandaloneWeekdaySymbols_ = + objc.registerName("setStandaloneWeekdaySymbols:"); +late final _sel_setShortStandaloneWeekdaySymbols_ = + objc.registerName("setShortStandaloneWeekdaySymbols:"); +late final _sel_setVeryShortStandaloneWeekdaySymbols_ = + objc.registerName("setVeryShortStandaloneWeekdaySymbols:"); late final _sel_setQuarterSymbols_ = objc.registerName("setQuarterSymbols:"); -late final _sel_setShortQuarterSymbols_ = objc.registerName("setShortQuarterSymbols:"); -late final _sel_setStandaloneQuarterSymbols_ = objc.registerName("setStandaloneQuarterSymbols:"); -late final _sel_setShortStandaloneQuarterSymbols_ = objc.registerName("setShortStandaloneQuarterSymbols:"); +late final _sel_setShortQuarterSymbols_ = + objc.registerName("setShortQuarterSymbols:"); +late final _sel_setStandaloneQuarterSymbols_ = + objc.registerName("setStandaloneQuarterSymbols:"); +late final _sel_setShortStandaloneQuarterSymbols_ = + objc.registerName("setShortStandaloneQuarterSymbols:"); late final _sel_gregorianStartDate = objc.registerName("gregorianStartDate"); -late final _sel_setGregorianStartDate_ = objc.registerName("setGregorianStartDate:"); -late final _sel_doesRelativeDateFormatting = objc.registerName("doesRelativeDateFormatting"); -late final _sel_setDoesRelativeDateFormatting_ = objc.registerName("setDoesRelativeDateFormatting:"); -late final _sel_initWithDateFormat_allowNaturalLanguage_ = objc.registerName("initWithDateFormat:allowNaturalLanguage:"); -final _objc_msgSend_qqbb5y = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Bool )>>().asFunction , ffi.Pointer , ffi.Pointer , bool )>(); -late final _sel_allowsNaturalLanguage = objc.registerName("allowsNaturalLanguage"); +late final _sel_setGregorianStartDate_ = + objc.registerName("setGregorianStartDate:"); +late final _sel_doesRelativeDateFormatting = + objc.registerName("doesRelativeDateFormatting"); +late final _sel_setDoesRelativeDateFormatting_ = + objc.registerName("setDoesRelativeDateFormatting:"); +late final _sel_initWithDateFormat_allowNaturalLanguage_ = + objc.registerName("initWithDateFormat:allowNaturalLanguage:"); +final _objc_msgSend_qqbb5y = 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_allowsNaturalLanguage = + objc.registerName("allowsNaturalLanguage"); /// NSDateFormatter class NSDateFormatter extends NSFormatter { NSDateFormatter._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSDateFormatter] that points to the same underlying object as [other]. - NSDateFormatter.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSDateFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSDateFormatter] that wraps the given raw object pointer. NSDateFormatter.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSDateFormatter]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); } /// formattingContext NSFormattingContext get formattingContext { - final _ret = _objc_msgSend_10wicfq(this.ref.pointer, _sel_formattingContext); + final _ret = + _objc_msgSend_10wicfq(this.ref.pointer, _sel_formattingContext); return NSFormattingContext.fromValue(_ret); } /// setFormattingContext: - set formattingContext(NSFormattingContext value) { - return _objc_msgSend_1gtwv7x(this.ref.pointer, _sel_setFormattingContext_, value.value); - + set formattingContext(NSFormattingContext value) { + return _objc_msgSend_1gtwv7x( + this.ref.pointer, _sel_setFormattingContext_, value.value); } /// getObjectValue:forString:range:error: - bool getObjectValue_forString_range_error_(ffi.Pointer> obj, objc.NSString string, ffi.Pointer rangep, ffi.Pointer> error) { - return _objc_msgSend_bl9kx(this.ref.pointer, _sel_getObjectValue_forString_range_error_, obj, string.ref.pointer, rangep, error); - + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer rangep, + ffi.Pointer> error) { + return _objc_msgSend_bl9kx( + this.ref.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.ref.pointer, + rangep, + error); } /// stringFromDate: objc.NSString stringFromDate_(objc.NSDate date) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_stringFromDate_, date.ref.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_stringFromDate_, date.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// dateFromString: objc.NSDate? dateFromString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_dateFromString_, string.ref.pointer); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dateFromString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// localizedStringFromDate:dateStyle:timeStyle: - static objc.NSString localizedStringFromDate_dateStyle_timeStyle_(objc.NSDate date, NSDateFormatterStyle dstyle, NSDateFormatterStyle tstyle) { - final _ret = _objc_msgSend_1sgexgh(_class_NSDateFormatter, _sel_localizedStringFromDate_dateStyle_timeStyle_, date.ref.pointer, dstyle.value, tstyle.value); + static objc.NSString localizedStringFromDate_dateStyle_timeStyle_( + objc.NSDate date, + NSDateFormatterStyle dstyle, + NSDateFormatterStyle tstyle) { + final _ret = _objc_msgSend_1sgexgh( + _class_NSDateFormatter, + _sel_localizedStringFromDate_dateStyle_timeStyle_, + date.ref.pointer, + dstyle.value, + tstyle.value); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// dateFormatFromTemplate:options:locale: - static objc.NSString? dateFormatFromTemplate_options_locale_(objc.NSString tmplate, int opts, objc.NSLocale? locale) { - final _ret = _objc_msgSend_1czjmpk(_class_NSDateFormatter, _sel_dateFormatFromTemplate_options_locale_, tmplate.ref.pointer, opts, locale?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + static objc.NSString? dateFormatFromTemplate_options_locale_( + objc.NSString tmplate, int opts, objc.NSLocale? locale) { + final _ret = _objc_msgSend_1czjmpk( + _class_NSDateFormatter, + _sel_dateFormatFromTemplate_options_locale_, + tmplate.ref.pointer, + opts, + locale?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// defaultFormatterBehavior static NSDateFormatterBehavior getDefaultFormatterBehavior() { - final _ret = _objc_msgSend_ti9wzk(_class_NSDateFormatter, _sel_defaultFormatterBehavior); + final _ret = _objc_msgSend_ti9wzk( + _class_NSDateFormatter, _sel_defaultFormatterBehavior); return NSDateFormatterBehavior.fromValue(_ret); } /// setDefaultFormatterBehavior: static void setDefaultFormatterBehavior(NSDateFormatterBehavior value) { - return _objc_msgSend_ffb1q7(_class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value.value); - + return _objc_msgSend_ffb1q7( + _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value.value); } /// setLocalizedDateFormatFromTemplate: void setLocalizedDateFormatFromTemplate_(objc.NSString dateFormatTemplate) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, dateFormatTemplate.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setLocalizedDateFormatFromTemplate_, + dateFormatTemplate.ref.pointer); } /// dateFormat @@ -4546,9 +7741,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setDateFormat: - set dateFormat(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDateFormat_, value.ref.pointer); - + set dateFormat(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDateFormat_, value.ref.pointer); } /// dateStyle @@ -4558,9 +7753,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setDateStyle: - set dateStyle(NSDateFormatterStyle value) { - return _objc_msgSend_7hnqfw(this.ref.pointer, _sel_setDateStyle_, value.value); - + set dateStyle(NSDateFormatterStyle value) { + return _objc_msgSend_7hnqfw( + this.ref.pointer, _sel_setDateStyle_, value.value); } /// timeStyle @@ -4570,9 +7765,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setTimeStyle: - set timeStyle(NSDateFormatterStyle value) { - return _objc_msgSend_7hnqfw(this.ref.pointer, _sel_setTimeStyle_, value.value); - + set timeStyle(NSDateFormatterStyle value) { + return _objc_msgSend_7hnqfw( + this.ref.pointer, _sel_setTimeStyle_, value.value); } /// locale @@ -4582,21 +7777,20 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setLocale: - set locale(objc.NSLocale value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocale_, value.ref.pointer); - + set locale(objc.NSLocale value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value.ref.pointer); } /// generatesCalendarDates bool get generatesCalendarDates { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_generatesCalendarDates); - } /// setGeneratesCalendarDates: - set generatesCalendarDates(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setGeneratesCalendarDates_, value); - + set generatesCalendarDates(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setGeneratesCalendarDates_, value); } /// formatterBehavior @@ -4606,9 +7800,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setFormatterBehavior: - set formatterBehavior(NSDateFormatterBehavior value) { - return _objc_msgSend_ffb1q7(this.ref.pointer, _sel_setFormatterBehavior_, value.value); - + set formatterBehavior(NSDateFormatterBehavior value) { + return _objc_msgSend_ffb1q7( + this.ref.pointer, _sel_setFormatterBehavior_, value.value); } /// timeZone @@ -4618,9 +7812,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setTimeZone: - set timeZone(NSTimeZone value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTimeZone_, value.ref.pointer); - + set timeZone(NSTimeZone value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setTimeZone_, value.ref.pointer); } /// calendar @@ -4630,45 +7824,48 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setCalendar: - set calendar(NSCalendar value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCalendar_, value.ref.pointer); - + set calendar(NSCalendar value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCalendar_, value.ref.pointer); } /// isLenient bool get lenient { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLenient); - } /// setLenient: - set lenient(bool value) { + set lenient(bool value) { return _objc_msgSend_117qins(this.ref.pointer, _sel_setLenient_, value); - } /// twoDigitStartDate objc.NSDate? get twoDigitStartDate { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_twoDigitStartDate); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_twoDigitStartDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// setTwoDigitStartDate: - set twoDigitStartDate(objc.NSDate? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTwoDigitStartDate_, value?.ref.pointer ?? ffi.nullptr); - + set twoDigitStartDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTwoDigitStartDate_, + value?.ref.pointer ?? ffi.nullptr); } /// defaultDate objc.NSDate? get defaultDate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_defaultDate); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// setDefaultDate: - set defaultDate(objc.NSDate? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDefaultDate_, value?.ref.pointer ?? ffi.nullptr); - + set defaultDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDefaultDate_, + value?.ref.pointer ?? ffi.nullptr); } /// eraSymbols @@ -4678,9 +7875,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setEraSymbols: - set eraSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEraSymbols_, value.ref.pointer); - + set eraSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setEraSymbols_, value.ref.pointer); } /// monthSymbols @@ -4690,21 +7887,22 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setMonthSymbols: - set monthSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMonthSymbols_, value.ref.pointer); - + set monthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMonthSymbols_, value.ref.pointer); } /// shortMonthSymbols objc.NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setShortMonthSymbols: - set shortMonthSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setShortMonthSymbols_, value.ref.pointer); - + set shortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setShortMonthSymbols_, value.ref.pointer); } /// weekdaySymbols @@ -4714,21 +7912,22 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setWeekdaySymbols: - set weekdaySymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setWeekdaySymbols_, value.ref.pointer); - + set weekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setWeekdaySymbols_, value.ref.pointer); } /// shortWeekdaySymbols objc.NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setShortWeekdaySymbols: - set shortWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setShortWeekdaySymbols_, value.ref.pointer); - + set shortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setShortWeekdaySymbols_, value.ref.pointer); } /// AMSymbol @@ -4738,9 +7937,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setAMSymbol: - set AMSymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAMSymbol_, value.ref.pointer); - + set AMSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAMSymbol_, value.ref.pointer); } /// PMSymbol @@ -4750,9 +7949,9 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setPMSymbol: - set PMSymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPMSymbol_, value.ref.pointer); - + set PMSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPMSymbol_, value.ref.pointer); } /// longEraSymbols @@ -4762,105 +7961,113 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setLongEraSymbols: - set longEraSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLongEraSymbols_, value.ref.pointer); - + set longEraSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLongEraSymbols_, value.ref.pointer); } /// veryShortMonthSymbols objc.NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setVeryShortMonthSymbols: - set veryShortMonthSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setVeryShortMonthSymbols_, value.ref.pointer); - + set veryShortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setVeryShortMonthSymbols_, value.ref.pointer); } /// standaloneMonthSymbols objc.NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneMonthSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setStandaloneMonthSymbols: - set standaloneMonthSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandaloneMonthSymbols_, value.ref.pointer); - + set standaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setStandaloneMonthSymbols_, value.ref.pointer); } /// shortStandaloneMonthSymbols objc.NSArray get shortStandaloneMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortStandaloneMonthSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setShortStandaloneMonthSymbols: - set shortStandaloneMonthSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setShortStandaloneMonthSymbols_, value.ref.pointer); - + set shortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setShortStandaloneMonthSymbols_, value.ref.pointer); } /// veryShortStandaloneMonthSymbols objc.NSArray get veryShortStandaloneMonthSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortStandaloneMonthSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneMonthSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setVeryShortStandaloneMonthSymbols: - set veryShortStandaloneMonthSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.ref.pointer); - + set veryShortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setVeryShortStandaloneMonthSymbols_, value.ref.pointer); } /// veryShortWeekdaySymbols objc.NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setVeryShortWeekdaySymbols: - set veryShortWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setVeryShortWeekdaySymbols_, value.ref.pointer); - + set veryShortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setVeryShortWeekdaySymbols_, value.ref.pointer); } /// standaloneWeekdaySymbols objc.NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneWeekdaySymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setStandaloneWeekdaySymbols: - set standaloneWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandaloneWeekdaySymbols_, value.ref.pointer); - + set standaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setStandaloneWeekdaySymbols_, value.ref.pointer); } /// shortStandaloneWeekdaySymbols objc.NSArray get shortStandaloneWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortStandaloneWeekdaySymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setShortStandaloneWeekdaySymbols: - set shortStandaloneWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.ref.pointer); - + set shortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setShortStandaloneWeekdaySymbols_, value.ref.pointer); } /// veryShortStandaloneWeekdaySymbols objc.NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_veryShortStandaloneWeekdaySymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_veryShortStandaloneWeekdaySymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setVeryShortStandaloneWeekdaySymbols: - set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setVeryShortStandaloneWeekdaySymbols_, value.ref.pointer); - + set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setVeryShortStandaloneWeekdaySymbols_, value.ref.pointer); } /// quarterSymbols @@ -4870,86 +8077,97 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// setQuarterSymbols: - set quarterSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setQuarterSymbols_, value.ref.pointer); - + set quarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setQuarterSymbols_, value.ref.pointer); } /// shortQuarterSymbols objc.NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortQuarterSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setShortQuarterSymbols: - set shortQuarterSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setShortQuarterSymbols_, value.ref.pointer); - + set shortQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setShortQuarterSymbols_, value.ref.pointer); } /// standaloneQuarterSymbols objc.NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneQuarterSymbols); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standaloneQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setStandaloneQuarterSymbols: - set standaloneQuarterSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandaloneQuarterSymbols_, value.ref.pointer); - + set standaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setStandaloneQuarterSymbols_, value.ref.pointer); } /// shortStandaloneQuarterSymbols objc.NSArray get shortStandaloneQuarterSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_shortStandaloneQuarterSymbols); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_shortStandaloneQuarterSymbols); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setShortStandaloneQuarterSymbols: - set shortStandaloneQuarterSymbols(objc.NSArray value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setShortStandaloneQuarterSymbols_, value.ref.pointer); - + set shortStandaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setShortStandaloneQuarterSymbols_, value.ref.pointer); } /// gregorianStartDate objc.NSDate? get gregorianStartDate { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_gregorianStartDate); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_gregorianStartDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// setGregorianStartDate: - set gregorianStartDate(objc.NSDate? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setGregorianStartDate_, value?.ref.pointer ?? ffi.nullptr); - + set gregorianStartDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setGregorianStartDate_, + value?.ref.pointer ?? ffi.nullptr); } /// doesRelativeDateFormatting bool get doesRelativeDateFormatting { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_doesRelativeDateFormatting); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_doesRelativeDateFormatting); } /// setDoesRelativeDateFormatting: - set doesRelativeDateFormatting(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setDoesRelativeDateFormatting_, value); - + set doesRelativeDateFormatting(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setDoesRelativeDateFormatting_, value); } /// initWithDateFormat:allowNaturalLanguage: - objc.ObjCObjectBase initWithDateFormat_allowNaturalLanguage_(objc.NSString format, bool flag) { - final _ret = _objc_msgSend_qqbb5y(this.ref.retainAndReturnPointer(), _sel_initWithDateFormat_allowNaturalLanguage_, format.ref.pointer, flag); + objc.ObjCObjectBase initWithDateFormat_allowNaturalLanguage_( + objc.NSString format, bool flag) { + final _ret = _objc_msgSend_qqbb5y( + this.ref.retainAndReturnPointer(), + _sel_initWithDateFormat_allowNaturalLanguage_, + format.ref.pointer, + flag); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// allowsNaturalLanguage bool allowsNaturalLanguage() { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsNaturalLanguage); - } /// init NSDateFormatter init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } @@ -4961,7 +8179,8 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, /// allocWithZone: static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSDateFormatter, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDateFormatter, _sel_allocWithZone_, zone); return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } @@ -4972,56 +8191,70 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocalizedDateFormatFromTemplate_, } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSDateFormatter, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSDateFormatter, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSDateFormatter, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSDateFormatter, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSDateFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSDateFormatter, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSDateFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSDateFormatter, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSDateFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDateFormatter, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -5045,14 +8278,18 @@ _objc_msgSend_1tjlcwl(_class_NSDateFormatter, _sel_setKeys_triggerChangeNotifica /// initWithCoder: NSDateFormatter? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSDateFormatter.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } } late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); late final _sel_numberFromString_ = objc.registerName("numberFromString:"); + enum NSNumberFormatterStyle { NSNumberFormatterNoStyle(0), NSNumberFormatterDecimalStyle(1), @@ -5065,94 +8302,164 @@ enum NSNumberFormatterStyle { NSNumberFormatterCurrencyPluralStyle(9), NSNumberFormatterCurrencyAccountingStyle(10); - final int value; const NSNumberFormatterStyle(this.value); static NSNumberFormatterStyle fromValue(int value) => switch (value) { - 0 => NSNumberFormatterNoStyle, - 1 => NSNumberFormatterDecimalStyle, - 2 => NSNumberFormatterCurrencyStyle, - 3 => NSNumberFormatterPercentStyle, - 4 => NSNumberFormatterScientificStyle, - 5 => NSNumberFormatterSpellOutStyle, - 6 => NSNumberFormatterOrdinalStyle, - 8 => NSNumberFormatterCurrencyISOCodeStyle, - 9 => NSNumberFormatterCurrencyPluralStyle, - 10 => NSNumberFormatterCurrencyAccountingStyle, - _ => throw ArgumentError("Unknown value for NSNumberFormatterStyle: $value"), - }; - -} - -late final _sel_localizedStringFromNumber_numberStyle_ = objc.registerName("localizedStringFromNumber:numberStyle:"); -final _objc_msgSend_1dsaaq7 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); + 0 => NSNumberFormatterNoStyle, + 1 => NSNumberFormatterDecimalStyle, + 2 => NSNumberFormatterCurrencyStyle, + 3 => NSNumberFormatterPercentStyle, + 4 => NSNumberFormatterScientificStyle, + 5 => NSNumberFormatterSpellOutStyle, + 6 => NSNumberFormatterOrdinalStyle, + 8 => NSNumberFormatterCurrencyISOCodeStyle, + 9 => NSNumberFormatterCurrencyPluralStyle, + 10 => NSNumberFormatterCurrencyAccountingStyle, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterStyle: $value"), + }; +} + +late final _sel_localizedStringFromNumber_numberStyle_ = + objc.registerName("localizedStringFromNumber:numberStyle:"); +final _objc_msgSend_1dsaaq7 = 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 NSNumberFormatterBehavior { NSNumberFormatterBehaviorDefault(0), NSNumberFormatterBehavior10_0(1000), NSNumberFormatterBehavior10_4(1040); - final int value; const NSNumberFormatterBehavior(this.value); static NSNumberFormatterBehavior fromValue(int value) => switch (value) { - 0 => NSNumberFormatterBehaviorDefault, - 1000 => NSNumberFormatterBehavior10_0, - 1040 => NSNumberFormatterBehavior10_4, - _ => throw ArgumentError("Unknown value for NSNumberFormatterBehavior: $value"), - }; - -} - -final _objc_msgSend_1nvfxwt = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -final _objc_msgSend_1p18hg0 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); + 0 => NSNumberFormatterBehaviorDefault, + 1000 => NSNumberFormatterBehavior10_0, + 1040 => NSNumberFormatterBehavior10_4, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterBehavior: $value"), + }; +} + +final _objc_msgSend_1nvfxwt = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1p18hg0 = 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_numberStyle = objc.registerName("numberStyle"); -final _objc_msgSend_1we0qxe = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1we0qxe = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); -final _objc_msgSend_qp19lh = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_generatesDecimalNumbers = objc.registerName("generatesDecimalNumbers"); -late final _sel_setGeneratesDecimalNumbers_ = objc.registerName("setGeneratesDecimalNumbers:"); +final _objc_msgSend_qp19lh = 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_generatesDecimalNumbers = + objc.registerName("generatesDecimalNumbers"); +late final _sel_setGeneratesDecimalNumbers_ = + objc.registerName("setGeneratesDecimalNumbers:"); late final _sel_negativeFormat = objc.registerName("negativeFormat"); late final _sel_setNegativeFormat_ = objc.registerName("setNegativeFormat:"); -late final _sel_textAttributesForNegativeValues = objc.registerName("textAttributesForNegativeValues"); -late final _sel_setTextAttributesForNegativeValues_ = objc.registerName("setTextAttributesForNegativeValues:"); +late final _sel_textAttributesForNegativeValues = + objc.registerName("textAttributesForNegativeValues"); +late final _sel_setTextAttributesForNegativeValues_ = + objc.registerName("setTextAttributesForNegativeValues:"); late final _sel_positiveFormat = objc.registerName("positiveFormat"); late final _sel_setPositiveFormat_ = objc.registerName("setPositiveFormat:"); -late final _sel_textAttributesForPositiveValues = objc.registerName("textAttributesForPositiveValues"); -late final _sel_setTextAttributesForPositiveValues_ = objc.registerName("setTextAttributesForPositiveValues:"); +late final _sel_textAttributesForPositiveValues = + objc.registerName("textAttributesForPositiveValues"); +late final _sel_setTextAttributesForPositiveValues_ = + objc.registerName("setTextAttributesForPositiveValues:"); late final _sel_allowsFloats = objc.registerName("allowsFloats"); late final _sel_setAllowsFloats_ = objc.registerName("setAllowsFloats:"); late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); -late final _sel_setDecimalSeparator_ = objc.registerName("setDecimalSeparator:"); -late final _sel_alwaysShowsDecimalSeparator = objc.registerName("alwaysShowsDecimalSeparator"); -late final _sel_setAlwaysShowsDecimalSeparator_ = objc.registerName("setAlwaysShowsDecimalSeparator:"); -late final _sel_currencyDecimalSeparator = objc.registerName("currencyDecimalSeparator"); -late final _sel_setCurrencyDecimalSeparator_ = objc.registerName("setCurrencyDecimalSeparator:"); -late final _sel_usesGroupingSeparator = objc.registerName("usesGroupingSeparator"); -late final _sel_setUsesGroupingSeparator_ = objc.registerName("setUsesGroupingSeparator:"); +late final _sel_setDecimalSeparator_ = + objc.registerName("setDecimalSeparator:"); +late final _sel_alwaysShowsDecimalSeparator = + objc.registerName("alwaysShowsDecimalSeparator"); +late final _sel_setAlwaysShowsDecimalSeparator_ = + objc.registerName("setAlwaysShowsDecimalSeparator:"); +late final _sel_currencyDecimalSeparator = + objc.registerName("currencyDecimalSeparator"); +late final _sel_setCurrencyDecimalSeparator_ = + objc.registerName("setCurrencyDecimalSeparator:"); +late final _sel_usesGroupingSeparator = + objc.registerName("usesGroupingSeparator"); +late final _sel_setUsesGroupingSeparator_ = + objc.registerName("setUsesGroupingSeparator:"); late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); -late final _sel_setGroupingSeparator_ = objc.registerName("setGroupingSeparator:"); +late final _sel_setGroupingSeparator_ = + objc.registerName("setGroupingSeparator:"); late final _sel_zeroSymbol = objc.registerName("zeroSymbol"); late final _sel_setZeroSymbol_ = objc.registerName("setZeroSymbol:"); -late final _sel_textAttributesForZero = objc.registerName("textAttributesForZero"); -late final _sel_setTextAttributesForZero_ = objc.registerName("setTextAttributesForZero:"); +late final _sel_textAttributesForZero = + objc.registerName("textAttributesForZero"); +late final _sel_setTextAttributesForZero_ = + objc.registerName("setTextAttributesForZero:"); late final _sel_nilSymbol = objc.registerName("nilSymbol"); late final _sel_setNilSymbol_ = objc.registerName("setNilSymbol:"); -late final _sel_textAttributesForNil = objc.registerName("textAttributesForNil"); -late final _sel_setTextAttributesForNil_ = objc.registerName("setTextAttributesForNil:"); +late final _sel_textAttributesForNil = + objc.registerName("textAttributesForNil"); +late final _sel_setTextAttributesForNil_ = + objc.registerName("setTextAttributesForNil:"); late final _sel_notANumberSymbol = objc.registerName("notANumberSymbol"); -late final _sel_setNotANumberSymbol_ = objc.registerName("setNotANumberSymbol:"); -late final _sel_textAttributesForNotANumber = objc.registerName("textAttributesForNotANumber"); -late final _sel_setTextAttributesForNotANumber_ = objc.registerName("setTextAttributesForNotANumber:"); -late final _sel_positiveInfinitySymbol = objc.registerName("positiveInfinitySymbol"); -late final _sel_setPositiveInfinitySymbol_ = objc.registerName("setPositiveInfinitySymbol:"); -late final _sel_textAttributesForPositiveInfinity = objc.registerName("textAttributesForPositiveInfinity"); -late final _sel_setTextAttributesForPositiveInfinity_ = objc.registerName("setTextAttributesForPositiveInfinity:"); -late final _sel_negativeInfinitySymbol = objc.registerName("negativeInfinitySymbol"); -late final _sel_setNegativeInfinitySymbol_ = objc.registerName("setNegativeInfinitySymbol:"); -late final _sel_textAttributesForNegativeInfinity = objc.registerName("textAttributesForNegativeInfinity"); -late final _sel_setTextAttributesForNegativeInfinity_ = objc.registerName("setTextAttributesForNegativeInfinity:"); +late final _sel_setNotANumberSymbol_ = + objc.registerName("setNotANumberSymbol:"); +late final _sel_textAttributesForNotANumber = + objc.registerName("textAttributesForNotANumber"); +late final _sel_setTextAttributesForNotANumber_ = + objc.registerName("setTextAttributesForNotANumber:"); +late final _sel_positiveInfinitySymbol = + objc.registerName("positiveInfinitySymbol"); +late final _sel_setPositiveInfinitySymbol_ = + objc.registerName("setPositiveInfinitySymbol:"); +late final _sel_textAttributesForPositiveInfinity = + objc.registerName("textAttributesForPositiveInfinity"); +late final _sel_setTextAttributesForPositiveInfinity_ = + objc.registerName("setTextAttributesForPositiveInfinity:"); +late final _sel_negativeInfinitySymbol = + objc.registerName("negativeInfinitySymbol"); +late final _sel_setNegativeInfinitySymbol_ = + objc.registerName("setNegativeInfinitySymbol:"); +late final _sel_textAttributesForNegativeInfinity = + objc.registerName("textAttributesForNegativeInfinity"); +late final _sel_setTextAttributesForNegativeInfinity_ = + objc.registerName("setTextAttributesForNegativeInfinity:"); late final _sel_positivePrefix = objc.registerName("positivePrefix"); late final _sel_setPositivePrefix_ = objc.registerName("setPositivePrefix:"); late final _sel_positiveSuffix = objc.registerName("positiveSuffix"); @@ -5165,8 +8472,10 @@ late final _sel_currencyCode = objc.registerName("currencyCode"); late final _sel_setCurrencyCode_ = objc.registerName("setCurrencyCode:"); late final _sel_currencySymbol = objc.registerName("currencySymbol"); late final _sel_setCurrencySymbol_ = objc.registerName("setCurrencySymbol:"); -late final _sel_internationalCurrencySymbol = objc.registerName("internationalCurrencySymbol"); -late final _sel_setInternationalCurrencySymbol_ = objc.registerName("setInternationalCurrencySymbol:"); +late final _sel_internationalCurrencySymbol = + objc.registerName("internationalCurrencySymbol"); +late final _sel_setInternationalCurrencySymbol_ = + objc.registerName("setInternationalCurrencySymbol:"); late final _sel_percentSymbol = objc.registerName("percentSymbol"); late final _sel_setPercentSymbol_ = objc.registerName("setPercentSymbol:"); late final _sel_perMillSymbol = objc.registerName("perMillSymbol"); @@ -5179,38 +8488,56 @@ late final _sel_exponentSymbol = objc.registerName("exponentSymbol"); late final _sel_setExponentSymbol_ = objc.registerName("setExponentSymbol:"); late final _sel_groupingSize = objc.registerName("groupingSize"); late final _sel_setGroupingSize_ = objc.registerName("setGroupingSize:"); -late final _sel_secondaryGroupingSize = objc.registerName("secondaryGroupingSize"); -late final _sel_setSecondaryGroupingSize_ = objc.registerName("setSecondaryGroupingSize:"); +late final _sel_secondaryGroupingSize = + objc.registerName("secondaryGroupingSize"); +late final _sel_setSecondaryGroupingSize_ = + objc.registerName("setSecondaryGroupingSize:"); late final _sel_multiplier = objc.registerName("multiplier"); late final _sel_setMultiplier_ = objc.registerName("setMultiplier:"); late final _sel_formatWidth = objc.registerName("formatWidth"); late final _sel_setFormatWidth_ = objc.registerName("setFormatWidth:"); late final _sel_paddingCharacter = objc.registerName("paddingCharacter"); -late final _sel_setPaddingCharacter_ = objc.registerName("setPaddingCharacter:"); +late final _sel_setPaddingCharacter_ = + objc.registerName("setPaddingCharacter:"); + enum NSNumberFormatterPadPosition { NSNumberFormatterPadBeforePrefix(0), NSNumberFormatterPadAfterPrefix(1), NSNumberFormatterPadBeforeSuffix(2), NSNumberFormatterPadAfterSuffix(3); - final int value; const NSNumberFormatterPadPosition(this.value); static NSNumberFormatterPadPosition fromValue(int value) => switch (value) { - 0 => NSNumberFormatterPadBeforePrefix, - 1 => NSNumberFormatterPadAfterPrefix, - 2 => NSNumberFormatterPadBeforeSuffix, - 3 => NSNumberFormatterPadAfterSuffix, - _ => throw ArgumentError("Unknown value for NSNumberFormatterPadPosition: $value"), - }; - + 0 => NSNumberFormatterPadBeforePrefix, + 1 => NSNumberFormatterPadAfterPrefix, + 2 => NSNumberFormatterPadBeforeSuffix, + 3 => NSNumberFormatterPadAfterSuffix, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterPadPosition: $value"), + }; } late final _sel_paddingPosition = objc.registerName("paddingPosition"); -final _objc_msgSend_1s69i33 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1s69i33 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); -final _objc_msgSend_gz8txq = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_gz8txq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + enum NSNumberFormatterRoundingMode { NSNumberFormatterRoundCeiling(0), NSNumberFormatterRoundFloor(1), @@ -5220,275 +8547,610 @@ enum NSNumberFormatterRoundingMode { NSNumberFormatterRoundHalfDown(5), NSNumberFormatterRoundHalfUp(6); - final int value; const NSNumberFormatterRoundingMode(this.value); static NSNumberFormatterRoundingMode fromValue(int value) => switch (value) { - 0 => NSNumberFormatterRoundCeiling, - 1 => NSNumberFormatterRoundFloor, - 2 => NSNumberFormatterRoundDown, - 3 => NSNumberFormatterRoundUp, - 4 => NSNumberFormatterRoundHalfEven, - 5 => NSNumberFormatterRoundHalfDown, - 6 => NSNumberFormatterRoundHalfUp, - _ => throw ArgumentError("Unknown value for NSNumberFormatterRoundingMode: $value"), - }; - + 0 => NSNumberFormatterRoundCeiling, + 1 => NSNumberFormatterRoundFloor, + 2 => NSNumberFormatterRoundDown, + 3 => NSNumberFormatterRoundUp, + 4 => NSNumberFormatterRoundHalfEven, + 5 => NSNumberFormatterRoundHalfDown, + 6 => NSNumberFormatterRoundHalfUp, + _ => throw ArgumentError( + "Unknown value for NSNumberFormatterRoundingMode: $value"), + }; } late final _sel_roundingMode = objc.registerName("roundingMode"); -final _objc_msgSend_38d07q = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_38d07q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); -final _objc_msgSend_5krs29 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_5krs29 = 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_roundingIncrement = objc.registerName("roundingIncrement"); -late final _sel_setRoundingIncrement_ = objc.registerName("setRoundingIncrement:"); -late final _sel_minimumIntegerDigits = objc.registerName("minimumIntegerDigits"); -late final _sel_setMinimumIntegerDigits_ = objc.registerName("setMinimumIntegerDigits:"); -late final _sel_maximumIntegerDigits = objc.registerName("maximumIntegerDigits"); -late final _sel_setMaximumIntegerDigits_ = objc.registerName("setMaximumIntegerDigits:"); -late final _sel_minimumFractionDigits = objc.registerName("minimumFractionDigits"); -late final _sel_setMinimumFractionDigits_ = objc.registerName("setMinimumFractionDigits:"); -late final _sel_maximumFractionDigits = objc.registerName("maximumFractionDigits"); -late final _sel_setMaximumFractionDigits_ = objc.registerName("setMaximumFractionDigits:"); +late final _sel_setRoundingIncrement_ = + objc.registerName("setRoundingIncrement:"); +late final _sel_minimumIntegerDigits = + objc.registerName("minimumIntegerDigits"); +late final _sel_setMinimumIntegerDigits_ = + objc.registerName("setMinimumIntegerDigits:"); +late final _sel_maximumIntegerDigits = + objc.registerName("maximumIntegerDigits"); +late final _sel_setMaximumIntegerDigits_ = + objc.registerName("setMaximumIntegerDigits:"); +late final _sel_minimumFractionDigits = + objc.registerName("minimumFractionDigits"); +late final _sel_setMinimumFractionDigits_ = + objc.registerName("setMinimumFractionDigits:"); +late final _sel_maximumFractionDigits = + objc.registerName("maximumFractionDigits"); +late final _sel_setMaximumFractionDigits_ = + objc.registerName("setMaximumFractionDigits:"); late final _sel_minimum = objc.registerName("minimum"); late final _sel_setMinimum_ = objc.registerName("setMinimum:"); late final _sel_maximum = objc.registerName("maximum"); late final _sel_setMaximum_ = objc.registerName("setMaximum:"); -late final _sel_currencyGroupingSeparator = objc.registerName("currencyGroupingSeparator"); -late final _sel_setCurrencyGroupingSeparator_ = objc.registerName("setCurrencyGroupingSeparator:"); -late final _sel_usesSignificantDigits = objc.registerName("usesSignificantDigits"); -late final _sel_setUsesSignificantDigits_ = objc.registerName("setUsesSignificantDigits:"); -late final _sel_minimumSignificantDigits = objc.registerName("minimumSignificantDigits"); -late final _sel_setMinimumSignificantDigits_ = objc.registerName("setMinimumSignificantDigits:"); -late final _sel_maximumSignificantDigits = objc.registerName("maximumSignificantDigits"); -late final _sel_setMaximumSignificantDigits_ = objc.registerName("setMaximumSignificantDigits:"); -late final _sel_isPartialStringValidationEnabled = objc.registerName("isPartialStringValidationEnabled"); -late final _sel_setPartialStringValidationEnabled_ = objc.registerName("setPartialStringValidationEnabled:"); -late final _sel_hasThousandSeparators = objc.registerName("hasThousandSeparators"); -late final _sel_setHasThousandSeparators_ = objc.registerName("setHasThousandSeparators:"); +late final _sel_currencyGroupingSeparator = + objc.registerName("currencyGroupingSeparator"); +late final _sel_setCurrencyGroupingSeparator_ = + objc.registerName("setCurrencyGroupingSeparator:"); +late final _sel_usesSignificantDigits = + objc.registerName("usesSignificantDigits"); +late final _sel_setUsesSignificantDigits_ = + objc.registerName("setUsesSignificantDigits:"); +late final _sel_minimumSignificantDigits = + objc.registerName("minimumSignificantDigits"); +late final _sel_setMinimumSignificantDigits_ = + objc.registerName("setMinimumSignificantDigits:"); +late final _sel_maximumSignificantDigits = + objc.registerName("maximumSignificantDigits"); +late final _sel_setMaximumSignificantDigits_ = + objc.registerName("setMaximumSignificantDigits:"); +late final _sel_isPartialStringValidationEnabled = + objc.registerName("isPartialStringValidationEnabled"); +late final _sel_setPartialStringValidationEnabled_ = + objc.registerName("setPartialStringValidationEnabled:"); +late final _sel_hasThousandSeparators = + objc.registerName("hasThousandSeparators"); +late final _sel_setHasThousandSeparators_ = + objc.registerName("setHasThousandSeparators:"); late final _sel_thousandSeparator = objc.registerName("thousandSeparator"); -late final _sel_setThousandSeparator_ = objc.registerName("setThousandSeparator:"); +late final _sel_setThousandSeparator_ = + objc.registerName("setThousandSeparator:"); late final _sel_localizesFormat = objc.registerName("localizesFormat"); late final _sel_setLocalizesFormat_ = objc.registerName("setLocalizesFormat:"); late final _sel_format = objc.registerName("format"); late final _sel_setFormat_ = objc.registerName("setFormat:"); -late final _sel_attributedStringForZero = objc.registerName("attributedStringForZero"); -late final _sel_setAttributedStringForZero_ = objc.registerName("setAttributedStringForZero:"); -late final _sel_attributedStringForNil = objc.registerName("attributedStringForNil"); -late final _sel_setAttributedStringForNil_ = objc.registerName("setAttributedStringForNil:"); -late final _sel_attributedStringForNotANumber = objc.registerName("attributedStringForNotANumber"); -late final _sel_setAttributedStringForNotANumber_ = objc.registerName("setAttributedStringForNotANumber:"); -late final _class_NSDecimalNumberHandler = objc.getClass("NSDecimalNumberHandler"); +late final _sel_attributedStringForZero = + objc.registerName("attributedStringForZero"); +late final _sel_setAttributedStringForZero_ = + objc.registerName("setAttributedStringForZero:"); +late final _sel_attributedStringForNil = + objc.registerName("attributedStringForNil"); +late final _sel_setAttributedStringForNil_ = + objc.registerName("setAttributedStringForNil:"); +late final _sel_attributedStringForNotANumber = + objc.registerName("attributedStringForNotANumber"); +late final _sel_setAttributedStringForNotANumber_ = + objc.registerName("setAttributedStringForNotANumber:"); +late final _class_NSDecimalNumberHandler = + objc.getClass("NSDecimalNumberHandler"); + enum NSRoundingMode { NSRoundPlain(0), NSRoundDown(1), NSRoundUp(2), NSRoundBankers(3); - final int value; const NSRoundingMode(this.value); static NSRoundingMode fromValue(int value) => switch (value) { - 0 => NSRoundPlain, - 1 => NSRoundDown, - 2 => NSRoundUp, - 3 => NSRoundBankers, - _ => throw ArgumentError("Unknown value for NSRoundingMode: $value"), - }; - -} - -final _objc_msgSend_1iugf7h = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -int _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSRoundingMode_ffiVoid_fnPtrTrampoline , 0).cast(); -int _ObjCBlock_NSRoundingMode_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as int Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_NSRoundingMode_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSRoundingMode_ffiVoid_closureTrampoline , 0).cast(); + 0 => NSRoundPlain, + 1 => NSRoundDown, + 2 => NSRoundUp, + 3 => NSRoundBankers, + _ => throw ArgumentError("Unknown value for NSRoundingMode: $value"), + }; +} + +final _objc_msgSend_1iugf7h = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +int _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_NSRoundingMode_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSRoundingMode_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSRoundingMode_ffiVoid_closureTrampoline, 0) + .cast(); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_NSRoundingMode_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_NSRoundingMode_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_NSRoundingMode_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(NSRoundingMode Function(ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_NSRoundingMode_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0).value), - retain: false, release: true); + static objc.ObjCBlock)> + fromFunction(NSRoundingMode Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSRoundingMode_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0).value), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSRoundingMode_ffiVoid_CallExtension on objc.ObjCBlock)> { - NSRoundingMode call(ffi.Pointer arg0) =>NSRoundingMode.fromValue(ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0)); +extension ObjCBlock_NSRoundingMode_ffiVoid_CallExtension + on objc.ObjCBlock)> { + NSRoundingMode call(ffi.Pointer arg0) => + NSRoundingMode.fromValue(ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0)); } late final _sel_scale = objc.registerName("scale"); -final _objc_msgSend_157j54x = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -int _ObjCBlock_ffiShort_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiShort_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Short Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiShort_ffiVoid_fnPtrTrampoline , 0).cast(); -int _ObjCBlock_ffiShort_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as int Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiShort_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Short Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiShort_ffiVoid_closureTrampoline , 0).cast(); +final _objc_msgSend_157j54x = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +int _ObjCBlock_ffiShort_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiShort_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiShort_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_ffiShort_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiShort_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiShort_ffiVoid_closureTrampoline, 0) + .cast(); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiShort_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_ffiShort_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiShort_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(int Function(ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_ffiShort_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0)), - retain: false, release: true); + static objc.ObjCBlock)> fromFunction( + int Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_ffiShort_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiShort_ffiVoid_CallExtension on objc.ObjCBlock)> { - int call(ffi.Pointer arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0); +extension ObjCBlock_ffiShort_ffiVoid_CallExtension + on objc.ObjCBlock)> { + int call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } late final _class_NSDecimalNumber = objc.getClass("NSDecimalNumber"); -late final _sel_initWithMantissa_exponent_isNegative_ = objc.registerName("initWithMantissa:exponent:isNegative:"); -final _objc_msgSend_1f2l7cc = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLongLong , ffi.Short , ffi.Bool )>>().asFunction , ffi.Pointer , int , int , bool )>(); -late final _sel_initWithString_locale_ = objc.registerName("initWithString:locale:"); -late final _sel_descriptionWithLocale_ = objc.registerName("descriptionWithLocale:"); -late final _sel_decimalNumberWithMantissa_exponent_isNegative_ = objc.registerName("decimalNumberWithMantissa:exponent:isNegative:"); -late final _sel_decimalNumberWithString_ = objc.registerName("decimalNumberWithString:"); -late final _sel_decimalNumberWithString_locale_ = objc.registerName("decimalNumberWithString:locale:"); +late final _sel_initWithMantissa_exponent_isNegative_ = + objc.registerName("initWithMantissa:exponent:isNegative:"); +final _objc_msgSend_1f2l7cc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLongLong, + ffi.Short, + ffi.Bool)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, int, bool)>(); +late final _sel_initWithString_locale_ = + objc.registerName("initWithString:locale:"); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +late final _sel_decimalNumberWithMantissa_exponent_isNegative_ = + objc.registerName("decimalNumberWithMantissa:exponent:isNegative:"); +late final _sel_decimalNumberWithString_ = + objc.registerName("decimalNumberWithString:"); +late final _sel_decimalNumberWithString_locale_ = + objc.registerName("decimalNumberWithString:locale:"); late final _sel_zero = objc.registerName("zero"); late final _sel_one = objc.registerName("one"); -late final _sel_minimumDecimalNumber = objc.registerName("minimumDecimalNumber"); -late final _sel_maximumDecimalNumber = objc.registerName("maximumDecimalNumber"); +late final _sel_minimumDecimalNumber = + objc.registerName("minimumDecimalNumber"); +late final _sel_maximumDecimalNumber = + objc.registerName("maximumDecimalNumber"); late final _sel_notANumber = objc.registerName("notANumber"); -late final _sel_decimalNumberByAdding_ = objc.registerName("decimalNumberByAdding:"); -late final _sel_decimalNumberByAdding_withBehavior_ = objc.registerName("decimalNumberByAdding:withBehavior:"); -late final _sel_decimalNumberBySubtracting_ = objc.registerName("decimalNumberBySubtracting:"); -late final _sel_decimalNumberBySubtracting_withBehavior_ = objc.registerName("decimalNumberBySubtracting:withBehavior:"); -late final _sel_decimalNumberByMultiplyingBy_ = objc.registerName("decimalNumberByMultiplyingBy:"); -late final _sel_decimalNumberByMultiplyingBy_withBehavior_ = objc.registerName("decimalNumberByMultiplyingBy:withBehavior:"); -late final _sel_decimalNumberByDividingBy_ = objc.registerName("decimalNumberByDividingBy:"); -late final _sel_decimalNumberByDividingBy_withBehavior_ = objc.registerName("decimalNumberByDividingBy:withBehavior:"); -late final _sel_decimalNumberByRaisingToPower_ = objc.registerName("decimalNumberByRaisingToPower:"); -final _objc_msgSend_ehxl2g = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_decimalNumberByRaisingToPower_withBehavior_ = objc.registerName("decimalNumberByRaisingToPower:withBehavior:"); -final _objc_msgSend_m23d4r = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_decimalNumberByMultiplyingByPowerOf10_ = objc.registerName("decimalNumberByMultiplyingByPowerOf10:"); -final _objc_msgSend_15di41h = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Short )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_decimalNumberByMultiplyingByPowerOf10_withBehavior_ = objc.registerName("decimalNumberByMultiplyingByPowerOf10:withBehavior:"); -final _objc_msgSend_1y5v0cu = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Short , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_decimalNumberByRoundingAccordingToBehavior_ = objc.registerName("decimalNumberByRoundingAccordingToBehavior:"); +late final _sel_decimalNumberByAdding_ = + objc.registerName("decimalNumberByAdding:"); +late final _sel_decimalNumberByAdding_withBehavior_ = + objc.registerName("decimalNumberByAdding:withBehavior:"); +late final _sel_decimalNumberBySubtracting_ = + objc.registerName("decimalNumberBySubtracting:"); +late final _sel_decimalNumberBySubtracting_withBehavior_ = + objc.registerName("decimalNumberBySubtracting:withBehavior:"); +late final _sel_decimalNumberByMultiplyingBy_ = + objc.registerName("decimalNumberByMultiplyingBy:"); +late final _sel_decimalNumberByMultiplyingBy_withBehavior_ = + objc.registerName("decimalNumberByMultiplyingBy:withBehavior:"); +late final _sel_decimalNumberByDividingBy_ = + objc.registerName("decimalNumberByDividingBy:"); +late final _sel_decimalNumberByDividingBy_withBehavior_ = + objc.registerName("decimalNumberByDividingBy:withBehavior:"); +late final _sel_decimalNumberByRaisingToPower_ = + objc.registerName("decimalNumberByRaisingToPower:"); +final _objc_msgSend_ehxl2g = 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_decimalNumberByRaisingToPower_withBehavior_ = + objc.registerName("decimalNumberByRaisingToPower:withBehavior:"); +final _objc_msgSend_m23d4r = 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_decimalNumberByMultiplyingByPowerOf10_ = + objc.registerName("decimalNumberByMultiplyingByPowerOf10:"); +final _objc_msgSend_15di41h = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_decimalNumberByMultiplyingByPowerOf10_withBehavior_ = + objc.registerName("decimalNumberByMultiplyingByPowerOf10:withBehavior:"); +final _objc_msgSend_1y5v0cu = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Short, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_decimalNumberByRoundingAccordingToBehavior_ = + objc.registerName("decimalNumberByRoundingAccordingToBehavior:"); late final _sel_compare_ = objc.registerName("compare:"); -final _objc_msgSend_1ile2ev = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1ile2ev = 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_defaultBehavior = objc.registerName("defaultBehavior"); late final _sel_setDefaultBehavior_ = objc.registerName("setDefaultBehavior:"); late final _sel_objCType = objc.registerName("objCType"); -final _objc_msgSend_1ypnhm3 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1ypnhm3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_doubleValue = objc.registerName("doubleValue"); late final _sel_numberWithChar_ = objc.registerName("numberWithChar:"); -final _objc_msgSend_1pfmxrb = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Char )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_numberWithUnsignedChar_ = objc.registerName("numberWithUnsignedChar:"); -final _objc_msgSend_1ar9f5m = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedChar )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); +final _objc_msgSend_1pfmxrb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedChar_ = + objc.registerName("numberWithUnsignedChar:"); +final _objc_msgSend_1ar9f5m = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_numberWithShort_ = objc.registerName("numberWithShort:"); -late final _sel_numberWithUnsignedShort_ = objc.registerName("numberWithUnsignedShort:"); -final _objc_msgSend_122gbai = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedShort )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); +late final _sel_numberWithUnsignedShort_ = + objc.registerName("numberWithUnsignedShort:"); +final _objc_msgSend_122gbai = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_numberWithInt_ = objc.registerName("numberWithInt:"); -final _objc_msgSend_105o5we = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Int )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_numberWithUnsignedInt_ = objc.registerName("numberWithUnsignedInt:"); -final _objc_msgSend_pxgym4 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedInt )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); +final _objc_msgSend_105o5we = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedInt_ = + objc.registerName("numberWithUnsignedInt:"); +final _objc_msgSend_pxgym4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_numberWithLong_ = objc.registerName("numberWithLong:"); -late final _sel_numberWithUnsignedLong_ = objc.registerName("numberWithUnsignedLong:"); +late final _sel_numberWithUnsignedLong_ = + objc.registerName("numberWithUnsignedLong:"); late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:"); -final _objc_msgSend_yjzv9z = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.LongLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_numberWithUnsignedLongLong_ = objc.registerName("numberWithUnsignedLongLong:"); -final _objc_msgSend_ybbscc = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLongLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); +final _objc_msgSend_yjzv9z = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedLongLong_ = + objc.registerName("numberWithUnsignedLongLong:"); +final _objc_msgSend_ybbscc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:"); -final _objc_msgSend_1pmj399 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Float )>>().asFunction Function(ffi.Pointer , ffi.Pointer , double )>(); +final _objc_msgSend_1pmj399 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); -final _objc_msgSend_m7jc8y = objc.msgSendPointer.cast , ffi.Pointer , ffi.Double )>>().asFunction , ffi.Pointer , double )>(); +final _objc_msgSend_m7jc8y = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, double)>(); late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); -final _objc_msgSend_1upz917 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Bool )>>().asFunction Function(ffi.Pointer , ffi.Pointer , bool )>(); +final _objc_msgSend_1upz917 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:"); -late final _sel_numberWithUnsignedInteger_ = objc.registerName("numberWithUnsignedInteger:"); -late final _sel_initWithBytes_objCType_ = objc.registerName("initWithBytes:objCType:"); -final _objc_msgSend_1sdw29g = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_valueWithBytes_objCType_ = objc.registerName("valueWithBytes:objCType:"); +late final _sel_numberWithUnsignedInteger_ = + objc.registerName("numberWithUnsignedInteger:"); +late final _sel_initWithBytes_objCType_ = + objc.registerName("initWithBytes:objCType:"); +final _objc_msgSend_1sdw29g = 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_valueWithBytes_objCType_ = + objc.registerName("valueWithBytes:objCType:"); late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); -late final _sel_valueWithNonretainedObject_ = objc.registerName("valueWithNonretainedObject:"); +late final _sel_valueWithNonretainedObject_ = + objc.registerName("valueWithNonretainedObject:"); late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); -final _objc_msgSend_1ph8ubj = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1ph8ubj = 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_valueWithRange_ = objc.registerName("valueWithRange:"); -final class CGPoint extends ffi.Struct{ + +final class CGPoint extends ffi.Struct { @ffi.Double() external double x; @ffi.Double() external double y; - } late final _sel_valueWithPoint_ = objc.registerName("valueWithPoint:"); -final _objc_msgSend_1xj0srq = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , CGPoint )>>().asFunction Function(ffi.Pointer , ffi.Pointer , CGPoint )>(); -final class CGSize extends ffi.Struct{ +final _objc_msgSend_1xj0srq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGPoint)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGPoint)>(); + +final class CGSize extends ffi.Struct { @ffi.Double() external double width; @ffi.Double() external double height; - } late final _sel_valueWithSize_ = objc.registerName("valueWithSize:"); -final _objc_msgSend_fnn627 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , CGSize )>>().asFunction Function(ffi.Pointer , ffi.Pointer , CGSize )>(); -final class CGRect extends ffi.Struct{ +final _objc_msgSend_fnn627 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGSize)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGSize)>(); + +final class CGRect extends ffi.Struct { external CGPoint origin; external CGSize size; - } late final _sel_valueWithRect_ = objc.registerName("valueWithRect:"); -final _objc_msgSend_14yq09w = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , CGRect )>>().asFunction Function(ffi.Pointer , ffi.Pointer , CGRect )>(); -final class NSEdgeInsets extends ffi.Struct{ +final _objc_msgSend_14yq09w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGRect)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGRect)>(); + +final class NSEdgeInsets extends ffi.Struct { @ffi.Double() external double top; @@ -5500,72 +9162,100 @@ final class NSEdgeInsets extends ffi.Struct{ @ffi.Double() external double right; - } -late final _sel_valueWithEdgeInsets_ = objc.registerName("valueWithEdgeInsets:"); -final _objc_msgSend_12s6yn4 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , NSEdgeInsets )>>().asFunction Function(ffi.Pointer , ffi.Pointer , NSEdgeInsets )>(); +late final _sel_valueWithEdgeInsets_ = + objc.registerName("valueWithEdgeInsets:"); +final _objc_msgSend_12s6yn4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSEdgeInsets)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSEdgeInsets)>(); /// NSDecimalNumber class NSDecimalNumber extends objc.NSNumber { NSDecimalNumber._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSDecimalNumber] that points to the same underlying object as [other]. - NSDecimalNumber.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSDecimalNumber.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSDecimalNumber] that wraps the given raw object pointer. NSDecimalNumber.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSDecimalNumber]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSDecimalNumber); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDecimalNumber); } /// initWithMantissa:exponent:isNegative: - NSDecimalNumber initWithMantissa_exponent_isNegative_(int mantissa, int exponent, bool flag) { - final _ret = _objc_msgSend_1f2l7cc(this.ref.retainAndReturnPointer(), _sel_initWithMantissa_exponent_isNegative_, mantissa, exponent, flag); + NSDecimalNumber initWithMantissa_exponent_isNegative_( + int mantissa, int exponent, bool flag) { + final _ret = _objc_msgSend_1f2l7cc(this.ref.retainAndReturnPointer(), + _sel_initWithMantissa_exponent_isNegative_, mantissa, exponent, flag); return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithString: NSDecimalNumber initWithString_(objc.NSString? numberValue) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithString_, numberValue?.ref.pointer ?? ffi.nullptr); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, numberValue?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithString:locale: - NSDecimalNumber initWithString_locale_(objc.NSString? numberValue, objc.ObjCObjectBase? locale) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithString_locale_, numberValue?.ref.pointer ?? ffi.nullptr, locale?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber initWithString_locale_( + objc.NSString? numberValue, objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithString_locale_, + numberValue?.ref.pointer ?? ffi.nullptr, + locale?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// descriptionWithLocale: objc.NSString descriptionWithLocale_(objc.ObjCObjectBase? locale) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_descriptionWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_descriptionWithLocale_, locale?.ref.pointer ?? ffi.nullptr); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberWithMantissa:exponent:isNegative: - static NSDecimalNumber decimalNumberWithMantissa_exponent_isNegative_(int mantissa, int exponent, bool flag) { - final _ret = _objc_msgSend_1f2l7cc(_class_NSDecimalNumber, _sel_decimalNumberWithMantissa_exponent_isNegative_, mantissa, exponent, flag); + static NSDecimalNumber decimalNumberWithMantissa_exponent_isNegative_( + int mantissa, int exponent, bool flag) { + final _ret = _objc_msgSend_1f2l7cc( + _class_NSDecimalNumber, + _sel_decimalNumberWithMantissa_exponent_isNegative_, + mantissa, + exponent, + flag); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberWithString: static NSDecimalNumber decimalNumberWithString_(objc.NSString? numberValue) { - final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, _sel_decimalNumberWithString_, numberValue?.ref.pointer ?? ffi.nullptr); + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, + _sel_decimalNumberWithString_, numberValue?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberWithString:locale: - static NSDecimalNumber decimalNumberWithString_locale_(objc.NSString? numberValue, objc.ObjCObjectBase? locale) { - final _ret = _objc_msgSend_iq11qg(_class_NSDecimalNumber, _sel_decimalNumberWithString_locale_, numberValue?.ref.pointer ?? ffi.nullptr, locale?.ref.pointer ?? ffi.nullptr); + static NSDecimalNumber decimalNumberWithString_locale_( + objc.NSString? numberValue, objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_iq11qg( + _class_NSDecimalNumber, + _sel_decimalNumberWithString_locale_, + numberValue?.ref.pointer ?? ffi.nullptr, + locale?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } @@ -5583,13 +9273,15 @@ class NSDecimalNumber extends objc.NSNumber { /// minimumDecimalNumber static NSDecimalNumber getMinimumDecimalNumber() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_minimumDecimalNumber); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_minimumDecimalNumber); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// maximumDecimalNumber static NSDecimalNumber getMaximumDecimalNumber() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_maximumDecimalNumber); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_maximumDecimalNumber); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } @@ -5601,271 +9293,346 @@ class NSDecimalNumber extends objc.NSNumber { /// decimalNumberByAdding: NSDecimalNumber decimalNumberByAdding_(NSDecimalNumber decimalNumber) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_decimalNumberByAdding_, decimalNumber.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberByAdding_, decimalNumber.ref.pointer); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByAdding:withBehavior: - NSDecimalNumber decimalNumberByAdding_withBehavior_(NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_decimalNumberByAdding_withBehavior_, decimalNumber.ref.pointer, behavior?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber decimalNumberByAdding_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberByAdding_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberBySubtracting: NSDecimalNumber decimalNumberBySubtracting_(NSDecimalNumber decimalNumber) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_decimalNumberBySubtracting_, decimalNumber.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberBySubtracting_, decimalNumber.ref.pointer); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberBySubtracting:withBehavior: - NSDecimalNumber decimalNumberBySubtracting_withBehavior_(NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_decimalNumberBySubtracting_withBehavior_, decimalNumber.ref.pointer, behavior?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber decimalNumberBySubtracting_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberBySubtracting_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByMultiplyingBy: NSDecimalNumber decimalNumberByMultiplyingBy_(NSDecimalNumber decimalNumber) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_decimalNumberByMultiplyingBy_, decimalNumber.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberByMultiplyingBy_, decimalNumber.ref.pointer); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByMultiplyingBy:withBehavior: - NSDecimalNumber decimalNumberByMultiplyingBy_withBehavior_(NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_decimalNumberByMultiplyingBy_withBehavior_, decimalNumber.ref.pointer, behavior?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber decimalNumberByMultiplyingBy_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberByMultiplyingBy_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByDividingBy: NSDecimalNumber decimalNumberByDividingBy_(NSDecimalNumber decimalNumber) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_decimalNumberByDividingBy_, decimalNumber.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_decimalNumberByDividingBy_, decimalNumber.ref.pointer); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByDividingBy:withBehavior: - NSDecimalNumber decimalNumberByDividingBy_withBehavior_(NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_decimalNumberByDividingBy_withBehavior_, decimalNumber.ref.pointer, behavior?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber decimalNumberByDividingBy_withBehavior_( + NSDecimalNumber decimalNumber, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_decimalNumberByDividingBy_withBehavior_, + decimalNumber.ref.pointer, + behavior?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByRaisingToPower: NSDecimalNumber decimalNumberByRaisingToPower_(int power) { - final _ret = _objc_msgSend_ehxl2g(this.ref.pointer, _sel_decimalNumberByRaisingToPower_, power); + final _ret = _objc_msgSend_ehxl2g( + this.ref.pointer, _sel_decimalNumberByRaisingToPower_, power); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByRaisingToPower:withBehavior: - NSDecimalNumber decimalNumberByRaisingToPower_withBehavior_(int power, objc.ObjCObjectBase? behavior) { - final _ret = _objc_msgSend_m23d4r(this.ref.pointer, _sel_decimalNumberByRaisingToPower_withBehavior_, power, behavior?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber decimalNumberByRaisingToPower_withBehavior_( + int power, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_m23d4r( + this.ref.pointer, + _sel_decimalNumberByRaisingToPower_withBehavior_, + power, + behavior?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByMultiplyingByPowerOf10: NSDecimalNumber decimalNumberByMultiplyingByPowerOf10_(int power) { - final _ret = _objc_msgSend_15di41h(this.ref.pointer, _sel_decimalNumberByMultiplyingByPowerOf10_, power); + final _ret = _objc_msgSend_15di41h( + this.ref.pointer, _sel_decimalNumberByMultiplyingByPowerOf10_, power); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByMultiplyingByPowerOf10:withBehavior: - NSDecimalNumber decimalNumberByMultiplyingByPowerOf10_withBehavior_(int power, objc.ObjCObjectBase? behavior) { - final _ret = _objc_msgSend_1y5v0cu(this.ref.pointer, _sel_decimalNumberByMultiplyingByPowerOf10_withBehavior_, power, behavior?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber decimalNumberByMultiplyingByPowerOf10_withBehavior_( + int power, objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_1y5v0cu( + this.ref.pointer, + _sel_decimalNumberByMultiplyingByPowerOf10_withBehavior_, + power, + behavior?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// decimalNumberByRoundingAccordingToBehavior: - NSDecimalNumber decimalNumberByRoundingAccordingToBehavior_(objc.ObjCObjectBase? behavior) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_decimalNumberByRoundingAccordingToBehavior_, behavior?.ref.pointer ?? ffi.nullptr); + NSDecimalNumber decimalNumberByRoundingAccordingToBehavior_( + objc.ObjCObjectBase? behavior) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, + _sel_decimalNumberByRoundingAccordingToBehavior_, + behavior?.ref.pointer ?? ffi.nullptr); return NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// compare: objc.NSComparisonResult compare_(objc.NSNumber decimalNumber) { - final _ret = _objc_msgSend_1ile2ev(this.ref.pointer, _sel_compare_, decimalNumber.ref.pointer); + final _ret = _objc_msgSend_1ile2ev( + this.ref.pointer, _sel_compare_, decimalNumber.ref.pointer); return objc.NSComparisonResult.fromValue(_ret); } /// defaultBehavior static objc.ObjCObjectBase getDefaultBehavior() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_defaultBehavior); + final _ret = + _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_defaultBehavior); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDefaultBehavior: static void setDefaultBehavior(objc.ObjCObjectBase value) { - return _objc_msgSend_ukcdfq(_class_NSDecimalNumber, _sel_setDefaultBehavior_, value.ref.pointer); - + return _objc_msgSend_ukcdfq( + _class_NSDecimalNumber, _sel_setDefaultBehavior_, value.ref.pointer); } /// objCType ffi.Pointer get objCType { return _objc_msgSend_1ypnhm3(this.ref.pointer, _sel_objCType); - } /// doubleValue double get doubleValue { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_doubleValue) : _objc_msgSend_10noklm(this.ref.pointer, _sel_doubleValue); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_doubleValue) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_doubleValue); } /// initWithCoder: NSDecimalNumber? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// numberWithChar: static objc.NSNumber numberWithChar_(int value) { - final _ret = _objc_msgSend_1pfmxrb(_class_NSDecimalNumber, _sel_numberWithChar_, value); + final _ret = _objc_msgSend_1pfmxrb( + _class_NSDecimalNumber, _sel_numberWithChar_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedChar: static objc.NSNumber numberWithUnsignedChar_(int value) { - final _ret = _objc_msgSend_1ar9f5m(_class_NSDecimalNumber, _sel_numberWithUnsignedChar_, value); + final _ret = _objc_msgSend_1ar9f5m( + _class_NSDecimalNumber, _sel_numberWithUnsignedChar_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithShort: static objc.NSNumber numberWithShort_(int value) { - final _ret = _objc_msgSend_15di41h(_class_NSDecimalNumber, _sel_numberWithShort_, value); + final _ret = _objc_msgSend_15di41h( + _class_NSDecimalNumber, _sel_numberWithShort_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedShort: static objc.NSNumber numberWithUnsignedShort_(int value) { - final _ret = _objc_msgSend_122gbai(_class_NSDecimalNumber, _sel_numberWithUnsignedShort_, value); + final _ret = _objc_msgSend_122gbai( + _class_NSDecimalNumber, _sel_numberWithUnsignedShort_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithInt: static objc.NSNumber numberWithInt_(int value) { - final _ret = _objc_msgSend_105o5we(_class_NSDecimalNumber, _sel_numberWithInt_, value); + final _ret = _objc_msgSend_105o5we( + _class_NSDecimalNumber, _sel_numberWithInt_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedInt: static objc.NSNumber numberWithUnsignedInt_(int value) { - final _ret = _objc_msgSend_pxgym4(_class_NSDecimalNumber, _sel_numberWithUnsignedInt_, value); + final _ret = _objc_msgSend_pxgym4( + _class_NSDecimalNumber, _sel_numberWithUnsignedInt_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithLong: static objc.NSNumber numberWithLong_(int value) { - final _ret = _objc_msgSend_crtxa9(_class_NSDecimalNumber, _sel_numberWithLong_, value); + final _ret = _objc_msgSend_crtxa9( + _class_NSDecimalNumber, _sel_numberWithLong_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedLong: static objc.NSNumber numberWithUnsignedLong_(int value) { - final _ret = _objc_msgSend_ehxl2g(_class_NSDecimalNumber, _sel_numberWithUnsignedLong_, value); + final _ret = _objc_msgSend_ehxl2g( + _class_NSDecimalNumber, _sel_numberWithUnsignedLong_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithLongLong: static objc.NSNumber numberWithLongLong_(int value) { - final _ret = _objc_msgSend_yjzv9z(_class_NSDecimalNumber, _sel_numberWithLongLong_, value); + final _ret = _objc_msgSend_yjzv9z( + _class_NSDecimalNumber, _sel_numberWithLongLong_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedLongLong: static objc.NSNumber numberWithUnsignedLongLong_(int value) { - final _ret = _objc_msgSend_ybbscc(_class_NSDecimalNumber, _sel_numberWithUnsignedLongLong_, value); + final _ret = _objc_msgSend_ybbscc( + _class_NSDecimalNumber, _sel_numberWithUnsignedLongLong_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithFloat: static objc.NSNumber numberWithFloat_(double value) { - final _ret = _objc_msgSend_1pmj399(_class_NSDecimalNumber, _sel_numberWithFloat_, value); + final _ret = _objc_msgSend_1pmj399( + _class_NSDecimalNumber, _sel_numberWithFloat_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithDouble: static objc.NSNumber numberWithDouble_(double value) { - final _ret = _objc_msgSend_m7jc8y(_class_NSDecimalNumber, _sel_numberWithDouble_, value); + final _ret = _objc_msgSend_m7jc8y( + _class_NSDecimalNumber, _sel_numberWithDouble_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithBool: static objc.NSNumber numberWithBool_(bool value) { - final _ret = _objc_msgSend_1upz917(_class_NSDecimalNumber, _sel_numberWithBool_, value); + final _ret = _objc_msgSend_1upz917( + _class_NSDecimalNumber, _sel_numberWithBool_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithInteger: static objc.NSNumber numberWithInteger_(int value) { - final _ret = _objc_msgSend_crtxa9(_class_NSDecimalNumber, _sel_numberWithInteger_, value); + final _ret = _objc_msgSend_crtxa9( + _class_NSDecimalNumber, _sel_numberWithInteger_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedInteger: static objc.NSNumber numberWithUnsignedInteger_(int value) { - final _ret = _objc_msgSend_ehxl2g(_class_NSDecimalNumber, _sel_numberWithUnsignedInteger_, value); + final _ret = _objc_msgSend_ehxl2g( + _class_NSDecimalNumber, _sel_numberWithUnsignedInteger_, value); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// initWithBytes:objCType: - NSDecimalNumber initWithBytes_objCType_(ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_1sdw29g(this.ref.retainAndReturnPointer(), _sel_initWithBytes_objCType_, value, type); + NSDecimalNumber initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_1sdw29g(this.ref.retainAndReturnPointer(), + _sel_initWithBytes_objCType_, value, type); return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } /// valueWithBytes:objCType: - static objc.NSValue valueWithBytes_objCType_(ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_1sdw29g(_class_NSDecimalNumber, _sel_valueWithBytes_objCType_, value, type); + static objc.NSValue valueWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_1sdw29g( + _class_NSDecimalNumber, _sel_valueWithBytes_objCType_, value, type); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// value:withObjCType: - static objc.NSValue value_withObjCType_(ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_1sdw29g(_class_NSDecimalNumber, _sel_value_withObjCType_, value, type); + static objc.NSValue value_withObjCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_1sdw29g( + _class_NSDecimalNumber, _sel_value_withObjCType_, value, type); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// valueWithNonretainedObject: - static objc.NSValue valueWithNonretainedObject_(objc.ObjCObjectBase? anObject) { - final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, _sel_valueWithNonretainedObject_, anObject?.ref.pointer ?? ffi.nullptr); + static objc.NSValue valueWithNonretainedObject_( + objc.ObjCObjectBase? anObject) { + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, + _sel_valueWithNonretainedObject_, anObject?.ref.pointer ?? ffi.nullptr); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// valueWithPointer: static objc.NSValue valueWithPointer_(ffi.Pointer pointer) { - final _ret = _objc_msgSend_1ph8ubj(_class_NSDecimalNumber, _sel_valueWithPointer_, pointer); + final _ret = _objc_msgSend_1ph8ubj( + _class_NSDecimalNumber, _sel_valueWithPointer_, pointer); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// valueWithRange: static objc.NSValue valueWithRange_(objc.NSRange range) { - final _ret = _objc_msgSend_176f8tz(_class_NSDecimalNumber, _sel_valueWithRange_, range); + final _ret = _objc_msgSend_176f8tz( + _class_NSDecimalNumber, _sel_valueWithRange_, range); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// valueWithPoint: static objc.NSValue valueWithPoint_(CGPoint point) { - final _ret = _objc_msgSend_1xj0srq(_class_NSDecimalNumber, _sel_valueWithPoint_, point); + final _ret = _objc_msgSend_1xj0srq( + _class_NSDecimalNumber, _sel_valueWithPoint_, point); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// valueWithSize: static objc.NSValue valueWithSize_(CGSize size) { - final _ret = _objc_msgSend_fnn627(_class_NSDecimalNumber, _sel_valueWithSize_, size); + final _ret = + _objc_msgSend_fnn627(_class_NSDecimalNumber, _sel_valueWithSize_, size); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// valueWithRect: static objc.NSValue valueWithRect_(CGRect rect) { - final _ret = _objc_msgSend_14yq09w(_class_NSDecimalNumber, _sel_valueWithRect_, rect); + final _ret = _objc_msgSend_14yq09w( + _class_NSDecimalNumber, _sel_valueWithRect_, rect); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// valueWithEdgeInsets: static objc.NSValue valueWithEdgeInsets_(NSEdgeInsets insets) { - final _ret = _objc_msgSend_12s6yn4(_class_NSDecimalNumber, _sel_valueWithEdgeInsets_, insets); + final _ret = _objc_msgSend_12s6yn4( + _class_NSDecimalNumber, _sel_valueWithEdgeInsets_, insets); return objc.NSValue.castFromPointer(_ret, retain: true, release: true); } /// init NSDecimalNumber init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } @@ -5877,7 +9644,8 @@ class NSDecimalNumber extends objc.NSNumber { /// allocWithZone: static NSDecimalNumber allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSDecimalNumber, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDecimalNumber, _sel_allocWithZone_, zone); return NSDecimalNumber.castFromPointer(_ret, retain: false, release: true); } @@ -5888,63 +9656,77 @@ class NSDecimalNumber extends objc.NSNumber { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSDecimalNumber, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSDecimalNumber, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSDecimalNumber, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSDecimalNumber, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSDecimalNumber, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSDecimalNumber, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSDecimalNumber, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumber, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSDecimalNumber, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSDecimalNumber, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSDecimalNumber, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSDecimalNumber, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumber, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumber, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSDecimalNumber, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSDecimalNumber, _sel_supportsSecureCoding); } } @@ -5955,204 +9737,428 @@ enum NSCalculationError { NSCalculationOverflow(3), NSCalculationDivideByZero(4); - final int value; const NSCalculationError(this.value); static NSCalculationError fromValue(int value) => switch (value) { - 0 => NSCalculationNoError, - 1 => NSCalculationLossOfPrecision, - 2 => NSCalculationUnderflow, - 3 => NSCalculationOverflow, - 4 => NSCalculationDivideByZero, - _ => throw ArgumentError("Unknown value for NSCalculationError: $value"), - }; - -} - -late final _sel_exceptionDuringOperation_error_leftOperand_rightOperand_ = objc.registerName("exceptionDuringOperation:error:leftOperand:rightOperand:"); -final _objc_msgSend_bx1eho = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer )>(); -ffi.Pointer _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, int arg2, ffi.Pointer arg3, ffi.Pointer arg4) => - block.ref.target.cast Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2, ffi.Pointer arg3, ffi.Pointer arg4)>>() - .asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, int arg2, ffi.Pointer arg3, ffi.Pointer arg4) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer ))(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureTrampoline ).cast(); + 0 => NSCalculationNoError, + 1 => NSCalculationLossOfPrecision, + 2 => NSCalculationUnderflow, + 3 => NSCalculationOverflow, + 4 => NSCalculationDivideByZero, + _ => + throw ArgumentError("Unknown value for NSCalculationError: $value"), + }; +} + +late final _sel_exceptionDuringOperation_error_leftOperand_rightOperand_ = objc + .registerName("exceptionDuringOperation:error:leftOperand:rightOperand:"); +final _objc_msgSend_bx1eho = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +ffi.Pointer _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>`. abstract final class ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + NSDecimalNumber? Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSDecimalNumber, + NSDecimalNumber?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + NSDecimalNumber? Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSDecimalNumber, + NSDecimalNumber?)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => - objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>(objc.newPointerBlock(_ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>> + ptr) => + objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>( + objc.newPointerBlock(_ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> fromFunction(NSDecimalNumber? Function(ffi.Pointer , ffi.Pointer , NSCalculationError , NSDecimalNumber , NSDecimalNumber? ) fn) => - objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>(objc.newClosureBlock(_ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, int arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn(arg0, arg1, NSCalculationError.fromValue(arg2), NSDecimalNumber.castFromPointer(arg3, retain: true, release: true), arg4.address == 0 ? null : NSDecimalNumber.castFromPointer(arg4, retain: true, release: true))?.ref.retainAndAutorelease() ?? ffi.nullptr), - retain: false, release: true); + static objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> + fromFunction(NSDecimalNumber? Function(ffi.Pointer, ffi.Pointer, NSCalculationError, NSDecimalNumber, NSDecimalNumber?) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>( + objc.newClosureBlock( + _ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn(arg0, arg1, NSCalculationError.fromValue(arg2), NSDecimalNumber.castFromPointer(arg3, retain: true, release: true), arg4.address == 0 ? null : NSDecimalNumber.castFromPointer(arg4, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)>`. -extension ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_CallExtension on objc.ObjCBlock, ffi.Pointer, ffi.UnsignedLong, NSDecimalNumber, NSDecimalNumber?)> { - NSDecimalNumber? call(ffi.Pointer arg0, ffi.Pointer arg1, NSCalculationError arg2, NSDecimalNumber arg3, NSDecimalNumber? arg4) =>ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2, ffi.Pointer arg3, ffi.Pointer arg4)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1, arg2.value, arg3.ref.pointer, arg4?.ref.pointer ?? ffi.nullptr).address == 0 ? null : NSDecimalNumber.castFromPointer(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2, ffi.Pointer arg3, ffi.Pointer arg4)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1, arg2.value, arg3.ref.pointer, arg4?.ref.pointer ?? ffi.nullptr), retain: true, release: true); -} - -late final _sel_defaultDecimalNumberHandler = objc.registerName("defaultDecimalNumberHandler"); -late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = objc.registerName("initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); -final _objc_msgSend_1efxg5u = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.Short , ffi.Bool , ffi.Bool , ffi.Bool , ffi.Bool )>>().asFunction , ffi.Pointer , int , int , bool , bool , bool , bool )>(); -late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = objc.registerName("decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +extension ObjCBlock_NSDecimalNumber_ffiVoid_objcObjCSelector_NSCalculationError_NSDecimalNumber_NSDecimalNumber_CallExtension + on objc.ObjCBlock< + NSDecimalNumber? Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSDecimalNumber, + NSDecimalNumber?)> { + NSDecimalNumber? call( + ffi.Pointer arg0, + ffi.Pointer arg1, + NSCalculationError arg2, + NSDecimalNumber arg3, + NSDecimalNumber? arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>() + (ref.pointer, arg0, arg1, arg2.value, arg3.ref.pointer, arg4?.ref.pointer ?? ffi.nullptr) + .address == + 0 + ? null + : NSDecimalNumber.castFromPointer(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2, ffi.Pointer arg3, ffi.Pointer arg4)>>().asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1, arg2.value, arg3.ref.pointer, arg4?.ref.pointer ?? ffi.nullptr), retain: true, release: true); +} + +late final _sel_defaultDecimalNumberHandler = + objc.registerName("defaultDecimalNumberHandler"); +late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +final _objc_msgSend_1efxg5u = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Short, + ffi.Bool, + ffi.Bool, + ffi.Bool, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + bool, + bool, + bool, + bool)>(); +late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); /// NSDecimalNumberHandler class NSDecimalNumberHandler extends objc.NSObject { NSDecimalNumberHandler._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSDecimalNumberHandler] that points to the same underlying object as [other]. - NSDecimalNumberHandler.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSDecimalNumberHandler.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSDecimalNumberHandler] that wraps the given raw object pointer. NSDecimalNumberHandler.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); } /// defaultDecimalNumberHandler static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } /// initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero: - NSDecimalNumberHandler initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_(NSRoundingMode roundingMode, int scale, bool exact, bool overflow, bool underflow, bool divideByZero) { - final _ret = _objc_msgSend_1efxg5u(this.ref.retainAndReturnPointer(), _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, roundingMode.value, scale, exact, overflow, underflow, divideByZero); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: false, release: true); + NSDecimalNumberHandler + initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + NSRoundingMode roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_1efxg5u( + this.ref.retainAndReturnPointer(), + _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode.value, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } /// decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero: - static NSDecimalNumberHandler decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_(NSRoundingMode roundingMode, int scale, bool exact, bool overflow, bool underflow, bool divideByZero) { - final _ret = _objc_msgSend_1efxg5u(_class_NSDecimalNumberHandler, _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, roundingMode.value, scale, exact, overflow, underflow, divideByZero); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: true, release: true); + static NSDecimalNumberHandler + decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + NSRoundingMode roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_1efxg5u( + _class_NSDecimalNumberHandler, + _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode.value, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } /// init NSDecimalNumberHandler init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } /// new static NSDecimalNumberHandler new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_new); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: false, release: true); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSDecimalNumberHandler alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_alloc); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_alloc); + return NSDecimalNumberHandler.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_cqxsqq(_class_NSDecimalNumberHandler, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSDecimalNumberHandler, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSDecimalNumberHandler, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSDecimalNumberHandler, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumberHandler, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSDecimalNumberHandler, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSDecimalNumberHandler, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSDecimalNumberHandler, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSDecimalNumberHandler, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSDecimalNumberHandler, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSDecimalNumberHandler self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: true, release: true); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } /// retain NSDecimalNumberHandler retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: true, release: true); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSDecimalNumberHandler autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: true, release: true); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } /// roundingMode @@ -6164,98 +10170,136 @@ _objc_msgSend_1tjlcwl(_class_NSDecimalNumberHandler, _sel_setKeys_triggerChangeN /// scale int scale() { return _objc_msgSend_157j54x(this.ref.pointer, _sel_scale); - } /// exceptionDuringOperation:error:leftOperand:rightOperand: - NSDecimalNumber? exceptionDuringOperation_error_leftOperand_rightOperand_(ffi.Pointer operation, NSCalculationError error, NSDecimalNumber leftOperand, NSDecimalNumber? rightOperand) { - final _ret = _objc_msgSend_bx1eho(this.ref.pointer, _sel_exceptionDuringOperation_error_leftOperand_rightOperand_, operation, error.value, leftOperand.ref.pointer, rightOperand?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); + NSDecimalNumber? exceptionDuringOperation_error_leftOperand_rightOperand_( + ffi.Pointer operation, + NSCalculationError error, + NSDecimalNumber leftOperand, + NSDecimalNumber? rightOperand) { + final _ret = _objc_msgSend_bx1eho( + this.ref.pointer, + _sel_exceptionDuringOperation_error_leftOperand_rightOperand_, + operation, + error.value, + leftOperand.ref.pointer, + rightOperand?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSDecimalNumber.castFromPointer(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSDecimalNumberHandler? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSDecimalNumberHandler.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } } late final _sel_roundingBehavior = objc.registerName("roundingBehavior"); -late final _sel_setRoundingBehavior_ = objc.registerName("setRoundingBehavior:"); +late final _sel_setRoundingBehavior_ = + objc.registerName("setRoundingBehavior:"); /// NSNumberFormatter class NSNumberFormatter extends NSFormatter { NSNumberFormatter._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSNumberFormatter] that points to the same underlying object as [other]. - NSNumberFormatter.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSNumberFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSNumberFormatter] that wraps the given raw object pointer. NSNumberFormatter.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSNumberFormatter]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); } /// formattingContext NSFormattingContext get formattingContext { - final _ret = _objc_msgSend_10wicfq(this.ref.pointer, _sel_formattingContext); + final _ret = + _objc_msgSend_10wicfq(this.ref.pointer, _sel_formattingContext); return NSFormattingContext.fromValue(_ret); } /// setFormattingContext: - set formattingContext(NSFormattingContext value) { - return _objc_msgSend_1gtwv7x(this.ref.pointer, _sel_setFormattingContext_, value.value); - + set formattingContext(NSFormattingContext value) { + return _objc_msgSend_1gtwv7x( + this.ref.pointer, _sel_setFormattingContext_, value.value); } /// getObjectValue:forString:range:error: - bool getObjectValue_forString_range_error_(ffi.Pointer> obj, objc.NSString string, ffi.Pointer rangep, ffi.Pointer> error) { - return _objc_msgSend_bl9kx(this.ref.pointer, _sel_getObjectValue_forString_range_error_, obj, string.ref.pointer, rangep, error); - + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer rangep, + ffi.Pointer> error) { + return _objc_msgSend_bl9kx( + this.ref.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.ref.pointer, + rangep, + error); } /// stringFromNumber: objc.NSString? stringFromNumber_(objc.NSNumber number) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_stringFromNumber_, number.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_stringFromNumber_, number.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// numberFromString: objc.NSNumber? numberFromString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_numberFromString_, string.ref.pointer); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_numberFromString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// localizedStringFromNumber:numberStyle: - static objc.NSString localizedStringFromNumber_numberStyle_(objc.NSNumber num, NSNumberFormatterStyle nstyle) { - final _ret = _objc_msgSend_1dsaaq7(_class_NSNumberFormatter, _sel_localizedStringFromNumber_numberStyle_, num.ref.pointer, nstyle.value); + static objc.NSString localizedStringFromNumber_numberStyle_( + objc.NSNumber num, NSNumberFormatterStyle nstyle) { + final _ret = _objc_msgSend_1dsaaq7( + _class_NSNumberFormatter, + _sel_localizedStringFromNumber_numberStyle_, + num.ref.pointer, + nstyle.value); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// defaultFormatterBehavior static NSNumberFormatterBehavior defaultFormatterBehavior() { - final _ret = _objc_msgSend_1nvfxwt(_class_NSNumberFormatter, _sel_defaultFormatterBehavior); + final _ret = _objc_msgSend_1nvfxwt( + _class_NSNumberFormatter, _sel_defaultFormatterBehavior); return NSNumberFormatterBehavior.fromValue(_ret); } /// setDefaultFormatterBehavior: static void setDefaultFormatterBehavior_(NSNumberFormatterBehavior behavior) { -_objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior.value); - + _objc_msgSend_1p18hg0(_class_NSNumberFormatter, + _sel_setDefaultFormatterBehavior_, behavior.value); } /// numberStyle @@ -6265,9 +10309,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setNumberStyle: - set numberStyle(NSNumberFormatterStyle value) { - return _objc_msgSend_qp19lh(this.ref.pointer, _sel_setNumberStyle_, value.value); - + set numberStyle(NSNumberFormatterStyle value) { + return _objc_msgSend_qp19lh( + this.ref.pointer, _sel_setNumberStyle_, value.value); } /// locale @@ -6277,33 +10321,33 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setLocale: - set locale(objc.NSLocale value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocale_, value.ref.pointer); - + set locale(objc.NSLocale value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value.ref.pointer); } /// generatesDecimalNumbers bool get generatesDecimalNumbers { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_generatesDecimalNumbers); - } /// setGeneratesDecimalNumbers: - set generatesDecimalNumbers(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setGeneratesDecimalNumbers_, value); - + set generatesDecimalNumbers(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setGeneratesDecimalNumbers_, value); } /// formatterBehavior NSNumberFormatterBehavior get formatterBehavior { - final _ret = _objc_msgSend_1nvfxwt(this.ref.pointer, _sel_formatterBehavior); + final _ret = + _objc_msgSend_1nvfxwt(this.ref.pointer, _sel_formatterBehavior); return NSNumberFormatterBehavior.fromValue(_ret); } /// setFormatterBehavior: - set formatterBehavior(NSNumberFormatterBehavior value) { - return _objc_msgSend_1p18hg0(this.ref.pointer, _sel_setFormatterBehavior_, value.value); - + set formatterBehavior(NSNumberFormatterBehavior value) { + return _objc_msgSend_1p18hg0( + this.ref.pointer, _sel_setFormatterBehavior_, value.value); } /// negativeFormat @@ -6313,21 +10357,26 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setNegativeFormat: - set negativeFormat(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNegativeFormat_, value.ref.pointer); - + set negativeFormat(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativeFormat_, value.ref.pointer); } /// textAttributesForNegativeValues objc.NSDictionary? get textAttributesForNegativeValues { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForNegativeValues); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForNegativeValues); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setTextAttributesForNegativeValues: - set textAttributesForNegativeValues(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForNegativeValues_, value?.ref.pointer ?? ffi.nullptr); - + set textAttributesForNegativeValues(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setTextAttributesForNegativeValues_, + value?.ref.pointer ?? ffi.nullptr); } /// positiveFormat @@ -6337,33 +10386,37 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPositiveFormat: - set positiveFormat(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPositiveFormat_, value.ref.pointer); - + set positiveFormat(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositiveFormat_, value.ref.pointer); } /// textAttributesForPositiveValues objc.NSDictionary? get textAttributesForPositiveValues { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForPositiveValues); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForPositiveValues); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setTextAttributesForPositiveValues: - set textAttributesForPositiveValues(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForPositiveValues_, value?.ref.pointer ?? ffi.nullptr); - + set textAttributesForPositiveValues(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setTextAttributesForPositiveValues_, + value?.ref.pointer ?? ffi.nullptr); } /// allowsFloats bool get allowsFloats { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsFloats); - } /// setAllowsFloats: - set allowsFloats(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsFloats_, value); - + set allowsFloats(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsFloats_, value); } /// decimalSeparator @@ -6373,81 +10426,87 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setDecimalSeparator: - set decimalSeparator(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDecimalSeparator_, value.ref.pointer); - + set decimalSeparator(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDecimalSeparator_, value.ref.pointer); } /// alwaysShowsDecimalSeparator bool get alwaysShowsDecimalSeparator { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_alwaysShowsDecimalSeparator); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_alwaysShowsDecimalSeparator); } /// setAlwaysShowsDecimalSeparator: - set alwaysShowsDecimalSeparator(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); - + set alwaysShowsDecimalSeparator(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); } /// currencyDecimalSeparator objc.NSString get currencyDecimalSeparator { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencyDecimalSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencyDecimalSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCurrencyDecimalSeparator: - set currencyDecimalSeparator(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrencyDecimalSeparator_, value.ref.pointer); - + set currencyDecimalSeparator(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrencyDecimalSeparator_, value.ref.pointer); } /// usesGroupingSeparator bool get usesGroupingSeparator { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_usesGroupingSeparator); - } /// setUsesGroupingSeparator: - set usesGroupingSeparator(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setUsesGroupingSeparator_, value); - + set usesGroupingSeparator(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesGroupingSeparator_, value); } /// groupingSeparator objc.NSString get groupingSeparator { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_groupingSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_groupingSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setGroupingSeparator: - set groupingSeparator(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setGroupingSeparator_, value.ref.pointer); - + set groupingSeparator(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setGroupingSeparator_, value.ref.pointer); } /// zeroSymbol objc.NSString? get zeroSymbol { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_zeroSymbol); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setZeroSymbol: - set zeroSymbol(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setZeroSymbol_, value?.ref.pointer ?? ffi.nullptr); - + set zeroSymbol(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setZeroSymbol_, + value?.ref.pointer ?? ffi.nullptr); } /// textAttributesForZero objc.NSDictionary? get textAttributesForZero { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForZero); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForZero); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setTextAttributesForZero: - set textAttributesForZero(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForZero_, value?.ref.pointer ?? ffi.nullptr); - + set textAttributesForZero(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setTextAttributesForZero_, value?.ref.pointer ?? ffi.nullptr); } /// nilSymbol @@ -6457,21 +10516,24 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setNilSymbol: - set nilSymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNilSymbol_, value.ref.pointer); - + set nilSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNilSymbol_, value.ref.pointer); } /// textAttributesForNil objc.NSDictionary? get textAttributesForNil { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForNil); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForNil); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setTextAttributesForNil: - set textAttributesForNil(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForNil_, value?.ref.pointer ?? ffi.nullptr); - + set textAttributesForNil(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForNil_, + value?.ref.pointer ?? ffi.nullptr); } /// notANumberSymbol @@ -6481,69 +10543,86 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setNotANumberSymbol: - set notANumberSymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNotANumberSymbol_, value.ref.pointer); - + set notANumberSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNotANumberSymbol_, value.ref.pointer); } /// textAttributesForNotANumber objc.NSDictionary? get textAttributesForNotANumber { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForNotANumber); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForNotANumber); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setTextAttributesForNotANumber: - set textAttributesForNotANumber(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForNotANumber_, value?.ref.pointer ?? ffi.nullptr); - + set textAttributesForNotANumber(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setTextAttributesForNotANumber_, + value?.ref.pointer ?? ffi.nullptr); } /// positiveInfinitySymbol objc.NSString get positiveInfinitySymbol { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_positiveInfinitySymbol); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_positiveInfinitySymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPositiveInfinitySymbol: - set positiveInfinitySymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPositiveInfinitySymbol_, value.ref.pointer); - + set positiveInfinitySymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositiveInfinitySymbol_, value.ref.pointer); } /// textAttributesForPositiveInfinity objc.NSDictionary? get textAttributesForPositiveInfinity { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForPositiveInfinity); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForPositiveInfinity); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setTextAttributesForPositiveInfinity: - set textAttributesForPositiveInfinity(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForPositiveInfinity_, value?.ref.pointer ?? ffi.nullptr); - + set textAttributesForPositiveInfinity(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setTextAttributesForPositiveInfinity_, + value?.ref.pointer ?? ffi.nullptr); } /// negativeInfinitySymbol objc.NSString get negativeInfinitySymbol { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_negativeInfinitySymbol); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_negativeInfinitySymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNegativeInfinitySymbol: - set negativeInfinitySymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNegativeInfinitySymbol_, value.ref.pointer); - + set negativeInfinitySymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativeInfinitySymbol_, value.ref.pointer); } /// textAttributesForNegativeInfinity objc.NSDictionary? get textAttributesForNegativeInfinity { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textAttributesForNegativeInfinity); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_textAttributesForNegativeInfinity); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setTextAttributesForNegativeInfinity: - set textAttributesForNegativeInfinity(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTextAttributesForNegativeInfinity_, value?.ref.pointer ?? ffi.nullptr); - + set textAttributesForNegativeInfinity(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setTextAttributesForNegativeInfinity_, + value?.ref.pointer ?? ffi.nullptr); } /// positivePrefix @@ -6553,9 +10632,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPositivePrefix: - set positivePrefix(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPositivePrefix_, value.ref.pointer); - + set positivePrefix(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositivePrefix_, value.ref.pointer); } /// positiveSuffix @@ -6565,9 +10644,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPositiveSuffix: - set positiveSuffix(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPositiveSuffix_, value.ref.pointer); - + set positiveSuffix(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPositiveSuffix_, value.ref.pointer); } /// negativePrefix @@ -6577,9 +10656,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setNegativePrefix: - set negativePrefix(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNegativePrefix_, value.ref.pointer); - + set negativePrefix(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativePrefix_, value.ref.pointer); } /// negativeSuffix @@ -6589,9 +10668,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setNegativeSuffix: - set negativeSuffix(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNegativeSuffix_, value.ref.pointer); - + set negativeSuffix(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setNegativeSuffix_, value.ref.pointer); } /// currencyCode @@ -6601,9 +10680,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setCurrencyCode: - set currencyCode(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrencyCode_, value.ref.pointer); - + set currencyCode(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrencyCode_, value.ref.pointer); } /// currencySymbol @@ -6613,21 +10692,22 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setCurrencySymbol: - set currencySymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrencySymbol_, value.ref.pointer); - + set currencySymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrencySymbol_, value.ref.pointer); } /// internationalCurrencySymbol objc.NSString get internationalCurrencySymbol { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_internationalCurrencySymbol); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_internationalCurrencySymbol); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setInternationalCurrencySymbol: - set internationalCurrencySymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setInternationalCurrencySymbol_, value.ref.pointer); - + set internationalCurrencySymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setInternationalCurrencySymbol_, value.ref.pointer); } /// percentSymbol @@ -6637,9 +10717,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPercentSymbol: - set percentSymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPercentSymbol_, value.ref.pointer); - + set percentSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPercentSymbol_, value.ref.pointer); } /// perMillSymbol @@ -6649,9 +10729,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPerMillSymbol: - set perMillSymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPerMillSymbol_, value.ref.pointer); - + set perMillSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPerMillSymbol_, value.ref.pointer); } /// minusSign @@ -6661,9 +10741,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setMinusSign: - set minusSign(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMinusSign_, value.ref.pointer); - + set minusSign(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMinusSign_, value.ref.pointer); } /// plusSign @@ -6673,9 +10753,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPlusSign: - set plusSign(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPlusSign_, value.ref.pointer); - + set plusSign(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPlusSign_, value.ref.pointer); } /// exponentSymbol @@ -6685,57 +10765,55 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setExponentSymbol: - set exponentSymbol(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setExponentSymbol_, value.ref.pointer); - + set exponentSymbol(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setExponentSymbol_, value.ref.pointer); } /// groupingSize int get groupingSize { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_groupingSize); - } /// setGroupingSize: - set groupingSize(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setGroupingSize_, value); - + set groupingSize(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setGroupingSize_, value); } /// secondaryGroupingSize int get secondaryGroupingSize { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_secondaryGroupingSize); - } /// setSecondaryGroupingSize: - set secondaryGroupingSize(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setSecondaryGroupingSize_, value); - + set secondaryGroupingSize(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setSecondaryGroupingSize_, value); } /// multiplier objc.NSNumber? get multiplier { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_multiplier); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setMultiplier: - set multiplier(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMultiplier_, value?.ref.pointer ?? ffi.nullptr); - + set multiplier(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMultiplier_, + value?.ref.pointer ?? ffi.nullptr); } /// formatWidth int get formatWidth { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_formatWidth); - } /// setFormatWidth: - set formatWidth(int value) { + set formatWidth(int value) { return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setFormatWidth_, value); - } /// paddingCharacter @@ -6745,9 +10823,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPaddingCharacter: - set paddingCharacter(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPaddingCharacter_, value.ref.pointer); - + set paddingCharacter(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPaddingCharacter_, value.ref.pointer); } /// paddingPosition @@ -6757,9 +10835,9 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setPaddingPosition: - set paddingPosition(NSNumberFormatterPadPosition value) { - return _objc_msgSend_gz8txq(this.ref.pointer, _sel_setPaddingPosition_, value.value); - + set paddingPosition(NSNumberFormatterPadPosition value) { + return _objc_msgSend_gz8txq( + this.ref.pointer, _sel_setPaddingPosition_, value.value); } /// roundingMode @@ -6769,201 +10847,199 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setRoundingMode: - set roundingMode(NSNumberFormatterRoundingMode value) { - return _objc_msgSend_5krs29(this.ref.pointer, _sel_setRoundingMode_, value.value); - + set roundingMode(NSNumberFormatterRoundingMode value) { + return _objc_msgSend_5krs29( + this.ref.pointer, _sel_setRoundingMode_, value.value); } /// roundingIncrement objc.NSNumber get roundingIncrement { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_roundingIncrement); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_roundingIncrement); return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setRoundingIncrement: - set roundingIncrement(objc.NSNumber value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setRoundingIncrement_, value.ref.pointer); - + set roundingIncrement(objc.NSNumber value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setRoundingIncrement_, value.ref.pointer); } /// minimumIntegerDigits int get minimumIntegerDigits { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_minimumIntegerDigits); - } /// setMinimumIntegerDigits: - set minimumIntegerDigits(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMinimumIntegerDigits_, value); - + set minimumIntegerDigits(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumIntegerDigits_, value); } /// maximumIntegerDigits int get maximumIntegerDigits { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_maximumIntegerDigits); - } /// setMaximumIntegerDigits: - set maximumIntegerDigits(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMaximumIntegerDigits_, value); - + set maximumIntegerDigits(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMaximumIntegerDigits_, value); } /// minimumFractionDigits int get minimumFractionDigits { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_minimumFractionDigits); - } /// setMinimumFractionDigits: - set minimumFractionDigits(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMinimumFractionDigits_, value); - + set minimumFractionDigits(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumFractionDigits_, value); } /// maximumFractionDigits int get maximumFractionDigits { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_maximumFractionDigits); - } /// setMaximumFractionDigits: - set maximumFractionDigits(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMaximumFractionDigits_, value); - + set maximumFractionDigits(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMaximumFractionDigits_, value); } /// minimum objc.NSNumber? get minimum { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_minimum); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setMinimum: - set minimum(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMinimum_, value?.ref.pointer ?? ffi.nullptr); - + set minimum(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMinimum_, value?.ref.pointer ?? ffi.nullptr); } /// maximum objc.NSNumber? get maximum { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_maximum); - return _ret.address == 0 ? null : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } /// setMaximum: - set maximum(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMaximum_, value?.ref.pointer ?? ffi.nullptr); - + set maximum(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMaximum_, value?.ref.pointer ?? ffi.nullptr); } /// currencyGroupingSeparator objc.NSString get currencyGroupingSeparator { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencyGroupingSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currencyGroupingSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCurrencyGroupingSeparator: - set currencyGroupingSeparator(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrencyGroupingSeparator_, value.ref.pointer); - + set currencyGroupingSeparator(objc.NSString value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setCurrencyGroupingSeparator_, value.ref.pointer); } /// isLenient bool get lenient { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLenient); - } /// setLenient: - set lenient(bool value) { + set lenient(bool value) { return _objc_msgSend_117qins(this.ref.pointer, _sel_setLenient_, value); - } /// usesSignificantDigits bool get usesSignificantDigits { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_usesSignificantDigits); - } /// setUsesSignificantDigits: - set usesSignificantDigits(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setUsesSignificantDigits_, value); - + set usesSignificantDigits(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesSignificantDigits_, value); } /// minimumSignificantDigits int get minimumSignificantDigits { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_minimumSignificantDigits); - + return _objc_msgSend_eldhrq( + this.ref.pointer, _sel_minimumSignificantDigits); } /// setMinimumSignificantDigits: - set minimumSignificantDigits(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMinimumSignificantDigits_, value); - + set minimumSignificantDigits(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMinimumSignificantDigits_, value); } /// maximumSignificantDigits int get maximumSignificantDigits { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_maximumSignificantDigits); - + return _objc_msgSend_eldhrq( + this.ref.pointer, _sel_maximumSignificantDigits); } /// setMaximumSignificantDigits: - set maximumSignificantDigits(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMaximumSignificantDigits_, value); - + set maximumSignificantDigits(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMaximumSignificantDigits_, value); } /// isPartialStringValidationEnabled bool get partialStringValidationEnabled { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPartialStringValidationEnabled); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_isPartialStringValidationEnabled); } /// setPartialStringValidationEnabled: - set partialStringValidationEnabled(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setPartialStringValidationEnabled_, value); - + set partialStringValidationEnabled(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setPartialStringValidationEnabled_, value); } /// hasThousandSeparators bool get hasThousandSeparators { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_hasThousandSeparators); - } /// setHasThousandSeparators: - set hasThousandSeparators(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setHasThousandSeparators_, value); - + set hasThousandSeparators(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHasThousandSeparators_, value); } /// thousandSeparator objc.NSString get thousandSeparator { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_thousandSeparator); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_thousandSeparator); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setThousandSeparator: - set thousandSeparator(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setThousandSeparator_, value.ref.pointer); - + set thousandSeparator(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setThousandSeparator_, value.ref.pointer); } /// localizesFormat bool get localizesFormat { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_localizesFormat); - } /// setLocalizesFormat: - set localizesFormat(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setLocalizesFormat_, value); - + set localizesFormat(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setLocalizesFormat_, value); } /// format @@ -6973,134 +11049,162 @@ _objc_msgSend_1p18hg0(_class_NSNumberFormatter, _sel_setDefaultFormatterBehavior } /// setFormat: - set format(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFormat_, value.ref.pointer); - + set format(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFormat_, value.ref.pointer); } /// attributedStringForZero NSAttributedString get attributedStringForZero { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringForZero); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringForZero); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// setAttributedStringForZero: - set attributedStringForZero(NSAttributedString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributedStringForZero_, value.ref.pointer); - + set attributedStringForZero(NSAttributedString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAttributedStringForZero_, value.ref.pointer); } /// attributedStringForNil NSAttributedString get attributedStringForNil { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringForNil); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringForNil); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// setAttributedStringForNil: - set attributedStringForNil(NSAttributedString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributedStringForNil_, value.ref.pointer); - + set attributedStringForNil(NSAttributedString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setAttributedStringForNil_, value.ref.pointer); } /// attributedStringForNotANumber NSAttributedString get attributedStringForNotANumber { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributedStringForNotANumber); - return NSAttributedString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_attributedStringForNotANumber); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } /// setAttributedStringForNotANumber: - set attributedStringForNotANumber(NSAttributedString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributedStringForNotANumber_, value.ref.pointer); - + set attributedStringForNotANumber(NSAttributedString value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setAttributedStringForNotANumber_, value.ref.pointer); } /// roundingBehavior NSDecimalNumberHandler get roundingBehavior { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_roundingBehavior); - return NSDecimalNumberHandler.castFromPointer(_ret, retain: true, release: true); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } /// setRoundingBehavior: - set roundingBehavior(NSDecimalNumberHandler value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setRoundingBehavior_, value.ref.pointer); - + set roundingBehavior(NSDecimalNumberHandler value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setRoundingBehavior_, value.ref.pointer); } /// init NSNumberFormatter init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } /// new static NSNumberFormatter new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSNumberFormatter, _sel_new); - return NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSNumberFormatter, _sel_allocWithZone_, zone); - return NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSNumberFormatter, _sel_allocWithZone_, zone); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSNumberFormatter alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSNumberFormatter, _sel_alloc); - return NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); + return NSNumberFormatter.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_cqxsqq(_class_NSNumberFormatter, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSNumberFormatter, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSNumberFormatter, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSNumberFormatter, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSNumberFormatter, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSNumberFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSNumberFormatter, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSNumberFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSNumberFormatter, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSNumberFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSNumberFormatter, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSNumberFormatter, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -7124,8 +11228,11 @@ _objc_msgSend_1tjlcwl(_class_NSNumberFormatter, _sel_setKeys_triggerChangeNotifi /// initWithCoder: NSNumberFormatter? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSNumberFormatter.castFromPointer(_ret, retain: false, release: true); } } @@ -7136,78 +11243,159 @@ enum NSLocaleLanguageDirection { 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"), - }; - + 0 => NSLocaleLanguageDirectionUnknown, + 1 => NSLocaleLanguageDirectionLeftToRight, + 2 => NSLocaleLanguageDirectionRightToLeft, + 3 => NSLocaleLanguageDirectionTopToBottom, + 4 => NSLocaleLanguageDirectionBottomToTop, + _ => throw ArgumentError( + "Unknown value for NSLocaleLanguageDirection: $value"), + }; } -final class NSDecimal extends ffi.Opaque{ -} +final class NSDecimal extends ffi.Opaque {} late final _class_NSScanner = objc.getClass("NSScanner"); late final _sel_scanLocation = objc.registerName("scanLocation"); late final _sel_setScanLocation_ = objc.registerName("setScanLocation:"); -late final _sel_charactersToBeSkipped = objc.registerName("charactersToBeSkipped"); -late final _sel_setCharactersToBeSkipped_ = objc.registerName("setCharactersToBeSkipped:"); +late final _sel_charactersToBeSkipped = + objc.registerName("charactersToBeSkipped"); +late final _sel_setCharactersToBeSkipped_ = + objc.registerName("setCharactersToBeSkipped:"); late final _sel_caseSensitive = objc.registerName("caseSensitive"); late final _sel_setCaseSensitive_ = objc.registerName("setCaseSensitive:"); late final _sel_scanInt_ = objc.registerName("scanInt:"); -final _objc_msgSend_tke0i3 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_tke0i3 = 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_1m3j5r2 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1m3j5r2 = 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_litvm = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -late final _sel_scanUnsignedLongLong_ = objc.registerName("scanUnsignedLongLong:"); -final _objc_msgSend_1uz3cj3 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_litvm = 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_1uz3cj3 = 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_1qkfxp0 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1qkfxp0 = 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_2un1vl = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_2un1vl = 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_5fep2j = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_5fep2j = 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_p02k6o = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_scanCharactersFromSet_intoString_ = objc.registerName("scanCharactersFromSet:intoString:"); -late final _sel_scanUpToString_intoString_ = objc.registerName("scanUpToString:intoString:"); -late final _sel_scanUpToCharactersFromSet_intoString_ = objc.registerName("scanUpToCharactersFromSet:intoString:"); +late final _sel_scanString_intoString_ = + objc.registerName("scanString:intoString:"); +final _objc_msgSend_p02k6o = 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:"); +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:"); +late final _sel_localizedScannerWithString_ = + objc.registerName("localizedScannerWithString:"); late final _sel_scanDecimal_ = objc.registerName("scanDecimal:"); -final _objc_msgSend_wap63g = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_wap63g = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); /// NSScanner class NSScanner extends objc.NSObject { NSScanner._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSScanner.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSScanner); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScanner); } /// string @@ -7219,168 +11407,170 @@ class NSScanner extends objc.NSObject { /// scanLocation int get scanLocation { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_scanLocation); - } /// setScanLocation: - set scanLocation(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setScanLocation_, value); - + set scanLocation(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setScanLocation_, value); } /// charactersToBeSkipped objc.NSCharacterSet? get charactersToBeSkipped { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_charactersToBeSkipped); - return _ret.address == 0 ? null : objc.NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_ukcdfq(this.ref.pointer, _sel_setCharactersToBeSkipped_, value?.ref.pointer ?? ffi.nullptr); - + set charactersToBeSkipped(objc.NSCharacterSet? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setCharactersToBeSkipped_, value?.ref.pointer ?? ffi.nullptr); } /// caseSensitive bool get caseSensitive { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_caseSensitive); - } /// setCaseSensitive: - set caseSensitive(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setCaseSensitive_, value); - + set caseSensitive(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setCaseSensitive_, value); } /// locale objc.ObjCObjectBase? get locale { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_locale); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setLocale: - set locale(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLocale_, value?.ref.pointer ?? ffi.nullptr); - + set locale(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocale_, value?.ref.pointer ?? ffi.nullptr); } /// initWithString: NSScanner initWithString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithString_, string.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, string.ref.pointer); return NSScanner.castFromPointer(_ret, retain: false, release: true); } /// scanInt: bool scanInt_(ffi.Pointer result) { return _objc_msgSend_tke0i3(this.ref.pointer, _sel_scanInt_, result); - } /// scanInteger: bool scanInteger_(ffi.Pointer result) { return _objc_msgSend_1m3j5r2(this.ref.pointer, _sel_scanInteger_, result); - } /// scanLongLong: bool scanLongLong_(ffi.Pointer result) { return _objc_msgSend_litvm(this.ref.pointer, _sel_scanLongLong_, result); - } /// scanUnsignedLongLong: bool scanUnsignedLongLong_(ffi.Pointer result) { - return _objc_msgSend_1uz3cj3(this.ref.pointer, _sel_scanUnsignedLongLong_, result); - + return _objc_msgSend_1uz3cj3( + this.ref.pointer, _sel_scanUnsignedLongLong_, result); } /// scanFloat: bool scanFloat_(ffi.Pointer result) { return _objc_msgSend_1qkfxp0(this.ref.pointer, _sel_scanFloat_, result); - } /// scanDouble: bool scanDouble_(ffi.Pointer result) { return _objc_msgSend_2un1vl(this.ref.pointer, _sel_scanDouble_, result); - } /// scanHexInt: bool scanHexInt_(ffi.Pointer result) { return _objc_msgSend_5fep2j(this.ref.pointer, _sel_scanHexInt_, result); - } /// scanHexLongLong: bool scanHexLongLong_(ffi.Pointer result) { - return _objc_msgSend_1uz3cj3(this.ref.pointer, _sel_scanHexLongLong_, result); - + return _objc_msgSend_1uz3cj3( + this.ref.pointer, _sel_scanHexLongLong_, result); } /// scanHexFloat: bool scanHexFloat_(ffi.Pointer result) { return _objc_msgSend_1qkfxp0(this.ref.pointer, _sel_scanHexFloat_, result); - } /// scanHexDouble: bool scanHexDouble_(ffi.Pointer result) { return _objc_msgSend_2un1vl(this.ref.pointer, _sel_scanHexDouble_, result); - } /// scanString:intoString: - bool scanString_intoString_(objc.NSString string, ffi.Pointer> result) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_scanString_intoString_, string.ref.pointer, result); - + bool scanString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_p02k6o(this.ref.pointer, _sel_scanString_intoString_, + string.ref.pointer, result); } /// scanCharactersFromSet:intoString: - bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_scanCharactersFromSet_intoString_, set.ref.pointer, result); - + bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_scanCharactersFromSet_intoString_, set.ref.pointer, result); } /// scanUpToString:intoString: - bool scanUpToString_intoString_(objc.NSString string, ffi.Pointer> result) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_scanUpToString_intoString_, string.ref.pointer, result); - + bool scanUpToString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_scanUpToString_intoString_, string.ref.pointer, result); } /// scanUpToCharactersFromSet:intoString: - bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_scanUpToCharactersFromSet_intoString_, set.ref.pointer, result); - + bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_scanUpToCharactersFromSet_intoString_, set.ref.pointer, result); } /// isAtEnd bool get atEnd { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isAtEnd); - } /// scannerWithString: static NSScanner scannerWithString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSScanner, _sel_scannerWithString_, string.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSScanner, _sel_scannerWithString_, string.ref.pointer); return NSScanner.castFromPointer(_ret, retain: true, release: true); } /// localizedScannerWithString: static objc.ObjCObjectBase localizedScannerWithString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSScanner, _sel_localizedScannerWithString_, string.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSScanner, _sel_localizedScannerWithString_, string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// scanDecimal: bool scanDecimal_(ffi.Pointer dcm) { return _objc_msgSend_wap63g(this.ref.pointer, _sel_scanDecimal_, dcm); - } /// init NSScanner init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSScanner.castFromPointer(_ret, retain: false, release: true); } @@ -7392,7 +11582,8 @@ class NSScanner extends objc.NSObject { /// allocWithZone: static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSScanner, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSScanner, _sel_allocWithZone_, zone); return NSScanner.castFromPointer(_ret, retain: false, release: true); } @@ -7403,56 +11594,70 @@ class NSScanner extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSScanner, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSScanner, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSScanner, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSScanner, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSScanner, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSScanner, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSScanner, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSScanner, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSScanner, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSScanner, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScanner, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScanner, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScanner, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScanner, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -7476,10 +11681,13 @@ _objc_msgSend_1tjlcwl(_class_NSScanner, _sel_setKeys_triggerChangeNotificationsF } late final _class_NSException = objc.getClass("NSException"); -late final _sel_exceptionWithName_reason_userInfo_ = objc.registerName("exceptionWithName:reason:userInfo:"); -late final _sel_initWithName_reason_userInfo_ = objc.registerName("initWithName:reason:userInfo:"); +late final _sel_exceptionWithName_reason_userInfo_ = + objc.registerName("exceptionWithName:reason:userInfo:"); +late final _sel_initWithName_reason_userInfo_ = + objc.registerName("initWithName:reason:userInfo:"); late final _sel_reason = objc.registerName("reason"); -late final _sel_callStackReturnAddresses = objc.registerName("callStackReturnAddresses"); +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:"); @@ -7487,33 +11695,45 @@ late final _sel_raise_format_ = objc.registerName("raise:format:"); /// NSException class NSException extends objc.NSObject { NSException._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSException.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSException); + return _objc_msgSend_l8lotg( + obj.ref.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_aud7dn(_class_NSException, _sel_exceptionWithName_reason_userInfo_, name.ref.pointer, reason?.ref.pointer ?? ffi.nullptr, userInfo?.ref.pointer ?? ffi.nullptr); + static NSException exceptionWithName_reason_userInfo_( + objc.NSString name, objc.NSString? reason, objc.NSDictionary? userInfo) { + final _ret = _objc_msgSend_aud7dn( + _class_NSException, + _sel_exceptionWithName_reason_userInfo_, + name.ref.pointer, + reason?.ref.pointer ?? ffi.nullptr, + userInfo?.ref.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_aud7dn(this.ref.retainAndReturnPointer(), _sel_initWithName_reason_userInfo_, aName.ref.pointer, aReason?.ref.pointer ?? ffi.nullptr, aUserInfo?.ref.pointer ?? ffi.nullptr); + NSException initWithName_reason_userInfo_(objc.NSString aName, + objc.NSString? aReason, objc.NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithName_reason_userInfo_, + aName.ref.pointer, + aReason?.ref.pointer ?? ffi.nullptr, + aUserInfo?.ref.pointer ?? ffi.nullptr); return NSException.castFromPointer(_ret, retain: false, release: true); } @@ -7526,18 +11746,23 @@ class NSException extends objc.NSObject { /// reason objc.NSString? get reason { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_reason); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// userInfo objc.NSDictionary? get userInfo { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// callStackReturnAddresses objc.NSArray get callStackReturnAddresses { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackReturnAddresses); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackReturnAddresses); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -7549,19 +11774,19 @@ class NSException extends objc.NSObject { /// raise void raise() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_raise); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_raise); } /// raise:format: static void raise_format_(objc.NSString name, objc.NSString format) { -_objc_msgSend_1tjlcwl(_class_NSException, _sel_raise_format_, name.ref.pointer, format.ref.pointer); - + _objc_msgSend_1tjlcwl(_class_NSException, _sel_raise_format_, + name.ref.pointer, format.ref.pointer); } /// init NSException init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSException.castFromPointer(_ret, retain: false, release: true); } @@ -7573,7 +11798,8 @@ _objc_msgSend_1tjlcwl(_class_NSException, _sel_raise_format_, name.ref.pointer, /// allocWithZone: static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSException, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSException, _sel_allocWithZone_, zone); return NSException.castFromPointer(_ret, retain: false, release: true); } @@ -7584,56 +11810,70 @@ _objc_msgSend_1tjlcwl(_class_NSException, _sel_raise_format_, name.ref.pointer, } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSException, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSException, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSException, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSException, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSException, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSException, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSException, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSException, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSException, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSException, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSException, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSException, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSException, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSException, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSException, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -7658,98 +11898,237 @@ _objc_msgSend_1tjlcwl(_class_NSException, _sel_setKeys_triggerChangeNotification /// supportsSecureCoding static bool supportsSecureCoding() { return _objc_msgSend_olxnu1(_class_NSException, _sel_supportsSecureCoding); - } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSException? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSException.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSException.castFromPointer(_ret, retain: false, release: true); } } late final _class_NSFileHandle = objc.getClass("NSFileHandle"); late final _sel_availableData = objc.registerName("availableData"); -late final _sel_initWithFileDescriptor_closeOnDealloc_ = objc.registerName("initWithFileDescriptor:closeOnDealloc:"); -final _objc_msgSend_1jumayh = objc.msgSendPointer.cast , ffi.Pointer , ffi.Int , ffi.Bool )>>().asFunction , ffi.Pointer , int , bool )>(); -late final _sel_readDataToEndOfFileAndReturnError_ = objc.registerName("readDataToEndOfFileAndReturnError:"); -final _objc_msgSend_13z4cgc = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_readDataUpToLength_error_ = objc.registerName("readDataUpToLength:error:"); -final _objc_msgSend_5h0ois = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer> )>(); +late final _sel_initWithFileDescriptor_closeOnDealloc_ = + objc.registerName("initWithFileDescriptor:closeOnDealloc:"); +final _objc_msgSend_1jumayh = 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_readDataToEndOfFileAndReturnError_ = + objc.registerName("readDataToEndOfFileAndReturnError:"); +final _objc_msgSend_13z4cgc = 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_5h0ois = 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:"); late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); -final _objc_msgSend_gp32qh = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_seekToEndReturningOffset_error_ = objc.registerName("seekToEndReturningOffset:error:"); +final _objc_msgSend_gp32qh = 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_57fjbb = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLongLong , ffi.Pointer> )>>().asFunction , 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"); -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_1y425zh = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction 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:"); -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 arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSFileHandle_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +final _objc_msgSend_57fjbb = 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"); +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_1y425zh = 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_fileHandleForWritingToURL_error_ = + objc.registerName("fileHandleForWritingToURL:error:"); +late final _sel_fileHandleForUpdatingURL_error_ = + objc.registerName("fileHandleForUpdatingURL:error:"); +late final _sel_readInBackgroundAndNotifyForModes_ = + objc.registerName("readInBackgroundAndNotifyForModes:"); +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); +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSFileHandle_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSFileHandle_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSFileHandle_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSFileHandle_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSFileHandle_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSFileHandle { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSFileHandle_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSFileHandle_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSFileHandle ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSFileHandle_closureCallable, (ffi.Pointer arg0) => fn(NSFileHandle.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(NSFileHandle) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSFileHandle_closureCallable, + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -7760,59 +12139,95 @@ abstract final class ObjCBlock_ffiVoid_NSFileHandle { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(NSFileHandle ) fn) { + static objc.ObjCBlock listener( + void Function(NSFileHandle) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSFileHandle_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(NSFileHandle.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSFileHandle_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSFileHandle_CallExtension on objc.ObjCBlock { - void call(NSFileHandle arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer); +extension ObjCBlock_ffiVoid_NSFileHandle_CallExtension + on objc.ObjCBlock { + void call(NSFileHandle arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); } late final _sel_readabilityHandler = objc.registerName("readabilityHandler"); -late final _sel_setReadabilityHandler_ = objc.registerName("setReadabilityHandler:"); +late final _sel_setReadabilityHandler_ = + objc.registerName("setReadabilityHandler:"); late final _sel_writeabilityHandler = objc.registerName("writeabilityHandler"); -late final _sel_setWriteabilityHandler_ = objc.registerName("setWriteabilityHandler:"); -late final _sel_initWithFileDescriptor_ = objc.registerName("initWithFileDescriptor:"); +late final _sel_setWriteabilityHandler_ = + objc.registerName("setWriteabilityHandler:"); +late final _sel_initWithFileDescriptor_ = + objc.registerName("initWithFileDescriptor:"); late final _sel_fileDescriptor = objc.registerName("fileDescriptor"); -final _objc_msgSend_1tf0yjs = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1tf0yjs = 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:"); late final _sel_writeData_ = objc.registerName("writeData:"); late final _sel_offsetInFile = objc.registerName("offsetInFile"); -final _objc_msgSend_1cirwn8 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1cirwn8 = 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_10wkxl3 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLongLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_truncateFileAtOffset_ = objc.registerName("truncateFileAtOffset:"); +final _objc_msgSend_10wkxl3 = 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"); /// NSFileHandle class NSFileHandle extends objc.NSObject { NSFileHandle._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSFileHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileHandle); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileHandle); } /// availableData @@ -7823,271 +12238,328 @@ class NSFileHandle extends objc.NSObject { /// initWithFileDescriptor:closeOnDealloc: NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { - final _ret = _objc_msgSend_1jumayh(this.ref.retainAndReturnPointer(), _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); + final _ret = _objc_msgSend_1jumayh(this.ref.retainAndReturnPointer(), + _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSFileHandle? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// readDataToEndOfFileAndReturnError: - objc.NSData? readDataToEndOfFileAndReturnError_(ffi.Pointer> error) { - final _ret = _objc_msgSend_13z4cgc(this.ref.pointer, _sel_readDataToEndOfFileAndReturnError_, error); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + objc.NSData? readDataToEndOfFileAndReturnError_( + ffi.Pointer> error) { + final _ret = _objc_msgSend_13z4cgc( + this.ref.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_5h0ois(this.ref.pointer, _sel_readDataUpToLength_error_, length, error); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + objc.NSData? readDataUpToLength_error_( + int length, ffi.Pointer> error) { + final _ret = _objc_msgSend_5h0ois( + this.ref.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_p02k6o(this.ref.pointer, _sel_writeData_error_, data.ref.pointer, error); - + bool writeData_error_( + objc.NSData data, ffi.Pointer> error) { + return _objc_msgSend_p02k6o( + this.ref.pointer, _sel_writeData_error_, data.ref.pointer, error); } /// getOffset:error: - bool getOffset_error_(ffi.Pointer offsetInFile, ffi.Pointer> error) { - return _objc_msgSend_gp32qh(this.ref.pointer, _sel_getOffset_error_, offsetInFile, error); - + bool getOffset_error_(ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_gp32qh( + this.ref.pointer, _sel_getOffset_error_, offsetInFile, error); } /// seekToEndReturningOffset:error: - bool seekToEndReturningOffset_error_(ffi.Pointer offsetInFile, ffi.Pointer> error) { - return _objc_msgSend_gp32qh(this.ref.pointer, _sel_seekToEndReturningOffset_error_, offsetInFile, error); - + bool seekToEndReturningOffset_error_( + ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_gp32qh(this.ref.pointer, + _sel_seekToEndReturningOffset_error_, offsetInFile, error); } /// seekToOffset:error: - bool seekToOffset_error_(int offset, ffi.Pointer> error) { - return _objc_msgSend_57fjbb(this.ref.pointer, _sel_seekToOffset_error_, offset, error); - + bool seekToOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_57fjbb( + this.ref.pointer, _sel_seekToOffset_error_, offset, error); } /// truncateAtOffset:error: - bool truncateAtOffset_error_(int offset, ffi.Pointer> error) { - return _objc_msgSend_57fjbb(this.ref.pointer, _sel_truncateAtOffset_error_, offset, error); - + bool truncateAtOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_57fjbb( + this.ref.pointer, _sel_truncateAtOffset_error_, offset, error); } /// synchronizeAndReturnError: - bool synchronizeAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_1rk90ll(this.ref.pointer, _sel_synchronizeAndReturnError_, error); - + bool synchronizeAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_synchronizeAndReturnError_, error); } /// closeAndReturnError: bool closeAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_1rk90ll(this.ref.pointer, _sel_closeAndReturnError_, error); - + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_closeAndReturnError_, error); } /// fileHandleWithStandardInput static NSFileHandle getFileHandleWithStandardInput() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_fileHandleWithStandardInput); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithStandardInput); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleWithStandardOutput static NSFileHandle getFileHandleWithStandardOutput() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_fileHandleWithStandardOutput); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithStandardOutput); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleWithStandardError static NSFileHandle getFileHandleWithStandardError() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_fileHandleWithStandardError); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithStandardError); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleWithNullDevice static NSFileHandle getFileHandleWithNullDevice() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_fileHandleWithNullDevice); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_fileHandleWithNullDevice); return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForReadingAtPath: static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_fileHandleForReadingAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForWritingAtPath: static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_fileHandleForWritingAtPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// fileHandleForUpdatingAtPath: static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_fileHandleForUpdatingAtPath_, path.ref.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_1y425zh(_class_NSFileHandle, _sel_fileHandleForReadingFromURL_error_, url.ref.pointer, error); - return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + static NSFileHandle? fileHandleForReadingFromURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(_class_NSFileHandle, + _sel_fileHandleForReadingFromURL_error_, url.ref.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_1y425zh(_class_NSFileHandle, _sel_fileHandleForWritingToURL_error_, url.ref.pointer, error); - return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + static NSFileHandle? fileHandleForWritingToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(_class_NSFileHandle, + _sel_fileHandleForWritingToURL_error_, url.ref.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_1y425zh(_class_NSFileHandle, _sel_fileHandleForUpdatingURL_error_, url.ref.pointer, error); - return _ret.address == 0 ? null : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + static NSFileHandle? fileHandleForUpdatingURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(_class_NSFileHandle, + _sel_fileHandleForUpdatingURL_error_, url.ref.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } /// readInBackgroundAndNotifyForModes: void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_readInBackgroundAndNotifyForModes_, modes?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_readInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } /// readInBackgroundAndNotify void readInBackgroundAndNotify() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_readInBackgroundAndNotify); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_readInBackgroundAndNotify); } /// readToEndOfFileInBackgroundAndNotifyForModes: void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_readToEndOfFileInBackgroundAndNotifyForModes_, modes?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_readToEndOfFileInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } /// readToEndOfFileInBackgroundAndNotify void readToEndOfFileInBackgroundAndNotify() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_readToEndOfFileInBackgroundAndNotify); - + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_readToEndOfFileInBackgroundAndNotify); } /// acceptConnectionInBackgroundAndNotifyForModes: void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_acceptConnectionInBackgroundAndNotifyForModes_, modes?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_acceptConnectionInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } /// acceptConnectionInBackgroundAndNotify void acceptConnectionInBackgroundAndNotify() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_acceptConnectionInBackgroundAndNotify); - + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_acceptConnectionInBackgroundAndNotify); } /// waitForDataInBackgroundAndNotifyForModes: void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_waitForDataInBackgroundAndNotifyForModes_, modes?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_waitForDataInBackgroundAndNotifyForModes_, + modes?.ref.pointer ?? ffi.nullptr); } /// waitForDataInBackgroundAndNotify void waitForDataInBackgroundAndNotify() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_waitForDataInBackgroundAndNotify); - + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_waitForDataInBackgroundAndNotify); } /// readabilityHandler objc.ObjCBlock? get readabilityHandler { - final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_readabilityHandler); - return _ret.address == 0 ? null : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_readabilityHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } /// setReadabilityHandler: - set readabilityHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setReadabilityHandler_, value?.ref.pointer ?? ffi.nullptr); - + set readabilityHandler( + objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setReadabilityHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// writeabilityHandler objc.ObjCBlock? get writeabilityHandler { - final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_writeabilityHandler); - return _ret.address == 0 ? null : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_writeabilityHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } /// setWriteabilityHandler: - set writeabilityHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setWriteabilityHandler_, value?.ref.pointer ?? ffi.nullptr); - + set writeabilityHandler( + objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setWriteabilityHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// initWithFileDescriptor: NSFileHandle initWithFileDescriptor_(int fd) { - final _ret = _objc_msgSend_105o5we(this.ref.retainAndReturnPointer(), _sel_initWithFileDescriptor_, fd); + final _ret = _objc_msgSend_105o5we( + this.ref.retainAndReturnPointer(), _sel_initWithFileDescriptor_, fd); return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } /// fileDescriptor int get fileDescriptor { return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_fileDescriptor); - } /// readDataToEndOfFile objc.NSData readDataToEndOfFile() { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_readDataToEndOfFile); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_readDataToEndOfFile); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// readDataOfLength: objc.NSData readDataOfLength_(int length) { - final _ret = _objc_msgSend_ehxl2g(this.ref.pointer, _sel_readDataOfLength_, length); + final _ret = + _objc_msgSend_ehxl2g(this.ref.pointer, _sel_readDataOfLength_, length); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// writeData: void writeData_(objc.NSData data) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_writeData_, data.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_writeData_, data.ref.pointer); } /// offsetInFile int get offsetInFile { return _objc_msgSend_1cirwn8(this.ref.pointer, _sel_offsetInFile); - } /// seekToEndOfFile int seekToEndOfFile() { return _objc_msgSend_1cirwn8(this.ref.pointer, _sel_seekToEndOfFile); - } /// seekToFileOffset: void seekToFileOffset_(int offset) { -_objc_msgSend_10wkxl3(this.ref.pointer, _sel_seekToFileOffset_, offset); - + _objc_msgSend_10wkxl3(this.ref.pointer, _sel_seekToFileOffset_, offset); } /// truncateFileAtOffset: void truncateFileAtOffset_(int offset) { -_objc_msgSend_10wkxl3(this.ref.pointer, _sel_truncateFileAtOffset_, offset); - + _objc_msgSend_10wkxl3(this.ref.pointer, _sel_truncateFileAtOffset_, offset); } /// synchronizeFile void synchronizeFile() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_synchronizeFile); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_synchronizeFile); } /// closeFile void closeFile() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_closeFile); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeFile); } /// init NSFileHandle init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } @@ -8099,7 +12571,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeFile); /// allocWithZone: static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSFileHandle, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSFileHandle, _sel_allocWithZone_, zone); return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } @@ -8110,56 +12583,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeFile); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSFileHandle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSFileHandle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSFileHandle, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSFileHandle, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSFileHandle, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSFileHandle, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSFileHandle, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSFileHandle, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSFileHandle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileHandle, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileHandle, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -8184,92 +12671,148 @@ _objc_msgSend_1tjlcwl(_class_NSFileHandle, _sel_setKeys_triggerChangeNotificatio /// supportsSecureCoding static bool supportsSecureCoding() { return _objc_msgSend_olxnu1(_class_NSFileHandle, _sel_supportsSecureCoding); - } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } } late final _class_NSFileManager = objc.getClass("NSFileManager"); late final _sel_defaultManager = objc.registerName("defaultManager"); + 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"), - }; - -} + 2 => NSVolumeEnumerationSkipHiddenVolumes, + 4 => NSVolumeEnumerationProduceFileReferenceURLs, + _ => throw ArgumentError( + "Unknown value for NSVolumeEnumerationOptions: $value"), + }; +} + +late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc + .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); +final _objc_msgSend_gyiq9w = 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)>(); -late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc.registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); -final _objc_msgSend_gyiq9w = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction 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 arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSError_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSError_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSError_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); + 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); +ffi.Pointer _ObjCBlock_ffiVoid_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSError_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSError_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSError? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSError_closureCallable, (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSError.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSError_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -8280,23 +12823,54 @@ abstract final class ObjCBlock_ffiVoid_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSError? ) fn) { + static objc.ObjCBlock listener( + void Function(objc.NSError?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSError_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSError.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSError_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSError_CallExtension on objc.ObjCBlock { - void call(objc.NSError? arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); -} +extension ObjCBlock_ffiVoid_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSError? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_unmountVolumeAtURL_options_completionHandler_ = + objc.registerName("unmountVolumeAtURL:options:completionHandler:"); +final _objc_msgSend_yuugcv = 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)>(); -late final _sel_unmountVolumeAtURL_options_completionHandler_ = objc.registerName("unmountVolumeAtURL:options:completionHandler:"); -final _objc_msgSend_yuugcv = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); enum NSDirectoryEnumerationOptions { NSDirectoryEnumerationSkipsSubdirectoryDescendants(1), NSDirectoryEnumerationSkipsPackageDescendants(2), @@ -8304,23 +12878,42 @@ enum NSDirectoryEnumerationOptions { 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"), - }; - -} + 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_1rn5oli = 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_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = objc.registerName("contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); -final _objc_msgSend_1rn5oli = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer> )>(); enum NSSearchPathDirectory { NSApplicationDirectory(1), NSDemoApplicationDirectory(2), @@ -8350,41 +12943,40 @@ enum NSSearchPathDirectory { 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"), - }; - + 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 { @@ -8394,213 +12986,601 @@ enum NSSearchPathDomainMask { 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"), - }; - -} + 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_1llbjq7 = 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_46p27t = 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>)>(); -late final _sel_URLsForDirectory_inDomains_ = objc.registerName("URLsForDirectory:inDomains:"); -final _objc_msgSend_1llbjq7 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong )>>().asFunction 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_46p27t = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong , ffi.Pointer , ffi.Bool , ffi.Pointer> )>>().asFunction 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_17s8ocw = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , 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_9p3pl8 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer> )>>().asFunction , 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_16o5u5c = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Bool , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , bool , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = objc.registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); -final _objc_msgSend_6toz8x = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); + 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_17s8ocw = 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_9p3pl8 = 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_16o5u5c = 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_6toz8x = 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_delegate = objc.registerName("delegate"); late final _sel_setDelegate_ = objc.registerName("setDelegate:"); -late final _sel_setAttributes_ofItemAtPath_error_ = objc.registerName("setAttributes:ofItemAtPath:error:"); -late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = objc.registerName("createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); -late final _sel_contentsOfDirectoryAtPath_error_ = objc.registerName("contentsOfDirectoryAtPath:error:"); -late final _sel_subpathsOfDirectoryAtPath_error_ = objc.registerName("subpathsOfDirectoryAtPath:error:"); -late final _sel_attributesOfItemAtPath_error_ = objc.registerName("attributesOfItemAtPath:error:"); -late final _sel_attributesOfFileSystemForPath_error_ = objc.registerName("attributesOfFileSystemForPath:error:"); -late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = objc.registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); -late final _sel_destinationOfSymbolicLinkAtPath_error_ = objc.registerName("destinationOfSymbolicLinkAtPath:error:"); -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:"); -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:"); -late final _sel_trashItemAtURL_resultingItemURL_error_ = objc.registerName("trashItemAtURL:resultingItemURL:error:"); -late final _sel_fileAttributesAtPath_traverseLink_ = objc.registerName("fileAttributesAtPath:traverseLink:"); -late final _sel_changeFileAttributes_atPath_ = objc.registerName("changeFileAttributes:atPath:"); -late final _sel_directoryContentsAtPath_ = objc.registerName("directoryContentsAtPath:"); -late final _sel_fileSystemAttributesAtPath_ = objc.registerName("fileSystemAttributesAtPath:"); -late final _sel_pathContentOfSymbolicLinkAtPath_ = objc.registerName("pathContentOfSymbolicLinkAtPath:"); -late final _sel_createSymbolicLinkAtPath_pathContent_ = objc.registerName("createSymbolicLinkAtPath:pathContent:"); -late final _sel_createDirectoryAtPath_attributes_ = objc.registerName("createDirectoryAtPath:attributes:"); -late final _sel_linkPath_toPath_handler_ = objc.registerName("linkPath:toPath:handler:"); -final _objc_msgSend_hukaf0 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_copyPath_toPath_handler_ = objc.registerName("copyPath:toPath:handler:"); -late final _sel_movePath_toPath_handler_ = objc.registerName("movePath:toPath:handler:"); -late final _sel_removeFileAtPath_handler_ = objc.registerName("removeFileAtPath:handler:"); -late final _sel_currentDirectoryPath = objc.registerName("currentDirectoryPath"); -late final _sel_changeCurrentDirectoryPath_ = objc.registerName("changeCurrentDirectoryPath:"); +late final _sel_setAttributes_ofItemAtPath_error_ = + objc.registerName("setAttributes:ofItemAtPath:error:"); +late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); +late final _sel_contentsOfDirectoryAtPath_error_ = + objc.registerName("contentsOfDirectoryAtPath:error:"); +late final _sel_subpathsOfDirectoryAtPath_error_ = + objc.registerName("subpathsOfDirectoryAtPath:error:"); +late final _sel_attributesOfItemAtPath_error_ = + objc.registerName("attributesOfItemAtPath:error:"); +late final _sel_attributesOfFileSystemForPath_error_ = + objc.registerName("attributesOfFileSystemForPath:error:"); +late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = + objc.registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); +late final _sel_destinationOfSymbolicLinkAtPath_error_ = + objc.registerName("destinationOfSymbolicLinkAtPath:error:"); +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:"); +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:"); +late final _sel_trashItemAtURL_resultingItemURL_error_ = + objc.registerName("trashItemAtURL:resultingItemURL:error:"); +late final _sel_fileAttributesAtPath_traverseLink_ = + objc.registerName("fileAttributesAtPath:traverseLink:"); +late final _sel_changeFileAttributes_atPath_ = + objc.registerName("changeFileAttributes:atPath:"); +late final _sel_directoryContentsAtPath_ = + objc.registerName("directoryContentsAtPath:"); +late final _sel_fileSystemAttributesAtPath_ = + objc.registerName("fileSystemAttributesAtPath:"); +late final _sel_pathContentOfSymbolicLinkAtPath_ = + objc.registerName("pathContentOfSymbolicLinkAtPath:"); +late final _sel_createSymbolicLinkAtPath_pathContent_ = + objc.registerName("createSymbolicLinkAtPath:pathContent:"); +late final _sel_createDirectoryAtPath_attributes_ = + objc.registerName("createDirectoryAtPath:attributes:"); +late final _sel_linkPath_toPath_handler_ = + objc.registerName("linkPath:toPath:handler:"); +final _objc_msgSend_hukaf0 = 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_copyPath_toPath_handler_ = + objc.registerName("copyPath:toPath:handler:"); +late final _sel_movePath_toPath_handler_ = + objc.registerName("movePath:toPath:handler:"); +late final _sel_removeFileAtPath_handler_ = + objc.registerName("removeFileAtPath:handler:"); +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_rtz5p9 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , 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_fileExistsAtPath_isDirectory_ = + objc.registerName("fileExistsAtPath:isDirectory:"); +final _objc_msgSend_rtz5p9 = 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:"); -late final _sel_componentsToDisplayForPath_ = objc.registerName("componentsToDisplayForPath:"); +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 arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_NSURL_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline , false).cast(); -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); -ffi.Pointer _ObjCBlock_bool_NSURL_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_NSURL_NSError_closureTrampoline , false).cast(); +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); +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) + .cast(); +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); +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) + .cast(); /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_bool_NSURL_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_bool_NSURL_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_bool_NSURL_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(bool Function(objc.NSURL , objc.NSError ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_bool_NSURL_NSError_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(objc.NSURL.castFromPointer(arg0, retain: true, release: true), objc.NSError.castFromPointer(arg1, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + bool Function(objc.NSURL, objc.NSError) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_bool_NSURL_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + objc.NSURL + .castFromPointer(arg0, retain: true, release: true), + objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_bool_NSURL_NSError_CallExtension on objc.ObjCBlock { - bool call(objc.NSURL arg0, objc.NSError arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer, arg1.ref.pointer); -} - -late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = objc.registerName("enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); -final _objc_msgSend_40k0lk = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); +extension ObjCBlock_bool_NSURL_NSError_CallExtension + on objc.ObjCBlock { + bool call(objc.NSURL arg0, objc.NSError arg1) => ref.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)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer); +} + +late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = + objc.registerName( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); +final _objc_msgSend_40k0lk = 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:"); -late final _sel_createFileAtPath_contents_attributes_ = objc.registerName("createFileAtPath:contents:attributes:"); -late final _sel_fileSystemRepresentationWithPath_ = objc.registerName("fileSystemRepresentationWithPath:"); -final _objc_msgSend_t1v5su = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_stringWithFileSystemRepresentation_length_ = objc.registerName("stringWithFileSystemRepresentation:length:"); -final _objc_msgSend_1t5rcq1 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); +late final _sel_createFileAtPath_contents_attributes_ = + objc.registerName("createFileAtPath:contents:attributes:"); +late final _sel_fileSystemRepresentationWithPath_ = + objc.registerName("fileSystemRepresentationWithPath:"); +final _objc_msgSend_t1v5su = 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_1t5rcq1 = 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)>(); + 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_1cu34v2 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> , ffi.Pointer> )>>().asFunction , 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_191cxmu = objc.msgSendPointer.cast , ffi.Pointer , ffi.Bool , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , bool , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_isUbiquitousItemAtURL_ = objc.registerName("isUbiquitousItemAtURL:"); -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:"); -late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc.registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); -final _objc_msgSend_1dca44n = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.Pointer> )>>().asFunction 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 arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline ).cast(); -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); -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); + 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_1cu34v2 = 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_191cxmu = 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:"); +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:"); +late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc + .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); +final _objc_msgSend_1dca44n = 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); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) + .cast(); +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); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSDictionary_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSDictionary? , objc.NSError? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSDictionary_NSError_closureCallable, (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))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSDictionary?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureCallable, + (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))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -8611,521 +13591,934 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSDictionary? , objc.NSError? ) fn) { + static objc.ObjCBlock + listener(void Function(objc.NSDictionary?, objc.NSError?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerCallable.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))); + _ObjCBlock_ffiVoid_NSDictionary_NSError_listenerCallable.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))); final wrapper = _wrapListenerBlock_1tjlcwl(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSDictionary_NSError_CallExtension on objc.ObjCBlock { - void call(objc.NSDictionary? arg0, objc.NSError? arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = objc.registerName("getFileProviderServicesForItemAtURL:completionHandler:"); -ffi.Pointer _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast Function(ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_NSError_NSString_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_NSError_NSString_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline ).cast(); +extension ObjCBlock_ffiVoid_NSDictionary_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSDictionary? arg0, objc.NSError? arg1) => + ref.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)>()(ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = + objc.registerName("getFileProviderServicesForItemAtURL:completionHandler:"); +ffi.Pointer + _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi + .NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_NSError_NSString_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock? Function(objc.NSError, objc.NSString)>`. abstract final class ObjCBlock_objcObjCObject_NSError_NSString { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock? Function(objc.NSError, objc.NSString)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock? Function(objc.NSError, objc.NSString)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Pointer? Function(objc.NSError, objc.NSString)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer? Function(objc.NSError, + objc.NSString)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock? Function(objc.NSError, objc.NSString)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock? Function(objc.NSError, objc.NSString)>(objc.newPointerBlock(_ObjCBlock_objcObjCObject_NSError_NSString_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock? Function(objc.NSError, objc.NSString)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock? Function(objc.NSError, objc.NSString)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_NSError_NSString_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock? Function(objc.NSError, objc.NSString)> fromFunction(objc.ObjCObjectBase? Function(objc.NSError , objc.NSString ) fn) => - objc.ObjCBlock? Function(objc.NSError, objc.NSString)>(objc.newClosureBlock(_ObjCBlock_objcObjCObject_NSError_NSString_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(objc.NSError.castFromPointer(arg0, retain: true, release: true), objc.NSString.castFromPointer(arg1, retain: true, release: true))?.ref.retainAndAutorelease() ?? ffi.nullptr), - retain: false, release: true); + static objc.ObjCBlock? Function(objc.NSError, objc.NSString)> + fromFunction( + objc.ObjCObjectBase? Function(objc.NSError, objc.NSString) fn) => + objc.ObjCBlock? Function(objc.NSError, objc.NSString)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_NSError_NSString_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(objc.NSError.castFromPointer(arg0, retain: true, release: true), objc.NSString.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock? Function(objc.NSError, objc.NSString)>`. -extension ObjCBlock_objcObjCObject_NSError_NSString_CallExtension on objc.ObjCBlock? Function(objc.NSError, objc.NSString)> { - objc.ObjCObjectBase? call(objc.NSError arg0, objc.NSString arg1) =>ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer, arg1.ref.pointer).address == 0 ? null : objc.ObjCObjectBase(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer, arg1.ref.pointer), retain: true, release: true); -} - -final _objc_msgSend_cmbt6k = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_containerURLForSecurityApplicationGroupIdentifier_ = objc.registerName("containerURLForSecurityApplicationGroupIdentifier:"); -late final _sel_homeDirectoryForCurrentUser = objc.registerName("homeDirectoryForCurrentUser"); +extension ObjCBlock_objcObjCObject_NSError_NSString_CallExtension + on objc.ObjCBlock< + ffi.Pointer? Function(objc.NSError, objc.NSString)> { + objc.ObjCObjectBase? call(objc.NSError arg0, objc.NSString arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0.ref.pointer, arg1.ref.pointer) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0.ref.pointer, arg1.ref.pointer), + retain: true, + release: true); +} + +final _objc_msgSend_cmbt6k = 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:"); +late final _sel_homeDirectoryForUser_ = + objc.registerName("homeDirectoryForUser:"); /// NSFileManager class NSFileManager extends objc.NSObject { NSFileManager._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSFileManager.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileManager); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileManager); } /// defaultManager static NSFileManager getDefaultManager() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileManager, _sel_defaultManager); + final _ret = + _objc_msgSend_1unuoxw(_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_gyiq9w(this.ref.pointer, _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, propertyKeys?.ref.pointer ?? ffi.nullptr, options.value); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( + objc.NSArray? propertyKeys, NSVolumeEnumerationOptions options) { + final _ret = _objc_msgSend_gyiq9w( + this.ref.pointer, + _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, + propertyKeys?.ref.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, objc.ObjCBlock completionHandler) { -_objc_msgSend_yuugcv(this.ref.pointer, _sel_unmountVolumeAtURL_options_completionHandler_, url.ref.pointer, mask.value, completionHandler.ref.pointer); - + void unmountVolumeAtURL_options_completionHandler_( + objc.NSURL url, + NSFileManagerUnmountOptions mask, + objc.ObjCBlock completionHandler) { + _objc_msgSend_yuugcv( + this.ref.pointer, + _sel_unmountVolumeAtURL_options_completionHandler_, + url.ref.pointer, + mask.value, + completionHandler.ref.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_1rn5oli(this.ref.pointer, _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, url.ref.pointer, keys?.ref.pointer ?? ffi.nullptr, mask.value, error); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? + contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( + objc.NSURL url, + objc.NSArray? keys, + NSDirectoryEnumerationOptions mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1rn5oli( + this.ref.pointer, + _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, + url.ref.pointer, + keys?.ref.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_1llbjq7(this.ref.pointer, _sel_URLsForDirectory_inDomains_, directory.value, domainMask.value); + objc.NSArray URLsForDirectory_inDomains_( + NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask) { + final _ret = _objc_msgSend_1llbjq7(this.ref.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_46p27t(this.ref.pointer, _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, directory.value, domain.value, url?.ref.pointer ?? ffi.nullptr, shouldCreate, error); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + objc.NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( + NSSearchPathDirectory directory, + NSSearchPathDomainMask domain, + objc.NSURL? url, + bool shouldCreate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_46p27t( + this.ref.pointer, + _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, + directory.value, + domain.value, + url?.ref.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_17s8ocw(this.ref.pointer, _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, outRelationship, directoryURL.ref.pointer, otherURL.ref.pointer, error); - + bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( + ffi.Pointer outRelationship, + objc.NSURL directoryURL, + objc.NSURL otherURL, + ffi.Pointer> error) { + return _objc_msgSend_17s8ocw( + this.ref.pointer, + _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, + outRelationship, + directoryURL.ref.pointer, + otherURL.ref.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_9p3pl8(this.ref.pointer, _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, outRelationship, directory.value, domainMask.value, url.ref.pointer, error); - + bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( + ffi.Pointer outRelationship, + NSSearchPathDirectory directory, + NSSearchPathDomainMask domainMask, + objc.NSURL url, + ffi.Pointer> error) { + return _objc_msgSend_9p3pl8( + this.ref.pointer, + _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, + outRelationship, + directory.value, + domainMask.value, + url.ref.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_16o5u5c(this.ref.pointer, _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, url.ref.pointer, createIntermediates, attributes?.ref.pointer ?? ffi.nullptr, error); - + bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( + objc.NSURL url, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_16o5u5c( + this.ref.pointer, + _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, + url.ref.pointer, + createIntermediates, + attributes?.ref.pointer ?? ffi.nullptr, + error); } /// createSymbolicLinkAtURL:withDestinationURL:error: - bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, objc.NSURL destURL, ffi.Pointer> error) { - return _objc_msgSend_6toz8x(this.ref.pointer, _sel_createSymbolicLinkAtURL_withDestinationURL_error_, url.ref.pointer, destURL.ref.pointer, error); - + bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, + objc.NSURL destURL, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_createSymbolicLinkAtURL_withDestinationURL_error_, + url.ref.pointer, + destURL.ref.pointer, + error); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); - + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } /// setAttributes:ofItemAtPath:error: - bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, objc.NSString path, ffi.Pointer> error) { - return _objc_msgSend_6toz8x(this.ref.pointer, _sel_setAttributes_ofItemAtPath_error_, attributes.ref.pointer, path.ref.pointer, error); - + bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_setAttributes_ofItemAtPath_error_, + attributes.ref.pointer, + path.ref.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_16o5u5c(this.ref.pointer, _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, path.ref.pointer, createIntermediates, attributes?.ref.pointer ?? ffi.nullptr, error); - + bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( + objc.NSString path, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_16o5u5c( + this.ref.pointer, + _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, + path.ref.pointer, + createIntermediates, + attributes?.ref.pointer ?? ffi.nullptr, + error); } /// contentsOfDirectoryAtPath:error: - objc.NSArray? contentsOfDirectoryAtPath_error_(objc.NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_1y425zh(this.ref.pointer, _sel_contentsOfDirectoryAtPath_error_, path.ref.pointer, error); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? contentsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_contentsOfDirectoryAtPath_error_, path.ref.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_1y425zh(this.ref.pointer, _sel_subpathsOfDirectoryAtPath_error_, path.ref.pointer, error); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? subpathsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_subpathsOfDirectoryAtPath_error_, path.ref.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_1y425zh(this.ref.pointer, _sel_attributesOfItemAtPath_error_, path.ref.pointer, error); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + objc.NSDictionary? attributesOfItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_attributesOfItemAtPath_error_, path.ref.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_1y425zh(this.ref.pointer, _sel_attributesOfFileSystemForPath_error_, path.ref.pointer, error); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + objc.NSDictionary? attributesOfFileSystemForPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_attributesOfFileSystemForPath_error_, path.ref.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_6toz8x(this.ref.pointer, _sel_createSymbolicLinkAtPath_withDestinationPath_error_, path.ref.pointer, destPath.ref.pointer, error); - + bool createSymbolicLinkAtPath_withDestinationPath_error_(objc.NSString path, + objc.NSString destPath, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_createSymbolicLinkAtPath_withDestinationPath_error_, + path.ref.pointer, + destPath.ref.pointer, + error); } /// destinationOfSymbolicLinkAtPath:error: - objc.NSString? destinationOfSymbolicLinkAtPath_error_(objc.NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_1y425zh(this.ref.pointer, _sel_destinationOfSymbolicLinkAtPath_error_, path.ref.pointer, error); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + objc.NSString? destinationOfSymbolicLinkAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_destinationOfSymbolicLinkAtPath_error_, path.ref.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_6toz8x(this.ref.pointer, _sel_copyItemAtPath_toPath_error_, srcPath.ref.pointer, dstPath.ref.pointer, error); - + bool copyItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_copyItemAtPath_toPath_error_, + srcPath.ref.pointer, + dstPath.ref.pointer, + error); } /// moveItemAtPath:toPath:error: - bool moveItemAtPath_toPath_error_(objc.NSString srcPath, objc.NSString dstPath, ffi.Pointer> error) { - return _objc_msgSend_6toz8x(this.ref.pointer, _sel_moveItemAtPath_toPath_error_, srcPath.ref.pointer, dstPath.ref.pointer, error); - + bool moveItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_moveItemAtPath_toPath_error_, + srcPath.ref.pointer, + dstPath.ref.pointer, + error); } /// linkItemAtPath:toPath:error: - bool linkItemAtPath_toPath_error_(objc.NSString srcPath, objc.NSString dstPath, ffi.Pointer> error) { - return _objc_msgSend_6toz8x(this.ref.pointer, _sel_linkItemAtPath_toPath_error_, srcPath.ref.pointer, dstPath.ref.pointer, error); - + bool linkItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_linkItemAtPath_toPath_error_, + srcPath.ref.pointer, + dstPath.ref.pointer, + error); } /// removeItemAtPath:error: - bool removeItemAtPath_error_(objc.NSString path, ffi.Pointer> error) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_removeItemAtPath_error_, path.ref.pointer, error); - + bool removeItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_p02k6o(this.ref.pointer, _sel_removeItemAtPath_error_, + path.ref.pointer, error); } /// copyItemAtURL:toURL:error: - bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, ffi.Pointer> error) { - return _objc_msgSend_6toz8x(this.ref.pointer, _sel_copyItemAtURL_toURL_error_, srcURL.ref.pointer, dstURL.ref.pointer, error); - + bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_copyItemAtURL_toURL_error_, + srcURL.ref.pointer, + dstURL.ref.pointer, + error); } /// moveItemAtURL:toURL:error: - bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, ffi.Pointer> error) { - return _objc_msgSend_6toz8x(this.ref.pointer, _sel_moveItemAtURL_toURL_error_, srcURL.ref.pointer, dstURL.ref.pointer, error); - + bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_moveItemAtURL_toURL_error_, + srcURL.ref.pointer, + dstURL.ref.pointer, + error); } /// linkItemAtURL:toURL:error: - bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, ffi.Pointer> error) { - return _objc_msgSend_6toz8x(this.ref.pointer, _sel_linkItemAtURL_toURL_error_, srcURL.ref.pointer, dstURL.ref.pointer, error); - + bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_linkItemAtURL_toURL_error_, + srcURL.ref.pointer, + dstURL.ref.pointer, + error); } /// removeItemAtURL:error: - bool removeItemAtURL_error_(objc.NSURL URL, ffi.Pointer> error) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_removeItemAtURL_error_, URL.ref.pointer, error); - + bool removeItemAtURL_error_( + objc.NSURL URL, ffi.Pointer> error) { + return _objc_msgSend_p02k6o( + this.ref.pointer, _sel_removeItemAtURL_error_, URL.ref.pointer, error); } /// trashItemAtURL:resultingItemURL:error: - bool trashItemAtURL_resultingItemURL_error_(objc.NSURL url, ffi.Pointer> outResultingURL, ffi.Pointer> error) { - return _objc_msgSend_to8xlo(this.ref.pointer, _sel_trashItemAtURL_resultingItemURL_error_, url.ref.pointer, outResultingURL, error); - + bool trashItemAtURL_resultingItemURL_error_( + objc.NSURL url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error) { + return _objc_msgSend_to8xlo( + this.ref.pointer, + _sel_trashItemAtURL_resultingItemURL_error_, + url.ref.pointer, + outResultingURL, + error); } /// fileAttributesAtPath:traverseLink: - objc.NSDictionary? fileAttributesAtPath_traverseLink_(objc.NSString path, bool yorn) { - final _ret = _objc_msgSend_qqbb5y(this.ref.pointer, _sel_fileAttributesAtPath_traverseLink_, path.ref.pointer, yorn); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + objc.NSDictionary? fileAttributesAtPath_traverseLink_( + objc.NSString path, bool yorn) { + final _ret = _objc_msgSend_qqbb5y(this.ref.pointer, + _sel_fileAttributesAtPath_traverseLink_, path.ref.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_1ywe6ev(this.ref.pointer, _sel_changeFileAttributes_atPath_, attributes.ref.pointer, path.ref.pointer); - + bool changeFileAttributes_atPath_( + objc.NSDictionary attributes, objc.NSString path) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_changeFileAttributes_atPath_, + attributes.ref.pointer, + path.ref.pointer); } /// directoryContentsAtPath: objc.NSArray? directoryContentsAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_directoryContentsAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_directoryContentsAtPath_, path.ref.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_juohf7(this.ref.pointer, _sel_fileSystemAttributesAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_fileSystemAttributesAtPath_, path.ref.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_juohf7(this.ref.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_pathContentOfSymbolicLinkAtPath_, path.ref.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_1ywe6ev(this.ref.pointer, _sel_createSymbolicLinkAtPath_pathContent_, path.ref.pointer, otherpath.ref.pointer); - + bool createSymbolicLinkAtPath_pathContent_( + objc.NSString path, objc.NSString otherpath) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_createSymbolicLinkAtPath_pathContent_, + path.ref.pointer, + otherpath.ref.pointer); } /// createDirectoryAtPath:attributes: - bool createDirectoryAtPath_attributes_(objc.NSString path, objc.NSDictionary attributes) { - return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_createDirectoryAtPath_attributes_, path.ref.pointer, attributes.ref.pointer); - + bool createDirectoryAtPath_attributes_( + objc.NSString path, objc.NSDictionary attributes) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_createDirectoryAtPath_attributes_, + path.ref.pointer, + attributes.ref.pointer); } /// linkPath:toPath:handler: - bool linkPath_toPath_handler_(objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { - return _objc_msgSend_hukaf0(this.ref.pointer, _sel_linkPath_toPath_handler_, src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); - + bool linkPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { + return _objc_msgSend_hukaf0(this.ref.pointer, _sel_linkPath_toPath_handler_, + src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); } /// copyPath:toPath:handler: - bool copyPath_toPath_handler_(objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { - return _objc_msgSend_hukaf0(this.ref.pointer, _sel_copyPath_toPath_handler_, src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); - + bool copyPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { + return _objc_msgSend_hukaf0(this.ref.pointer, _sel_copyPath_toPath_handler_, + src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); } /// movePath:toPath:handler: - bool movePath_toPath_handler_(objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { - return _objc_msgSend_hukaf0(this.ref.pointer, _sel_movePath_toPath_handler_, src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); - + bool movePath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.ObjCObjectBase? handler) { + return _objc_msgSend_hukaf0(this.ref.pointer, _sel_movePath_toPath_handler_, + src.ref.pointer, dest.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); } /// removeFileAtPath:handler: - bool removeFileAtPath_handler_(objc.NSString path, objc.ObjCObjectBase? handler) { - return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_removeFileAtPath_handler_, path.ref.pointer, handler?.ref.pointer ?? ffi.nullptr); - + bool removeFileAtPath_handler_( + objc.NSString path, objc.ObjCObjectBase? handler) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_removeFileAtPath_handler_, + path.ref.pointer, + handler?.ref.pointer ?? ffi.nullptr); } /// currentDirectoryPath objc.NSString get currentDirectoryPath { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryPath); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryPath); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// changeCurrentDirectoryPath: bool changeCurrentDirectoryPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_changeCurrentDirectoryPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_changeCurrentDirectoryPath_, path.ref.pointer); } /// fileExistsAtPath: bool fileExistsAtPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_fileExistsAtPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_fileExistsAtPath_, path.ref.pointer); } /// fileExistsAtPath:isDirectory: - bool fileExistsAtPath_isDirectory_(objc.NSString path, ffi.Pointer isDirectory) { - return _objc_msgSend_rtz5p9(this.ref.pointer, _sel_fileExistsAtPath_isDirectory_, path.ref.pointer, isDirectory); - + bool fileExistsAtPath_isDirectory_( + objc.NSString path, ffi.Pointer isDirectory) { + return _objc_msgSend_rtz5p9(this.ref.pointer, + _sel_fileExistsAtPath_isDirectory_, path.ref.pointer, isDirectory); } /// isReadableFileAtPath: bool isReadableFileAtPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isReadableFileAtPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isReadableFileAtPath_, path.ref.pointer); } /// isWritableFileAtPath: bool isWritableFileAtPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isWritableFileAtPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isWritableFileAtPath_, path.ref.pointer); } /// isExecutableFileAtPath: bool isExecutableFileAtPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isExecutableFileAtPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isExecutableFileAtPath_, path.ref.pointer); } /// isDeletableFileAtPath: bool isDeletableFileAtPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isDeletableFileAtPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isDeletableFileAtPath_, path.ref.pointer); } /// contentsEqualAtPath:andPath: bool contentsEqualAtPath_andPath_(objc.NSString path1, objc.NSString path2) { - return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_contentsEqualAtPath_andPath_, path1.ref.pointer, path2.ref.pointer); - + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_contentsEqualAtPath_andPath_, + path1.ref.pointer, + path2.ref.pointer); } /// displayNameAtPath: objc.NSString displayNameAtPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_displayNameAtPath_, path.ref.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_displayNameAtPath_, path.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// componentsToDisplayForPath: objc.NSArray? componentsToDisplayForPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_componentsToDisplayForPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_componentsToDisplayForPath_, path.ref.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_juohf7(this.ref.pointer, _sel_enumeratorAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_enumeratorAtPath_, path.ref.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, objc.ObjCBlock? handler) { - final _ret = _objc_msgSend_40k0lk(this.ref.pointer, _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, url.ref.pointer, keys?.ref.pointer ?? ffi.nullptr, mask.value, handler?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + objc.ObjCObjectBase? + enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( + objc.NSURL url, + objc.NSArray? keys, + NSDirectoryEnumerationOptions mask, + objc.ObjCBlock? + handler) { + final _ret = _objc_msgSend_40k0lk( + this.ref.pointer, + _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, + url.ref.pointer, + keys?.ref.pointer ?? ffi.nullptr, + mask.value, + handler?.ref.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_juohf7(this.ref.pointer, _sel_subpathsAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_subpathsAtPath_, path.ref.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_juohf7(this.ref.pointer, _sel_contentsAtPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_contentsAtPath_, path.ref.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_hukaf0(this.ref.pointer, _sel_createFileAtPath_contents_attributes_, path.ref.pointer, data?.ref.pointer ?? ffi.nullptr, attr?.ref.pointer ?? ffi.nullptr); - + bool createFileAtPath_contents_attributes_( + objc.NSString path, objc.NSData? data, objc.NSDictionary? attr) { + return _objc_msgSend_hukaf0( + this.ref.pointer, + _sel_createFileAtPath_contents_attributes_, + path.ref.pointer, + data?.ref.pointer ?? ffi.nullptr, + attr?.ref.pointer ?? ffi.nullptr); } /// fileSystemRepresentationWithPath: ffi.Pointer fileSystemRepresentationWithPath_(objc.NSString path) { - return _objc_msgSend_t1v5su(this.ref.pointer, _sel_fileSystemRepresentationWithPath_, path.ref.pointer); - + return _objc_msgSend_t1v5su(this.ref.pointer, + _sel_fileSystemRepresentationWithPath_, path.ref.pointer); } /// stringWithFileSystemRepresentation:length: - objc.NSString stringWithFileSystemRepresentation_length_(ffi.Pointer str, int len) { - final _ret = _objc_msgSend_1t5rcq1(this.ref.pointer, _sel_stringWithFileSystemRepresentation_length_, str, len); + objc.NSString stringWithFileSystemRepresentation_length_( + ffi.Pointer str, int len) { + final _ret = _objc_msgSend_1t5rcq1(this.ref.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_1cu34v2(this.ref.pointer, _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, originalItemURL.ref.pointer, newItemURL.ref.pointer, backupItemName?.ref.pointer ?? ffi.nullptr, options.value, resultingURL, 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_1cu34v2( + this.ref.pointer, + _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, + originalItemURL.ref.pointer, + newItemURL.ref.pointer, + backupItemName?.ref.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_191cxmu(this.ref.pointer, _sel_setUbiquitous_itemAtURL_destinationURL_error_, flag, url.ref.pointer, destinationURL.ref.pointer, error); - + bool setUbiquitous_itemAtURL_destinationURL_error_( + bool flag, + objc.NSURL url, + objc.NSURL destinationURL, + ffi.Pointer> error) { + return _objc_msgSend_191cxmu( + this.ref.pointer, + _sel_setUbiquitous_itemAtURL_destinationURL_error_, + flag, + url.ref.pointer, + destinationURL.ref.pointer, + error); } /// isUbiquitousItemAtURL: bool isUbiquitousItemAtURL_(objc.NSURL url) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isUbiquitousItemAtURL_, url.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isUbiquitousItemAtURL_, url.ref.pointer); } /// startDownloadingUbiquitousItemAtURL:error: - bool startDownloadingUbiquitousItemAtURL_error_(objc.NSURL url, ffi.Pointer> error) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_startDownloadingUbiquitousItemAtURL_error_, url.ref.pointer, error); - + bool startDownloadingUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_p02k6o( + this.ref.pointer, + _sel_startDownloadingUbiquitousItemAtURL_error_, + url.ref.pointer, + error); } /// evictUbiquitousItemAtURL:error: - bool evictUbiquitousItemAtURL_error_(objc.NSURL url, ffi.Pointer> error) { - return _objc_msgSend_p02k6o(this.ref.pointer, _sel_evictUbiquitousItemAtURL_error_, url.ref.pointer, error); - + bool evictUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_p02k6o(this.ref.pointer, + _sel_evictUbiquitousItemAtURL_error_, url.ref.pointer, error); } /// URLForUbiquityContainerIdentifier: - objc.NSURL? URLForUbiquityContainerIdentifier_(objc.NSString? containerIdentifier) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_URLForUbiquityContainerIdentifier_, containerIdentifier?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + objc.NSURL? URLForUbiquityContainerIdentifier_( + objc.NSString? containerIdentifier) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, + _sel_URLForUbiquityContainerIdentifier_, + containerIdentifier?.ref.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_1dca44n(this.ref.pointer, _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, url.ref.pointer, outDate, error); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + objc.NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( + objc.NSURL url, + ffi.Pointer> outDate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1dca44n( + this.ref.pointer, + _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, + url.ref.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_1unuoxw(this.ref.pointer, _sel_ubiquityIdentityToken); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_ubiquityIdentityToken); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// getFileProviderServicesForItemAtURL:completionHandler: - void getFileProviderServicesForItemAtURL_completionHandler_(objc.NSURL url, objc.ObjCBlock completionHandler) { -_objc_msgSend_cmbt6k(this.ref.pointer, _sel_getFileProviderServicesForItemAtURL_completionHandler_, url.ref.pointer, completionHandler.ref.pointer); - + void getFileProviderServicesForItemAtURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getFileProviderServicesForItemAtURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); } /// containerURLForSecurityApplicationGroupIdentifier: - objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_(objc.NSString groupIdentifier) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_containerURLForSecurityApplicationGroupIdentifier_, groupIdentifier.ref.pointer); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( + objc.NSString groupIdentifier) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, + _sel_containerURLForSecurityApplicationGroupIdentifier_, + groupIdentifier.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// homeDirectoryForCurrentUser objc.NSURL get homeDirectoryForCurrentUser { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_homeDirectoryForCurrentUser); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_homeDirectoryForCurrentUser); return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// temporaryDirectory objc.NSURL get temporaryDirectory { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_temporaryDirectory); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_temporaryDirectory); return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// homeDirectoryForUser: objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_homeDirectoryForUser_, userName.ref.pointer); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_homeDirectoryForUser_, userName.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// init NSFileManager init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSFileManager.castFromPointer(_ret, retain: false, release: true); } @@ -9137,7 +14530,8 @@ _objc_msgSend_cmbt6k(this.ref.pointer, _sel_getFileProviderServicesForItemAtURL_ /// allocWithZone: static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSFileManager, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSFileManager, _sel_allocWithZone_, zone); return NSFileManager.castFromPointer(_ret, retain: false, release: true); } @@ -9148,69 +14542,88 @@ _objc_msgSend_cmbt6k(this.ref.pointer, _sel_getFileProviderServicesForItemAtURL_ } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSFileManager, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSFileManager, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSFileManager, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSFileManager, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSFileManager, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSFileManager, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSFileManager, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSFileManager, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSFileManager, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSFileManager, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSFileManager, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileManager, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileManager, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileManager, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); -late final _sel_sharedHTTPCookieStorage = objc.registerName("sharedHTTPCookieStorage"); -late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); +late final _sel_sharedHTTPCookieStorage = + objc.registerName("sharedHTTPCookieStorage"); +late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = + objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); late final _sel_cookies = objc.registerName("cookies"); late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); -late final _sel_cookieWithProperties_ = objc.registerName("cookieWithProperties:"); -late final _sel_requestHeaderFieldsWithCookies_ = objc.registerName("requestHeaderFieldsWithCookies:"); -late final _sel_cookiesWithResponseHeaderFields_forURL_ = objc.registerName("cookiesWithResponseHeaderFields:forURL:"); +late final _sel_cookieWithProperties_ = + objc.registerName("cookieWithProperties:"); +late final _sel_requestHeaderFieldsWithCookies_ = + objc.registerName("requestHeaderFieldsWithCookies:"); +late final _sel_cookiesWithResponseHeaderFields_forURL_ = + objc.registerName("cookiesWithResponseHeaderFields:forURL:"); late final _sel_properties = objc.registerName("properties"); late final _sel_version = objc.registerName("version"); late final _sel_value = objc.registerName("value"); @@ -9228,58 +14641,72 @@ late final _sel_sameSitePolicy = objc.registerName("sameSitePolicy"); /// NSHTTPCookie class NSHTTPCookie extends objc.NSObject { NSHTTPCookie._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSHTTPCookie.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); } /// initWithProperties: NSHTTPCookie? initWithProperties_(objc.NSDictionary properties) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithProperties_, properties.ref.pointer); - return _ret.address == 0 ? null : NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithProperties_, properties.ref.pointer); + return _ret.address == 0 + ? null + : NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } /// cookieWithProperties: static NSHTTPCookie? cookieWithProperties_(objc.NSDictionary properties) { - final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, _sel_cookieWithProperties_, properties.ref.pointer); - return _ret.address == 0 ? null : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, + _sel_cookieWithProperties_, properties.ref.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_juohf7(_class_NSHTTPCookie, _sel_requestHeaderFieldsWithCookies_, cookies.ref.pointer); + static objc.NSDictionary requestHeaderFieldsWithCookies_( + objc.NSArray cookies) { + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, + _sel_requestHeaderFieldsWithCookies_, cookies.ref.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_iq11qg(_class_NSHTTPCookie, _sel_cookiesWithResponseHeaderFields_forURL_, headerFields.ref.pointer, URL.ref.pointer); + static objc.NSArray cookiesWithResponseHeaderFields_forURL_( + objc.NSDictionary headerFields, objc.NSURL URL) { + final _ret = _objc_msgSend_iq11qg( + _class_NSHTTPCookie, + _sel_cookiesWithResponseHeaderFields_forURL_, + headerFields.ref.pointer, + URL.ref.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// properties objc.NSDictionary? get properties { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_properties); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// version int get version { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_version); - } /// name @@ -9297,13 +14724,14 @@ class NSHTTPCookie extends objc.NSObject { /// expiresDate objc.NSDate? get expiresDate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_expiresDate); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// isSessionOnly bool get sessionOnly { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSessionOnly); - } /// domain @@ -9321,42 +14749,49 @@ class NSHTTPCookie extends objc.NSObject { /// isSecure bool get secure { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSecure); - } /// isHTTPOnly bool get HTTPOnly { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isHTTPOnly); - } /// comment objc.NSString? get comment { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_comment); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// commentURL objc.NSURL? get commentURL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_commentURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// portList objc.NSArray? get portList { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_portList); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// sameSitePolicy objc.NSString? get sameSitePolicy { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sameSitePolicy); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSHTTPCookie init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } @@ -9368,7 +14803,8 @@ class NSHTTPCookie extends objc.NSObject { /// allocWithZone: static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSHTTPCookie, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSHTTPCookie, _sel_allocWithZone_, zone); return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } @@ -9379,56 +14815,70 @@ class NSHTTPCookie extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSHTTPCookie, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookie, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSHTTPCookie, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSHTTPCookie, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSHTTPCookie, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSHTTPCookie, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookie, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -9453,340 +14903,888 @@ _objc_msgSend_1tjlcwl(_class_NSHTTPCookie, _sel_setKeys_triggerChangeNotificatio late final _sel_setCookie_ = objc.registerName("setCookie:"); late final _sel_deleteCookie_ = objc.registerName("deleteCookie:"); -late final _sel_removeCookiesSinceDate_ = objc.registerName("removeCookiesSinceDate:"); +late final _sel_removeCookiesSinceDate_ = + objc.registerName("removeCookiesSinceDate:"); late final _sel_cookiesForURL_ = objc.registerName("cookiesForURL:"); -late final _sel_setCookies_forURL_mainDocumentURL_ = objc.registerName("setCookies:forURL:mainDocumentURL:"); -final _objc_msgSend_tenbla = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); +late final _sel_setCookies_forURL_mainDocumentURL_ = + objc.registerName("setCookies:forURL:mainDocumentURL:"); +final _objc_msgSend_tenbla = 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"), - }; - + 0 => NSHTTPCookieAcceptPolicyAlways, + 1 => NSHTTPCookieAcceptPolicyNever, + 2 => NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, + _ => throw ArgumentError( + "Unknown value for NSHTTPCookieAcceptPolicy: $value"), + }; } late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); -final _objc_msgSend_1jpuqgg = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setCookieAcceptPolicy_ = objc.registerName("setCookieAcceptPolicy:"); -final _objc_msgSend_199e8fv = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_sortedCookiesUsingDescriptors_ = objc.registerName("sortedCookiesUsingDescriptors:"); +final _objc_msgSend_1jpuqgg = 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_199e8fv = 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:"); late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); late final _sel_isEqual_ = objc.registerName("isEqual:"); -bool _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline , false).cast(); -bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline , false).cast(); +bool _ObjCBlock_bool_ffiVoid_objcObjCObject_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); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline, false) + .cast(); /// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock, ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock, ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunction(bool Function(ffi.Pointer , objc.ObjCObjectBase ) fn) => - objc.ObjCBlock, ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock, ffi.Pointer)> + fromFunction( + bool Function(ffi.Pointer, objc.ObjCObjectBase) fn) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock, ffi.Pointer)> { - bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1.ref.pointer); +extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) => + ref.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)>()( + ref.pointer, arg0, arg1.ref.pointer); } late final _sel_class = objc.registerName("class"); late final _sel_performSelector_ = objc.registerName("performSelector:"); -final _objc_msgSend_12790oz = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast Function(ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline ).cast(); +final _objc_msgSend_12790oz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer , ffi.Pointer ) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, arg1).ref.retainAndAutorelease()), - retain: false, release: true); + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1).ref.retainAndAutorelease()), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension on objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0, ffi.Pointer arg1) =>objc.ObjCObjectBase(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1), retain: true, release: true); -} - -late final _sel_performSelector_withObject_ = objc.registerName("performSelector:withObject:"); -final _objc_msgSend_1g3ang8 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target.cast Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer ))(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline ).cast(); +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, ffi.Pointer arg1) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1), + retain: true, + release: true); +} + +late final _sel_performSelector_withObject_ = + objc.registerName("performSelector:withObject:"); +final _objc_msgSend_1g3ang8 = 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)>(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer , ffi.Pointer , objc.ObjCObjectBase ) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)).ref.retainAndAutorelease()), - retain: false, release: true); + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)) + .ref + .retainAndAutorelease()), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallExtension on objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0, ffi.Pointer arg1, objc.ObjCObjectBase arg2) =>objc.ObjCObjectBase(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1, arg2.ref.pointer), retain: true, release: true); -} - -late final _sel_performSelector_withObject_withObject_ = objc.registerName("performSelector:withObject:withObject:"); -final _objc_msgSend_1f2tuqz = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - block.ref.target.cast Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>>() - .asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2, arg3); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer ))(arg0, arg1, arg2, arg3); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline ).cast(); +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0, + ffi.Pointer arg1, objc.ObjCObjectBase arg2) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1, arg2.ref.pointer), + retain: true, + release: true); +} + +late final _sel_performSelector_withObject_withObject_ = + objc.registerName("performSelector:withObject:withObject:"); +final _objc_msgSend_1f2tuqz = 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)>(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer , ffi.Pointer , objc.ObjCObjectBase , objc.ObjCObjectBase ) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)).ref.retainAndAutorelease()), - retain: false, release: true); + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)) + .ref + .retainAndAutorelease()), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_CallExtension on objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0, ffi.Pointer arg1, objc.ObjCObjectBase arg2, objc.ObjCObjectBase arg3) =>objc.ObjCObjectBase(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), retain: true, release: true); +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, + ffi.Pointer arg1, + objc.ObjCObjectBase arg2, + objc.ObjCObjectBase arg3) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), + retain: true, + release: true); } late final _sel_isProxy = objc.registerName("isProxy"); late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); -bool _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline , false).cast(); -bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline , false).cast(); +bool _ObjCBlock_bool_ffiVoid_Protocol_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); +ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline, false) + .cast(); /// Construction methods for `objc.ObjCBlock, objc.Protocol)>`. abstract final class ObjCBlock_bool_ffiVoid_Protocol { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, objc.Protocol)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock, objc.Protocol)>(pointer, retain: retain, release: release); + static objc.ObjCBlock, objc.Protocol)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + objc.Protocol)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, objc.Protocol)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock, objc.Protocol)>(objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock, objc.Protocol)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.Protocol)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, objc.Protocol)> fromFunction(bool Function(ffi.Pointer , objc.Protocol ) fn) => - objc.ObjCBlock, objc.Protocol)>(objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_Protocol_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, objc.Protocol.castFromPointer(arg1, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock, objc.Protocol)> + fromFunction(bool Function(ffi.Pointer, objc.Protocol) fn) => + objc.ObjCBlock, objc.Protocol)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + objc.Protocol.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, objc.Protocol)>`. -extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension on objc.ObjCBlock, objc.Protocol)> { - bool call(ffi.Pointer arg0, objc.Protocol arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1.ref.pointer); +extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension + on objc.ObjCBlock, objc.Protocol)> { + bool call(ffi.Pointer arg0, objc.Protocol arg1) => + ref.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)>()( + ref.pointer, arg0, arg1.ref.pointer); } late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); -final _objc_msgSend_8d7dvc = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline , false).cast(); -bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline , false).cast(); +final _objc_msgSend_8d7dvc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_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); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline, false) + .cast(); /// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock, ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock, ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunction(bool Function(ffi.Pointer , ffi.Pointer ) fn) => - objc.ObjCBlock, ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, arg1)), - retain: false, release: true); + static objc + .ObjCBlock, ffi.Pointer)> + fromFunction(bool Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1)), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension on objc.ObjCBlock, ffi.Pointer)> { - bool call(ffi.Pointer arg0, ffi.Pointer arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0, arg1); +extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, ffi.Pointer arg1) => + ref.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)>()(ref.pointer, arg0, arg1); } late final _sel_release = objc.registerName("release"); -void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_ffiVoid_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiVoid_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(void Function(ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0)), - retain: false, release: true); + static objc.ObjCBlock)> fromFunction( + void Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -9797,199 +15795,384 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock)> listener(void Function(ffi.Pointer ) fn) { + static objc.ObjCBlock)> listener( + void Function(ffi.Pointer) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(arg0)); + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0)); final wrapper = _wrapListenerBlock_hepzs(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>(wrapper, retain: false, release: true); + return objc.ObjCBlock)>(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid_CallExtension on objc.ObjCBlock)> { - void call(ffi.Pointer arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0); +extension ObjCBlock_ffiVoid_ffiVoid_CallExtension + on objc.ObjCBlock)> { + void call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } late final _sel_retainCount = objc.registerName("retainCount"); -int _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrTrampoline , 0).cast(); -int _ObjCBlock_ffiUnsignedLong_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as int Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiUnsignedLong_ffiVoid_closureTrampoline , 0).cast(); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_closureTrampoline, 0) + .cast(); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiUnsignedLong_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiUnsignedLong_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(int Function(ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_ffiUnsignedLong_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0)), - retain: false, release: true); + static objc.ObjCBlock)> + fromFunction(int Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiUnsignedLong_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiUnsignedLong_ffiVoid_CallExtension on objc.ObjCBlock)> { - int call(ffi.Pointer arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0); +extension ObjCBlock_ffiUnsignedLong_ffiVoid_CallExtension + on objc.ObjCBlock)> { + int call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } late final _sel_zone = objc.registerName("zone"); -final _objc_msgSend_j04r6g = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>(); -ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast Function(ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer )>()(arg0); -ffi.Pointer _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline ).cast(); -ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer<_NSZone> Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_NSZone_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSZone_ffiVoid_closureTrampoline ).cast(); +final _objc_msgSend_j04r6g = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>(); +ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer<_NSZone> Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSZone_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSZone_ffiVoid_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. abstract final class ObjCBlock_NSZone_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock Function(ffi.Pointer)>(pointer, retain: retain, release: release); + static objc.ObjCBlock Function(ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock Function(ffi.Pointer)>(objc.newPointerBlock(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> fromFunction(ffi.Pointer<_NSZone> Function(ffi.Pointer ) fn) => - objc.ObjCBlock Function(ffi.Pointer)>(objc.newClosureBlock(_ObjCBlock_NSZone_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0)), - retain: false, release: true); + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunction(ffi.Pointer<_NSZone> Function(ffi.Pointer) fn) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newClosureBlock(_ObjCBlock_NSZone_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_NSZone_ffiVoid_CallExtension on objc.ObjCBlock Function(ffi.Pointer)> { - ffi.Pointer<_NSZone> call(ffi.Pointer arg0) =>ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction Function(ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0); +extension ObjCBlock_NSZone_ffiVoid_CallExtension + on objc.ObjCBlock Function(ffi.Pointer)> { + ffi.Pointer<_NSZone> call(ffi.Pointer arg0) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } late final _sel_hash = objc.registerName("hash"); late final _sel_superclass = objc.registerName("superclass"); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast Function(ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer )>()(arg0); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSString_ffiVoid_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSString_ffiVoid_closureTrampoline ).cast(); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_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_NSString_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSString_ffiVoid_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_NSString_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(objc.NSString Function(ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_NSString_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0).ref.retainAndAutorelease()), - retain: false, release: true); + static objc.ObjCBlock)> + fromFunction(objc.NSString Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSString_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSString_ffiVoid_CallExtension on objc.ObjCBlock)> { - objc.NSString call(ffi.Pointer arg0) =>objc.NSString.castFromPointer(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction Function(ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0), retain: true, release: true); +extension ObjCBlock_NSString_ffiVoid_CallExtension + on objc.ObjCBlock)> { + objc.NSString call(ffi.Pointer arg0) => + objc.NSString.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); } late final _sel_debugDescription = objc.registerName("debugDescription"); late final _sel_progress = objc.registerName("progress"); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast Function(ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer )>()(arg0); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline ).cast(); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_NSProgress_ffiVoid_closureTrampoline ).cast(); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_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_NSProgress_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_closureTrampoline) + .cast(); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_NSProgress_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_NSProgress_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(NSProgress Function(ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_NSProgress_ffiVoid_closureCallable, (ffi.Pointer arg0) => fn(arg0).ref.retainAndAutorelease()), - retain: false, release: true); + static objc.ObjCBlock)> + fromFunction(NSProgress Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSProgress_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSProgress_ffiVoid_CallExtension on objc.ObjCBlock)> { - NSProgress call(ffi.Pointer arg0) =>NSProgress.castFromPointer(ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction Function(ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0), retain: true, release: true); +extension ObjCBlock_NSProgress_ffiVoid_CallExtension + on objc.ObjCBlock)> { + NSProgress call(ffi.Pointer arg0) => NSProgress.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); } late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); late final _class_NSURLRequest = objc.getClass("NSURLRequest"); late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); + enum NSURLRequestCachePolicy { NSURLRequestUseProtocolCachePolicy(0), NSURLRequestReloadIgnoringLocalCacheData(1), @@ -9998,35 +16181,64 @@ enum NSURLRequestCachePolicy { NSURLRequestReturnCacheDataDontLoad(3), NSURLRequestReloadRevalidatingCacheData(5); - static const NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData; + 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"), - }; + 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"; + 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_191svj = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Double )>>().asFunction , ffi.Pointer , ffi.Pointer , int , double )>(); -late final _sel_initWithURL_cachePolicy_timeoutInterval_ = objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); +late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); +final _objc_msgSend_191svj = 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_URL = objc.registerName("URL"); late final _sel_cachePolicy = objc.registerName("cachePolicy"); -final _objc_msgSend_2xak1q = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_2xak1q = 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), @@ -10038,113 +16250,150 @@ enum NSURLRequestNetworkServiceType { 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"), - }; - + 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_ttt73t = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_allowsCellularAccess = objc.registerName("allowsCellularAccess"); -late final _sel_allowsExpensiveNetworkAccess = objc.registerName("allowsExpensiveNetworkAccess"); -late final _sel_allowsConstrainedNetworkAccess = objc.registerName("allowsConstrainedNetworkAccess"); +final _objc_msgSend_ttt73t = 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"), - }; - + 0 => NSURLRequestAttributionDeveloper, + 1 => NSURLRequestAttributionUser, + _ => throw ArgumentError( + "Unknown value for NSURLRequestAttribution: $value"), + }; } late final _sel_attribution = objc.registerName("attribution"); -final _objc_msgSend_t5yka9 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_requiresDNSSECValidation = objc.registerName("requiresDNSSECValidation"); +final _objc_msgSend_t5yka9 = 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_valueForHTTPHeaderField_ = + objc.registerName("valueForHTTPHeaderField:"); late final _sel_HTTPBody = objc.registerName("HTTPBody"); late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); -late final _sel_HTTPShouldHandleCookies = objc.registerName("HTTPShouldHandleCookies"); -late final _sel_HTTPShouldUsePipelining = objc.registerName("HTTPShouldUsePipelining"); +late final _sel_HTTPShouldHandleCookies = + objc.registerName("HTTPShouldHandleCookies"); +late final _sel_HTTPShouldUsePipelining = + objc.registerName("HTTPShouldUsePipelining"); /// NSURLRequest class NSURLRequest extends objc.NSObject { NSURLRequest._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLRequest); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLRequest); } /// requestWithURL: static NSURLRequest requestWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7(_class_NSURLRequest, _sel_requestWithURL_, URL.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSURLRequest, _sel_requestWithURL_, URL.ref.pointer); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { return _objc_msgSend_olxnu1(_class_NSURLRequest, _sel_supportsSecureCoding); - } /// requestWithURL:cachePolicy:timeoutInterval: - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_191svj(_class_NSURLRequest, _sel_requestWithURL_cachePolicy_timeoutInterval_, URL.ref.pointer, cachePolicy.value, timeoutInterval); + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, + double timeoutInterval) { + final _ret = _objc_msgSend_191svj( + _class_NSURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// initWithURL: NSURLRequest initWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// initWithURL:cachePolicy:timeoutInterval: - NSURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_191svj(this.ref.retainAndReturnPointer(), _sel_initWithURL_cachePolicy_timeoutInterval_, URL.ref.pointer, cachePolicy.value, timeoutInterval); + NSURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_191svj( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// cachePolicy @@ -10155,44 +16404,46 @@ class NSURLRequest extends objc.NSObject { /// timeoutInterval double get timeoutInterval { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutInterval) : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutInterval) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); } /// mainDocumentURL objc.NSURL? get mainDocumentURL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// networkServiceType NSURLRequestNetworkServiceType get networkServiceType { - final _ret = _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// allowsCellularAccess bool get allowsCellularAccess { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); - } /// allowsExpensiveNetworkAccess bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsExpensiveNetworkAccess); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } /// allowsConstrainedNetworkAccess bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsConstrainedNetworkAccess); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } /// assumesHTTP3Capable bool get assumesHTTP3Capable { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); - } /// attribution @@ -10203,55 +16454,66 @@ class NSURLRequest extends objc.NSObject { /// requiresDNSSECValidation bool get requiresDNSSECValidation { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_requiresDNSSECValidation); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } /// HTTPMethod objc.NSString? get HTTPMethod { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPMethod); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// allHTTPHeaderFields objc.NSDictionary? get allHTTPHeaderFields { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_juohf7(this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// HTTPBody objc.NSData? get HTTPBody { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// HTTPBodyStream objc.NSInputStream? get HTTPBodyStream { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); - return _ret.address == 0 ? null : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// HTTPShouldHandleCookies bool get HTTPShouldHandleCookies { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); - } /// HTTPShouldUsePipelining bool get HTTPShouldUsePipelining { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); - } /// init NSURLRequest init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } @@ -10263,7 +16525,8 @@ class NSURLRequest extends objc.NSObject { /// allocWithZone: static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLRequest, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLRequest, _sel_allocWithZone_, zone); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } @@ -10274,56 +16537,70 @@ class NSURLRequest extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLRequest, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSURLRequest, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLRequest, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLRequest, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLRequest, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLRequest, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -10347,88 +16624,137 @@ _objc_msgSend_1tjlcwl(_class_NSURLRequest, _sel_setKeys_triggerChangeNotificatio /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSURLRequest? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSURLRequest.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: false, release: true); } } late final _sel_originalRequest = objc.registerName("originalRequest"); late final _sel_currentRequest = objc.registerName("currentRequest"); late final _class_NSURLResponse = objc.getClass("NSURLResponse"); -late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = objc.registerName("initWithURL:MIMEType:expectedContentLength:textEncodingName:"); -final _objc_msgSend_eyseqq = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Long , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_eyseqq = 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_e94jsr = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +late final _sel_expectedContentLength = + objc.registerName("expectedContentLength"); +final _objc_msgSend_e94jsr = 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"); /// NSURLResponse class NSURLResponse extends objc.NSObject { NSURLResponse._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLResponse); + return _objc_msgSend_l8lotg( + obj.ref.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_eyseqq(this.ref.retainAndReturnPointer(), _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, URL.ref.pointer, MIMEType?.ref.pointer ?? ffi.nullptr, length, name?.ref.pointer ?? ffi.nullptr); + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + int length, + objc.NSString? name) { + final _ret = _objc_msgSend_eyseqq( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, + URL.ref.pointer, + MIMEType?.ref.pointer ?? ffi.nullptr, + length, + name?.ref.pointer ?? ffi.nullptr); return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// MIMEType objc.NSString? get MIMEType { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_MIMEType); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// expectedContentLength int get expectedContentLength { return _objc_msgSend_e94jsr(this.ref.pointer, _sel_expectedContentLength); - } /// textEncodingName objc.NSString? get textEncodingName { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textEncodingName); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// suggestedFilename objc.NSString? get suggestedFilename { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_suggestedFilename); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_suggestedFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSURLResponse init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } @@ -10440,7 +16766,8 @@ class NSURLResponse extends objc.NSObject { /// allocWithZone: static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLResponse, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLResponse, _sel_allocWithZone_, zone); return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } @@ -10451,56 +16778,70 @@ class NSURLResponse extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLResponse, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSURLResponse, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLResponse, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLResponse, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLResponse, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLResponse, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -10524,123 +16865,171 @@ _objc_msgSend_1tjlcwl(_class_NSURLResponse, _sel_setKeys_triggerChangeNotificati /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSURLResponse, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSURLResponse, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSURLResponse? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSURLResponse.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: false, release: true); } } late final _sel_response = objc.registerName("response"); late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); -late final _sel_setEarliestBeginDate_ = objc.registerName("setEarliestBeginDate:"); -late final _sel_countOfBytesClientExpectsToSend = objc.registerName("countOfBytesClientExpectsToSend"); -late final _sel_setCountOfBytesClientExpectsToSend_ = objc.registerName("setCountOfBytesClientExpectsToSend:"); -late final _sel_countOfBytesClientExpectsToReceive = objc.registerName("countOfBytesClientExpectsToReceive"); -late final _sel_setCountOfBytesClientExpectsToReceive_ = objc.registerName("setCountOfBytesClientExpectsToReceive:"); +late final _sel_setEarliestBeginDate_ = + objc.registerName("setEarliestBeginDate:"); +late final _sel_countOfBytesClientExpectsToSend = + objc.registerName("countOfBytesClientExpectsToSend"); +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +late final _sel_countOfBytesClientExpectsToReceive = + objc.registerName("countOfBytesClientExpectsToReceive"); +late final _sel_setCountOfBytesClientExpectsToReceive_ = + objc.registerName("setCountOfBytesClientExpectsToReceive:"); late final _sel_countOfBytesSent = objc.registerName("countOfBytesSent"); -late final _sel_countOfBytesReceived = objc.registerName("countOfBytesReceived"); -late final _sel_countOfBytesExpectedToSend = objc.registerName("countOfBytesExpectedToSend"); -late final _sel_countOfBytesExpectedToReceive = objc.registerName("countOfBytesExpectedToReceive"); +late final _sel_countOfBytesReceived = + objc.registerName("countOfBytesReceived"); +late final _sel_countOfBytesExpectedToSend = + objc.registerName("countOfBytesExpectedToSend"); +late final _sel_countOfBytesExpectedToReceive = + objc.registerName("countOfBytesExpectedToReceive"); late final _sel_taskDescription = objc.registerName("taskDescription"); late final _sel_setTaskDescription_ = objc.registerName("setTaskDescription:"); + enum NSURLSessionTaskState { NSURLSessionTaskStateRunning(0), NSURLSessionTaskStateSuspended(1), NSURLSessionTaskStateCanceling(2), NSURLSessionTaskStateCompleted(3); - final int value; const NSURLSessionTaskState(this.value); static NSURLSessionTaskState fromValue(int value) => switch (value) { - 0 => NSURLSessionTaskStateRunning, - 1 => NSURLSessionTaskStateSuspended, - 2 => NSURLSessionTaskStateCanceling, - 3 => NSURLSessionTaskStateCompleted, - _ => throw ArgumentError("Unknown value for NSURLSessionTaskState: $value"), - }; - + 0 => NSURLSessionTaskStateRunning, + 1 => NSURLSessionTaskStateSuspended, + 2 => NSURLSessionTaskStateCanceling, + 3 => NSURLSessionTaskStateCompleted, + _ => throw ArgumentError( + "Unknown value for NSURLSessionTaskState: $value"), + }; } late final _sel_state = objc.registerName("state"); -final _objc_msgSend_8b7yc1 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_8b7yc1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_error = objc.registerName("error"); late final _sel_suspend = objc.registerName("suspend"); late final _sel_priority = objc.registerName("priority"); -final _objc_msgSend_fcilgx = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -final _objc_msgSend_fcilgxFpret = objc.msgSendFpretPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_fcilgx = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_fcilgxFpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_setPriority_ = objc.registerName("setPriority:"); -final _objc_msgSend_s9gjzc = objc.msgSendPointer.cast , ffi.Pointer , ffi.Float )>>().asFunction , ffi.Pointer , double )>(); -late final _sel_prefersIncrementalDelivery = objc.registerName("prefersIncrementalDelivery"); -late final _sel_setPrefersIncrementalDelivery_ = objc.registerName("setPrefersIncrementalDelivery:"); +final _objc_msgSend_s9gjzc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_prefersIncrementalDelivery = + objc.registerName("prefersIncrementalDelivery"); +late final _sel_setPrefersIncrementalDelivery_ = + objc.registerName("setPrefersIncrementalDelivery:"); /// NSURLSessionTask class NSURLSessionTask extends objc.NSObject { NSURLSessionTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionTask] that points to the same underlying object as [other]. - NSURLSessionTask.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } /// taskIdentifier int get taskIdentifier { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_taskIdentifier); - } /// originalRequest NSURLRequest? get originalRequest { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_originalRequest); - return _ret.address == 0 ? null : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// currentRequest NSURLRequest? get currentRequest { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentRequest); - return _ret.address == 0 ? null : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// response NSURLResponse? get response { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_response); - return _ret.address == 0 ? null : NSURLResponse.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); - + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } /// progress @@ -10651,80 +17040,82 @@ class NSURLSessionTask extends objc.NSObject { /// earliestBeginDate objc.NSDate? get earliestBeginDate { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_earliestBeginDate); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_earliestBeginDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// setEarliestBeginDate: - set earliestBeginDate(objc.NSDate? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEarliestBeginDate_, value?.ref.pointer ?? ffi.nullptr); - + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEarliestBeginDate_, + value?.ref.pointer ?? ffi.nullptr); } /// countOfBytesClientExpectsToSend int get countOfBytesClientExpectsToSend { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesClientExpectsToSend); - + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesClientExpectsToSend); } /// setCountOfBytesClientExpectsToSend: - set countOfBytesClientExpectsToSend(int value) { - return _objc_msgSend_rrr3q(this.ref.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); - + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); } /// countOfBytesClientExpectsToReceive int get countOfBytesClientExpectsToReceive { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesClientExpectsToReceive); - + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesClientExpectsToReceive); } /// setCountOfBytesClientExpectsToReceive: - set countOfBytesClientExpectsToReceive(int value) { - return _objc_msgSend_rrr3q(this.ref.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); - + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); } /// countOfBytesSent int get countOfBytesSent { return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesSent); - } /// countOfBytesReceived int get countOfBytesReceived { return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesReceived); - } /// countOfBytesExpectedToSend int get countOfBytesExpectedToSend { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesExpectedToSend); - + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesExpectedToSend); } /// countOfBytesExpectedToReceive int get countOfBytesExpectedToReceive { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesExpectedToReceive); - + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesExpectedToReceive); } /// taskDescription objc.NSString? get taskDescription { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_taskDescription); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setTaskDescription: - set taskDescription(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTaskDescription_, value?.ref.pointer ?? ffi.nullptr); - + set taskDescription(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTaskDescription_, + value?.ref.pointer ?? ffi.nullptr); } /// cancel void cancel() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } /// state @@ -10736,48 +17127,49 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); /// error objc.NSError? get error { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_error); - return _ret.address == 0 ? null : objc.NSError.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } /// suspend void suspend() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_suspend); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_suspend); } /// resume void resume() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); } /// priority double get priority { - return objc.useMsgSendVariants ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_priority) : _objc_msgSend_fcilgx(this.ref.pointer, _sel_priority); - + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_priority) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_priority); } /// setPriority: - set priority(double value) { + set priority(double value) { return _objc_msgSend_s9gjzc(this.ref.pointer, _sel_setPriority_, value); - } /// prefersIncrementalDelivery bool get prefersIncrementalDelivery { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_prefersIncrementalDelivery); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_prefersIncrementalDelivery); } /// setPrefersIncrementalDelivery: - set prefersIncrementalDelivery(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setPrefersIncrementalDelivery_, value); - + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setPrefersIncrementalDelivery_, value); } /// init NSURLSessionTask init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } @@ -10789,7 +17181,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); /// allocWithZone: static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionTask, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionTask, _sel_allocWithZone_, zone); return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } @@ -10800,56 +17193,71 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLSessionTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionTask, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionTask, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionTask, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -10872,47 +17280,91 @@ _objc_msgSend_1tjlcwl(_class_NSURLSessionTask, _sel_setKeys_triggerChangeNotific } } -late final _sel_storeCookies_forTask_ = objc.registerName("storeCookies:forTask:"); -void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSArray_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSArray_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSArray_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +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); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSArray_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSArray_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSArray_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSArray { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSArray_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSArray_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSArray? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSArray_closureCallable, (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSArray.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -10923,324 +17375,440 @@ abstract final class ObjCBlock_ffiVoid_NSArray { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSArray? ) fn) { + static objc.ObjCBlock listener( + void Function(objc.NSArray?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSArray_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSArray.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSArray_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSArray_CallExtension on objc.ObjCBlock { - void call(objc.NSArray? arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_getCookiesForTask_completionHandler_ = objc.registerName("getCookiesForTask:completionHandler:"); +extension ObjCBlock_ffiVoid_NSArray_CallExtension + on objc.ObjCBlock { + void call(objc.NSArray? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); /// NSHTTPCookieStorage class NSHTTPCookieStorage extends objc.NSObject { NSHTTPCookieStorage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); } /// sharedHTTPCookieStorage static NSHTTPCookieStorage getSharedHTTPCookieStorage() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } /// sharedCookieStorageForGroupContainerIdentifier: - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_(objc.NSString identifier) { - final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookieStorage, _sel_sharedCookieStorageForGroupContainerIdentifier_, identifier.ref.pointer); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7( + _class_NSHTTPCookieStorage, + _sel_sharedCookieStorageForGroupContainerIdentifier_, + identifier.ref.pointer); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } /// cookies objc.NSArray? get cookies { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_cookies); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setCookie: void setCookie_(NSHTTPCookie cookie) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCookie_, cookie.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCookie_, cookie.ref.pointer); } /// deleteCookie: void deleteCookie_(NSHTTPCookie cookie) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_deleteCookie_, cookie.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_deleteCookie_, cookie.ref.pointer); } /// removeCookiesSinceDate: void removeCookiesSinceDate_(objc.NSDate date) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCookiesSinceDate_, date.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeCookiesSinceDate_, date.ref.pointer); } /// cookiesForURL: objc.NSArray? cookiesForURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_cookiesForURL_, URL.ref.pointer); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_cookiesForURL_, URL.ref.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_tenbla(this.ref.pointer, _sel_setCookies_forURL_mainDocumentURL_, cookies.ref.pointer, URL?.ref.pointer ?? ffi.nullptr, mainDocumentURL?.ref.pointer ?? ffi.nullptr); - + void setCookies_forURL_mainDocumentURL_( + objc.NSArray cookies, objc.NSURL? URL, objc.NSURL? mainDocumentURL) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_setCookies_forURL_mainDocumentURL_, + cookies.ref.pointer, + URL?.ref.pointer ?? ffi.nullptr, + mainDocumentURL?.ref.pointer ?? ffi.nullptr); } /// cookieAcceptPolicy NSHTTPCookieAcceptPolicy get cookieAcceptPolicy { - final _ret = _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_cookieAcceptPolicy); + final _ret = + _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_cookieAcceptPolicy); return NSHTTPCookieAcceptPolicy.fromValue(_ret); } /// setCookieAcceptPolicy: - set cookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { - return _objc_msgSend_199e8fv(this.ref.pointer, _sel_setCookieAcceptPolicy_, value.value); - + set cookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { + return _objc_msgSend_199e8fv( + this.ref.pointer, _sel_setCookieAcceptPolicy_, value.value); } /// sortedCookiesUsingDescriptors: objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_sortedCookiesUsingDescriptors_, sortOrder.ref.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// storeCookies:forTask: void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_storeCookies_forTask_, cookies.ref.pointer, task.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_storeCookies_forTask_, + cookies.ref.pointer, task.ref.pointer); } /// getCookiesForTask:completionHandler: - void getCookiesForTask_completionHandler_(NSURLSessionTask task, objc.ObjCBlock completionHandler) { -_objc_msgSend_cmbt6k(this.ref.pointer, _sel_getCookiesForTask_completionHandler_, task.ref.pointer, completionHandler.ref.pointer); - + void getCookiesForTask_completionHandler_(NSURLSessionTask task, + objc.ObjCBlock completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getCookiesForTask_completionHandler_, + task.ref.pointer, + completionHandler.ref.pointer); } /// init NSHTTPCookieStorage init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } /// new static NSHTTPCookieStorage new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_new); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: false, release: true); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSHTTPCookieStorage alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_alloc); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSHTTPCookieStorage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSHTTPCookieStorage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSHTTPCookieStorage, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookieStorage, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSHTTPCookieStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSHTTPCookieStorage, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSHTTPCookieStorage, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSHTTPCookieStorage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSHTTPCookieStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSHTTPCookieStorage self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } /// retain NSHTTPCookieStorage retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSHTTPCookieStorage autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } } late final _class_NSIndexPath = objc.getClass("NSIndexPath"); late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); -late final _sel_indexPathWithIndexes_length_ = objc.registerName("indexPathWithIndexes:length:"); -final _objc_msgSend_1educny = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_initWithIndexes_length_ = objc.registerName("initWithIndexes:length:"); +late final _sel_indexPathWithIndexes_length_ = + objc.registerName("indexPathWithIndexes:length:"); +final _objc_msgSend_1educny = 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:"); -late final _sel_indexPathByRemovingLastIndex = objc.registerName("indexPathByRemovingLastIndex"); +late final _sel_indexPathByAddingIndex_ = + objc.registerName("indexPathByAddingIndex:"); +late final _sel_indexPathByRemovingLastIndex = + objc.registerName("indexPathByRemovingLastIndex"); late final _sel_indexAtPosition_ = objc.registerName("indexAtPosition:"); -final _objc_msgSend_1eigyr6 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_1eigyr6 = 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_oxe0mk = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , objc.NSRange )>>().asFunction , ffi.Pointer , ffi.Pointer , objc.NSRange )>(); +final _objc_msgSend_oxe0mk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>(); late final _sel_getIndexes_ = objc.registerName("getIndexes:"); -final _objc_msgSend_v7ntkj = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_v7ntkj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(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); + {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.ref.pointer, retain: true, release: true); + NSIndexPath.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSIndexPath); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSIndexPath); } /// indexPathWithIndex: static NSIndexPath indexPathWithIndex_(int index) { - final _ret = _objc_msgSend_ehxl2g(_class_NSIndexPath, _sel_indexPathWithIndex_, index); + final _ret = _objc_msgSend_ehxl2g( + _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_1educny(_class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); + static NSIndexPath indexPathWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_1educny( + _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_1educny(this.ref.retainAndReturnPointer(), _sel_initWithIndexes_length_, indexes, length); + NSIndexPath initWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_1educny(this.ref.retainAndReturnPointer(), + _sel_initWithIndexes_length_, indexes, length); return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// initWithIndex: NSIndexPath initWithIndex_(int index) { - final _ret = _objc_msgSend_ehxl2g(this.ref.retainAndReturnPointer(), _sel_initWithIndex_, index); + final _ret = _objc_msgSend_ehxl2g( + this.ref.retainAndReturnPointer(), _sel_initWithIndex_, index); return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } /// indexPathByAddingIndex: NSIndexPath indexPathByAddingIndex_(int index) { - final _ret = _objc_msgSend_ehxl2g(this.ref.pointer, _sel_indexPathByAddingIndex_, index); + final _ret = _objc_msgSend_ehxl2g( + this.ref.pointer, _sel_indexPathByAddingIndex_, index); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// indexPathByRemovingLastIndex NSIndexPath indexPathByRemovingLastIndex() { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_indexPathByRemovingLastIndex); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_indexPathByRemovingLastIndex); return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } /// indexAtPosition: int indexAtPosition_(int position) { - return _objc_msgSend_1eigyr6(this.ref.pointer, _sel_indexAtPosition_, position); - + return _objc_msgSend_1eigyr6( + this.ref.pointer, _sel_indexAtPosition_, position); } /// length int get length { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_length); - } /// getIndexes:range: - void getIndexes_range_(ffi.Pointer indexes, objc.NSRange positionRange) { -_objc_msgSend_oxe0mk(this.ref.pointer, _sel_getIndexes_range_, indexes, positionRange); - + void getIndexes_range_( + ffi.Pointer indexes, objc.NSRange positionRange) { + _objc_msgSend_oxe0mk( + this.ref.pointer, _sel_getIndexes_range_, indexes, positionRange); } /// compare: objc.NSComparisonResult compare_(NSIndexPath otherObject) { - final _ret = _objc_msgSend_1ile2ev(this.ref.pointer, _sel_compare_, otherObject.ref.pointer); + final _ret = _objc_msgSend_1ile2ev( + this.ref.pointer, _sel_compare_, otherObject.ref.pointer); return objc.NSComparisonResult.fromValue(_ret); } /// getIndexes: void getIndexes_(ffi.Pointer indexes) { -_objc_msgSend_v7ntkj(this.ref.pointer, _sel_getIndexes_, indexes); - + _objc_msgSend_v7ntkj(this.ref.pointer, _sel_getIndexes_, indexes); } /// init NSIndexPath init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } @@ -11252,7 +17820,8 @@ _objc_msgSend_v7ntkj(this.ref.pointer, _sel_getIndexes_, indexes); /// allocWithZone: static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSIndexPath, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSIndexPath, _sel_allocWithZone_, zone); return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } @@ -11263,56 +17832,70 @@ _objc_msgSend_v7ntkj(this.ref.pointer, _sel_getIndexes_, indexes); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSIndexPath, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSIndexPath, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSIndexPath, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSIndexPath, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSIndexPath, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSIndexPath, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSIndexPath, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSIndexPath, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSIndexPath, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSIndexPath, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSIndexPath, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSIndexPath, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -11337,70 +17920,75 @@ _objc_msgSend_1tjlcwl(_class_NSIndexPath, _sel_setKeys_triggerChangeNotification /// supportsSecureCoding static bool supportsSecureCoding() { return _objc_msgSend_olxnu1(_class_NSIndexPath, _sel_supportsSecureCoding); - } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSIndexPath? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSIndexPath.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSIndexPath.castFromPointer(_ret, retain: false, release: true); } } late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); late final _sel_automaticRule = objc.registerName("automaticRule"); late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); -late final _sel_canInflectPreferredLocalization = objc.registerName("canInflectPreferredLocalization"); +late final _sel_canInflectPreferredLocalization = + objc.registerName("canInflectPreferredLocalization"); /// NSInflectionRule class NSInflectionRule extends objc.NSObject { NSInflectionRule._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSInflectionRule.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); } /// init NSInflectionRule init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } /// automaticRule static NSInflectionRule getAutomaticRule() { - final _ret = _objc_msgSend_1unuoxw(_class_NSInflectionRule, _sel_automaticRule); + final _ret = + _objc_msgSend_1unuoxw(_class_NSInflectionRule, _sel_automaticRule); return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } /// canInflectLanguage: static bool canInflectLanguage_(objc.NSString language) { - return _objc_msgSend_l8lotg(_class_NSInflectionRule, _sel_canInflectLanguage_, language.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSInflectionRule, + _sel_canInflectLanguage_, language.ref.pointer); } /// canInflectPreferredLocalization static bool getCanInflectPreferredLocalization() { - return _objc_msgSend_olxnu1(_class_NSInflectionRule, _sel_canInflectPreferredLocalization); - + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_canInflectPreferredLocalization); } /// new @@ -11411,7 +17999,8 @@ class NSInflectionRule extends objc.NSObject { /// allocWithZone: static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSInflectionRule, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSInflectionRule, _sel_allocWithZone_, zone); return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } @@ -11422,56 +18011,71 @@ class NSInflectionRule extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSInflectionRule, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSInflectionRule, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSInflectionRule, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSInflectionRule, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSInflectionRule, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSInflectionRule, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSInflectionRule, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSInflectionRule, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSInflectionRule, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSInflectionRule, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -11495,48 +18099,67 @@ _objc_msgSend_1tjlcwl(_class_NSInflectionRule, _sel_setKeys_triggerChangeNotific /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSInflectionRule, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSInflectionRule, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSInflectionRule? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSInflectionRule.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSInflectionRule.castFromPointer(_ret, retain: false, 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"), - }; - + 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_y3dgf1 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setGrammaticalGender_ = objc.registerName("setGrammaticalGender:"); -final _objc_msgSend_12a9bks = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_y3dgf1 = 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_12a9bks = 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), @@ -11554,35 +18177,49 @@ enum NSGrammaticalPartOfSpeech { 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"), - }; - + 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_vk5e30 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_vk5e30 = 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_1k6p0ib = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_1k6p0ib = 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), @@ -11592,27 +18229,41 @@ enum NSGrammaticalNumber { 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"), - }; - + 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_1lu1qy9 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1lu1qy9 = 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_kwz1vc = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_kwz1vc = 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), @@ -11630,373 +18281,491 @@ enum NSGrammaticalCase { 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"), - }; - + 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_1xz5l6 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1xz5l6 = 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_erklvx = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_erklvx = 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"), - }; - + 0 => NSGrammaticalDeterminationNotSet, + 1 => NSGrammaticalDeterminationIndependent, + 2 => NSGrammaticalDeterminationDependent, + _ => throw ArgumentError( + "Unknown value for NSGrammaticalDetermination: $value"), + }; } late final _sel_determination = objc.registerName("determination"); -final _objc_msgSend_18c2fg3 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_18c2fg3 = 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_ug05wa = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_ug05wa = 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"), - }; - + 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_1ffoin9 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setGrammaticalPerson_ = objc.registerName("setGrammaticalPerson:"); -final _objc_msgSend_ae3g2g = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_1ffoin9 = 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_ae3g2g = 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"), - }; - + 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_17hihkj = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_17hihkj = 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_1trhr2m = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_1trhr2m = 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"), - }; - + 0 => NSGrammaticalDefinitenessNotSet, + 1 => NSGrammaticalDefinitenessIndefinite, + 2 => NSGrammaticalDefinitenessDefinite, + _ => throw ArgumentError( + "Unknown value for NSGrammaticalDefiniteness: $value"), + }; } late final _sel_definiteness = objc.registerName("definiteness"); -final _objc_msgSend_gnbhg7 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_gnbhg7 = 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_vbzknq = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _class_NSMorphologyCustomPronoun = objc.getClass("NSMorphologyCustomPronoun"); -late final _sel_isSupportedForLanguage_ = objc.registerName("isSupportedForLanguage:"); -late final _sel_requiredKeysForLanguage_ = objc.registerName("requiredKeysForLanguage:"); +final _objc_msgSend_vbzknq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _class_NSMorphologyCustomPronoun = + objc.getClass("NSMorphologyCustomPronoun"); +late final _sel_isSupportedForLanguage_ = + objc.registerName("isSupportedForLanguage:"); +late final _sel_requiredKeysForLanguage_ = + objc.registerName("requiredKeysForLanguage:"); 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_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:"); /// NSMorphologyCustomPronoun class NSMorphologyCustomPronoun extends objc.NSObject { NSMorphologyCustomPronoun._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSMorphologyCustomPronoun.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); } /// isSupportedForLanguage: static bool isSupportedForLanguage_(objc.NSString language) { - return _objc_msgSend_l8lotg(_class_NSMorphologyCustomPronoun, _sel_isSupportedForLanguage_, language.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSMorphologyCustomPronoun, + _sel_isSupportedForLanguage_, language.ref.pointer); } /// requiredKeysForLanguage: static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { - final _ret = _objc_msgSend_juohf7(_class_NSMorphologyCustomPronoun, _sel_requiredKeysForLanguage_, language.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMorphologyCustomPronoun, + _sel_requiredKeysForLanguage_, language.ref.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// subjectForm objc.NSString? get subjectForm { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_subjectForm); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setSubjectForm: - set subjectForm(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSubjectForm_, value?.ref.pointer ?? ffi.nullptr); - + set subjectForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSubjectForm_, + value?.ref.pointer ?? ffi.nullptr); } /// objectForm objc.NSString? get objectForm { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_objectForm); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setObjectForm: - set objectForm(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setObjectForm_, value?.ref.pointer ?? ffi.nullptr); - + set objectForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setObjectForm_, + value?.ref.pointer ?? ffi.nullptr); } /// possessiveForm objc.NSString? get possessiveForm { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_possessiveForm); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPossessiveForm: - set possessiveForm(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPossessiveForm_, value?.ref.pointer ?? ffi.nullptr); - + set possessiveForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPossessiveForm_, + value?.ref.pointer ?? ffi.nullptr); } /// possessiveAdjectiveForm objc.NSString? get possessiveAdjectiveForm { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_possessiveAdjectiveForm); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_ukcdfq(this.ref.pointer, _sel_setPossessiveAdjectiveForm_, value?.ref.pointer ?? ffi.nullptr); - + set possessiveAdjectiveForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setPossessiveAdjectiveForm_, value?.ref.pointer ?? ffi.nullptr); } /// reflexiveForm objc.NSString? get reflexiveForm { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_reflexiveForm); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setReflexiveForm: - set reflexiveForm(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setReflexiveForm_, value?.ref.pointer ?? ffi.nullptr); - + set reflexiveForm(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setReflexiveForm_, + value?.ref.pointer ?? ffi.nullptr); } /// init NSMorphologyCustomPronoun init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } /// new static NSMorphologyCustomPronoun new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMorphologyCustomPronoun, _sel_new); - return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSMorphologyCustomPronoun, _sel_new); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); - return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSMorphologyCustomPronoun alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMorphologyCustomPronoun, _sel_alloc); - return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_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_cqxsqq(_class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSMorphologyCustomPronoun, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSMorphologyCustomPronoun, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSMorphologyCustomPronoun, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMorphologyCustomPronoun, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSMorphologyCustomPronoun, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSMorphologyCustomPronoun, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSMorphologyCustomPronoun, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSMorphologyCustomPronoun, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSMorphologyCustomPronoun self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: true, release: true); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } /// retain NSMorphologyCustomPronoun retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: true, release: true); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSMorphologyCustomPronoun autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSMorphologyCustomPronoun.castFromPointer(_ret, retain: true, release: true); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSMorphologyCustomPronoun, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSMorphologyCustomPronoun, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSMorphologyCustomPronoun? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSMorphologyCustomPronoun.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } } -late final _sel_customPronounForLanguage_ = objc.registerName("customPronounForLanguage:"); -late final _sel_setCustomPronoun_forLanguage_error_ = objc.registerName("setCustomPronoun:forLanguage:error:"); +late final _sel_customPronounForLanguage_ = + objc.registerName("customPronounForLanguage:"); +late final _sel_setCustomPronoun_forLanguage_error_ = + objc.registerName("setCustomPronoun:forLanguage:error:"); late final _sel_isUnspecified = objc.registerName("isUnspecified"); late final _sel_userMorphology = objc.registerName("userMorphology"); /// NSMorphology class NSMorphology extends objc.NSObject { NSMorphology._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSMorphology.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSMorphology); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMorphology); } /// grammaticalGender @@ -12006,9 +18775,9 @@ class NSMorphology extends objc.NSObject { } /// setGrammaticalGender: - set grammaticalGender(NSGrammaticalGender value) { - return _objc_msgSend_12a9bks(this.ref.pointer, _sel_setGrammaticalGender_, value.value); - + set grammaticalGender(NSGrammaticalGender value) { + return _objc_msgSend_12a9bks( + this.ref.pointer, _sel_setGrammaticalGender_, value.value); } /// partOfSpeech @@ -12018,9 +18787,9 @@ class NSMorphology extends objc.NSObject { } /// setPartOfSpeech: - set partOfSpeech(NSGrammaticalPartOfSpeech value) { - return _objc_msgSend_1k6p0ib(this.ref.pointer, _sel_setPartOfSpeech_, value.value); - + set partOfSpeech(NSGrammaticalPartOfSpeech value) { + return _objc_msgSend_1k6p0ib( + this.ref.pointer, _sel_setPartOfSpeech_, value.value); } /// number @@ -12030,9 +18799,8 @@ class NSMorphology extends objc.NSObject { } /// setNumber: - set number(NSGrammaticalNumber value) { + set number(NSGrammaticalNumber value) { return _objc_msgSend_kwz1vc(this.ref.pointer, _sel_setNumber_, value.value); - } /// grammaticalCase @@ -12042,9 +18810,9 @@ class NSMorphology extends objc.NSObject { } /// setGrammaticalCase: - set grammaticalCase(NSGrammaticalCase value) { - return _objc_msgSend_erklvx(this.ref.pointer, _sel_setGrammaticalCase_, value.value); - + set grammaticalCase(NSGrammaticalCase value) { + return _objc_msgSend_erklvx( + this.ref.pointer, _sel_setGrammaticalCase_, value.value); } /// determination @@ -12054,21 +18822,22 @@ class NSMorphology extends objc.NSObject { } /// setDetermination: - set determination(NSGrammaticalDetermination value) { - return _objc_msgSend_ug05wa(this.ref.pointer, _sel_setDetermination_, value.value); - + set determination(NSGrammaticalDetermination value) { + return _objc_msgSend_ug05wa( + this.ref.pointer, _sel_setDetermination_, value.value); } /// grammaticalPerson NSGrammaticalPerson get grammaticalPerson { - final _ret = _objc_msgSend_1ffoin9(this.ref.pointer, _sel_grammaticalPerson); + final _ret = + _objc_msgSend_1ffoin9(this.ref.pointer, _sel_grammaticalPerson); return NSGrammaticalPerson.fromValue(_ret); } /// setGrammaticalPerson: - set grammaticalPerson(NSGrammaticalPerson value) { - return _objc_msgSend_ae3g2g(this.ref.pointer, _sel_setGrammaticalPerson_, value.value); - + set grammaticalPerson(NSGrammaticalPerson value) { + return _objc_msgSend_ae3g2g( + this.ref.pointer, _sel_setGrammaticalPerson_, value.value); } /// pronounType @@ -12078,9 +18847,9 @@ class NSMorphology extends objc.NSObject { } /// setPronounType: - set pronounType(NSGrammaticalPronounType value) { - return _objc_msgSend_1trhr2m(this.ref.pointer, _sel_setPronounType_, value.value); - + set pronounType(NSGrammaticalPronounType value) { + return _objc_msgSend_1trhr2m( + this.ref.pointer, _sel_setPronounType_, value.value); } /// definiteness @@ -12090,38 +18859,48 @@ class NSMorphology extends objc.NSObject { } /// setDefiniteness: - set definiteness(NSGrammaticalDefiniteness value) { - return _objc_msgSend_vbzknq(this.ref.pointer, _sel_setDefiniteness_, value.value); - + set definiteness(NSGrammaticalDefiniteness value) { + return _objc_msgSend_vbzknq( + this.ref.pointer, _sel_setDefiniteness_, value.value); } /// customPronounForLanguage: NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_customPronounForLanguage_, language.ref.pointer); - return _ret.address == 0 ? null : NSMorphologyCustomPronoun.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_customPronounForLanguage_, language.ref.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_6toz8x(this.ref.pointer, _sel_setCustomPronoun_forLanguage_error_, features?.ref.pointer ?? ffi.nullptr, language.ref.pointer, error); - + bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, + objc.NSString language, ffi.Pointer> error) { + return _objc_msgSend_6toz8x( + this.ref.pointer, + _sel_setCustomPronoun_forLanguage_error_, + features?.ref.pointer ?? ffi.nullptr, + language.ref.pointer, + error); } /// isUnspecified bool get unspecified { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isUnspecified); - } /// userMorphology static NSMorphology getUserMorphology() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMorphology, _sel_userMorphology); + final _ret = + _objc_msgSend_1unuoxw(_class_NSMorphology, _sel_userMorphology); return NSMorphology.castFromPointer(_ret, retain: true, release: true); } /// init NSMorphology init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSMorphology.castFromPointer(_ret, retain: false, release: true); } @@ -12133,7 +18912,8 @@ class NSMorphology extends objc.NSObject { /// allocWithZone: static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSMorphology, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSMorphology, _sel_allocWithZone_, zone); return NSMorphology.castFromPointer(_ret, retain: false, release: true); } @@ -12144,56 +18924,70 @@ class NSMorphology extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSMorphology, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSMorphology, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSMorphology, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSMorphology, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSMorphology, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSMorphology, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMorphology, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSMorphology, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSMorphology, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSMorphology, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSMorphology, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMorphology, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMorphology, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMorphology, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -12218,19 +19012,21 @@ _objc_msgSend_1tjlcwl(_class_NSMorphology, _sel_setKeys_triggerChangeNotificatio /// supportsSecureCoding static bool supportsSecureCoding() { return _objc_msgSend_olxnu1(_class_NSMorphology, _sel_supportsSecureCoding); - } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSMorphology? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSMorphology.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMorphology.castFromPointer(_ret, retain: false, release: true); } } @@ -12245,6 +19041,7 @@ late final _sel_isReady = objc.registerName("isReady"); late final _sel_addDependency_ = objc.registerName("addDependency:"); late final _sel_removeDependency_ = objc.registerName("removeDependency:"); late final _sel_dependencies = objc.registerName("dependencies"); + enum NSOperationQueuePriority { NSOperationQueuePriorityVeryLow(-8), NSOperationQueuePriorityLow(-4), @@ -12252,31 +19049,52 @@ enum NSOperationQueuePriority { 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"), - }; - + -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_10n15g8 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_10n15g8 = 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_d8yjnr = objc.msgSendPointer.cast , ffi.Pointer , ffi.Long )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_d8yjnr = 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:"); -final _objc_msgSend_suh039 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Double )>>().asFunction , ffi.Pointer , double )>(); +final _objc_msgSend_suh039 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); + enum NSQualityOfService { NSQualityOfServiceUserInteractive(33), NSQualityOfServiceUserInitiated(25), @@ -12284,112 +19102,116 @@ enum NSQualityOfService { 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"), - }; - + 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_17dnyeh = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setQualityOfService_ = objc.registerName("setQualityOfService:"); -final _objc_msgSend_1fcr8u4 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Long )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_17dnyeh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_1fcr8u4 = 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_setName_ = objc.registerName("setName:"); /// NSOperation class NSOperation extends objc.NSObject { NSOperation._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperation); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperation); } /// start void start() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_start); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_start); } /// main void main() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_main); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_main); } /// isCancelled bool get cancelled { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); - } /// cancel void cancel() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } /// isExecuting bool get executing { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isExecuting); - } /// isFinished bool get finished { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); - } /// isConcurrent bool get concurrent { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isConcurrent); - } /// isAsynchronous bool get asynchronous { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isAsynchronous); - } /// isReady bool get ready { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isReady); - } /// addDependency: void addDependency_(NSOperation op) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addDependency_, op.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addDependency_, op.ref.pointer); } /// removeDependency: void removeDependency_(NSOperation op) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeDependency_, op.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeDependency_, op.ref.pointer); } /// dependencies @@ -12405,39 +19227,41 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeDependency_, op.ref.pointer); } /// setQueuePriority: - set queuePriority(NSOperationQueuePriority value) { - return _objc_msgSend_d8yjnr(this.ref.pointer, _sel_setQueuePriority_, value.value); - + set queuePriority(NSOperationQueuePriority value) { + return _objc_msgSend_d8yjnr( + this.ref.pointer, _sel_setQueuePriority_, value.value); } /// completionBlock objc.ObjCBlock? get completionBlock { final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_completionBlock); - return _ret.address == 0 ? null : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } /// setCompletionBlock: - set completionBlock(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCompletionBlock_, value?.ref.pointer ?? ffi.nullptr); - + set completionBlock(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCompletionBlock_, + value?.ref.pointer ?? ffi.nullptr); } /// waitUntilFinished void waitUntilFinished() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); } /// threadPriority double get threadPriority { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_threadPriority) : _objc_msgSend_10noklm(this.ref.pointer, _sel_threadPriority); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_threadPriority) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_threadPriority); } /// setThreadPriority: - set threadPriority(double value) { - return _objc_msgSend_suh039(this.ref.pointer, _sel_setThreadPriority_, value); - + set threadPriority(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setThreadPriority_, value); } /// qualityOfService @@ -12447,26 +19271,29 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); } /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_1fcr8u4(this.ref.pointer, _sel_setQualityOfService_, value.value); - + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); } /// name objc.NSString? get name { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setName: - set name(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); - + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } /// init NSOperation init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSOperation.castFromPointer(_ret, retain: false, release: true); } @@ -12478,7 +19305,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); /// allocWithZone: static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSOperation, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSOperation, _sel_allocWithZone_, zone); return NSOperation.castFromPointer(_ret, retain: false, release: true); } @@ -12489,56 +19317,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSOperation, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSOperation, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSOperation, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSOperation, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSOperation, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSOperation, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSOperation, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSOperation, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSOperation, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSOperation, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSOperation, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOperation, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSOperation, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -12562,18 +19404,36 @@ _objc_msgSend_1tjlcwl(_class_NSOperation, _sel_setKeys_triggerChangeNotification } late final _sel_addOperation_ = objc.registerName("addOperation:"); -late final _sel_addOperations_waitUntilFinished_ = objc.registerName("addOperations:waitUntilFinished:"); -final _objc_msgSend_1n1qwdd = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Bool )>>().asFunction , ffi.Pointer , ffi.Pointer , bool )>(); -late final _sel_addOperationWithBlock_ = objc.registerName("addOperationWithBlock:"); +late final _sel_addOperations_waitUntilFinished_ = + objc.registerName("addOperations:waitUntilFinished:"); +final _objc_msgSend_1n1qwdd = 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"); -late final _sel_setMaxConcurrentOperationCount_ = objc.registerName("setMaxConcurrentOperationCount:"); +late final _sel_maxConcurrentOperationCount = + objc.registerName("maxConcurrentOperationCount"); +late final _sel_setMaxConcurrentOperationCount_ = + objc.registerName("setMaxConcurrentOperationCount:"); late final _sel_isSuspended = objc.registerName("isSuspended"); late final _sel_setSuspended_ = objc.registerName("setSuspended:"); late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); -late final _sel_waitUntilAllOperationsAreFinished = objc.registerName("waitUntilAllOperationsAreFinished"); +late final _sel_waitUntilAllOperationsAreFinished = + objc.registerName("waitUntilAllOperationsAreFinished"); late final _sel_currentQueue = objc.registerName("currentQueue"); late final _sel_mainQueue = objc.registerName("mainQueue"); late final _sel_operations = objc.registerName("operations"); @@ -12582,22 +19442,22 @@ late final _sel_operationCount = objc.registerName("operationCount"); /// NSOperationQueue class NSOperationQueue extends objc.NSObject { NSOperationQueue._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSOperationQueue.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); } /// progress @@ -12608,62 +19468,61 @@ class NSOperationQueue extends objc.NSObject { /// addOperation: void addOperation_(NSOperation op) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addOperation_, op.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addOperation_, op.ref.pointer); } /// addOperations:waitUntilFinished: void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { -_objc_msgSend_1n1qwdd(this.ref.pointer, _sel_addOperations_waitUntilFinished_, ops.ref.pointer, wait); - + _objc_msgSend_1n1qwdd(this.ref.pointer, + _sel_addOperations_waitUntilFinished_, ops.ref.pointer, wait); } /// addOperationWithBlock: void addOperationWithBlock_(objc.ObjCBlock block) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_addOperationWithBlock_, block.ref.pointer); - + _objc_msgSend_4daxhl( + this.ref.pointer, _sel_addOperationWithBlock_, block.ref.pointer); } /// addBarrierBlock: void addBarrierBlock_(objc.ObjCBlock barrier) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_addBarrierBlock_, barrier.ref.pointer); - + _objc_msgSend_4daxhl( + this.ref.pointer, _sel_addBarrierBlock_, barrier.ref.pointer); } /// maxConcurrentOperationCount int get maxConcurrentOperationCount { - return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_maxConcurrentOperationCount); - + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_maxConcurrentOperationCount); } /// setMaxConcurrentOperationCount: - set maxConcurrentOperationCount(int value) { - return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setMaxConcurrentOperationCount_, value); - + set maxConcurrentOperationCount(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setMaxConcurrentOperationCount_, value); } /// isSuspended bool get suspended { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSuspended); - } /// setSuspended: - set suspended(bool value) { + set suspended(bool value) { return _objc_msgSend_117qins(this.ref.pointer, _sel_setSuspended_, value); - } /// name objc.NSString? get name { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setName: - set name(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); - + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } /// qualityOfService @@ -12673,39 +19532,43 @@ _objc_msgSend_4daxhl(this.ref.pointer, _sel_addBarrierBlock_, barrier.ref.pointe } /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_1fcr8u4(this.ref.pointer, _sel_setQualityOfService_, value.value); - + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); } /// underlyingQueue objc.NSObject? get underlyingQueue { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_underlyingQueue); - return _ret.address == 0 ? null : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } /// setUnderlyingQueue: - set underlyingQueue(objc.NSObject? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setUnderlyingQueue_, value?.ref.pointer ?? ffi.nullptr); - + set underlyingQueue(objc.NSObject? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setUnderlyingQueue_, + value?.ref.pointer ?? ffi.nullptr); } /// cancelAllOperations void cancelAllOperations() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_cancelAllOperations); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancelAllOperations); } /// waitUntilAllOperationsAreFinished void waitUntilAllOperationsAreFinished() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); - + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); } /// currentQueue static NSOperationQueue? getCurrentQueue() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_currentQueue); - return _ret.address == 0 ? null : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_currentQueue); + return _ret.address == 0 + ? null + : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } /// mainQueue @@ -12723,12 +19586,12 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); /// operationCount int get operationCount { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_operationCount); - } /// init NSOperationQueue init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } @@ -12740,7 +19603,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); /// allocWithZone: static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSOperationQueue, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSOperationQueue, _sel_allocWithZone_, zone); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } @@ -12751,56 +19615,71 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSOperationQueue, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSOperationQueue, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSOperationQueue, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSOperationQueue, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSOperationQueue, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSOperationQueue, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSOperationQueue, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSOperationQueue, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSOperationQueue, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSOperationQueue, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOperationQueue, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -12826,34 +19705,38 @@ _objc_msgSend_1tjlcwl(_class_NSOperationQueue, _sel_setKeys_triggerChangeNotific late final _class_NSOrthography = objc.getClass("NSOrthography"); late final _sel_dominantScript = objc.registerName("dominantScript"); late final _sel_languageMap = objc.registerName("languageMap"); -late final _sel_initWithDominantScript_languageMap_ = objc.registerName("initWithDominantScript:languageMap:"); +late final _sel_initWithDominantScript_languageMap_ = + objc.registerName("initWithDominantScript:languageMap:"); late final _sel_languagesForScript_ = objc.registerName("languagesForScript:"); -late final _sel_dominantLanguageForScript_ = objc.registerName("dominantLanguageForScript:"); +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:"); +late final _sel_defaultOrthographyForLanguage_ = + objc.registerName("defaultOrthographyForLanguage:"); +late final _sel_orthographyWithDominantScript_languageMap_ = + objc.registerName("orthographyWithDominantScript:languageMap:"); /// NSOrthography class NSOrthography extends objc.NSObject { NSOrthography._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSOrthography.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSOrthography); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOrthography); } /// dominantScript @@ -12869,27 +19752,41 @@ class NSOrthography extends objc.NSObject { } /// initWithDominantScript:languageMap: - NSOrthography initWithDominantScript_languageMap_(objc.NSString script, objc.NSDictionary map) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithDominantScript_languageMap_, script.ref.pointer, map.ref.pointer); + NSOrthography initWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithDominantScript_languageMap_, + script.ref.pointer, + map.ref.pointer); return NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSOrthography? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSOrthography.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: false, release: true); } /// languagesForScript: objc.NSArray? languagesForScript_(objc.NSString script) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_languagesForScript_, script.ref.pointer); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_languagesForScript_, script.ref.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_juohf7(this.ref.pointer, _sel_dominantLanguageForScript_, script.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dominantLanguageForScript_, script.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// dominantLanguage @@ -12912,19 +19809,26 @@ class NSOrthography extends objc.NSObject { /// defaultOrthographyForLanguage: static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { - final _ret = _objc_msgSend_juohf7(_class_NSOrthography, _sel_defaultOrthographyForLanguage_, language.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSOrthography, + _sel_defaultOrthographyForLanguage_, language.ref.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_iq11qg(_class_NSOrthography, _sel_orthographyWithDominantScript_languageMap_, script.ref.pointer, map.ref.pointer); + static NSOrthography orthographyWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_iq11qg( + _class_NSOrthography, + _sel_orthographyWithDominantScript_languageMap_, + script.ref.pointer, + map.ref.pointer); return NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// init NSOrthography init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSOrthography.castFromPointer(_ret, retain: false, release: true); } @@ -12936,7 +19840,8 @@ class NSOrthography extends objc.NSObject { /// allocWithZone: static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSOrthography, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSOrthography, _sel_allocWithZone_, zone); return NSOrthography.castFromPointer(_ret, retain: false, release: true); } @@ -12947,115 +19852,253 @@ class NSOrthography extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSOrthography, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSOrthography, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSOrthography, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSOrthography, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSOrthography, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSOrthography, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSOrthography, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSOrthography, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSOrthography, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSOrthography, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSOrthography, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOrthography, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOrthography, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSOrthography, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSOrthography, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSOrthography, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } } late final _class_NSPointerArray = objc.getClass("NSPointerArray"); -late final _sel_countByEnumeratingWithState_objects_count_ = objc.registerName("countByEnumeratingWithState:objects:count:"); -final _objc_msgSend_q12f7y = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer> , int )>(); -int _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - block.ref.target.cast arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>>() - .asFunction , ffi.Pointer , ffi.Pointer> , int )>()(arg0, arg1, arg2, arg3); -ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.UnsignedLong )>(_ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrTrampoline , 0).cast(); -int _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - (objc.getBlockClosure(block) as int Function(ffi.Pointer , ffi.Pointer , ffi.Pointer> , int ))(arg0, arg1, arg2, arg3); -ffi.Pointer _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.UnsignedLong )>(_ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureTrampoline , 0).cast(); +late final _sel_countByEnumeratingWithState_objects_count_ = + objc.registerName("countByEnumeratingWithState:objects:count:"); +final _objc_msgSend_q12f7y = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrTrampoline, + 0) + .cast(); +int _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + (objc.getBlockClosure(block) as int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureTrampoline, + 0) + .cast(); /// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. abstract final class ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> ptr) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>(objc.newPointerBlock(_ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> ptr) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + objc.newPointerBlock(_ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> fromFunction(int Function(ffi.Pointer , ffi.Pointer , ffi.Pointer> , int ) fn) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>(objc.newClosureBlock(_ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => fn(arg0, arg1, arg2, arg3)), - retain: false, release: true); + static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> fromFunction(int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, int) fn) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + objc.newClosureBlock( + _ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + fn(arg0, arg1, arg2, arg3)), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. -extension ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_CallExtension on objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> { - int call(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer> , int )>()( - ref.pointer, arg0, arg1, arg2, arg3); +extension ObjCBlock_ffiUnsignedLong_ffiVoid_NSFastEnumerationState_objcObjCObject_ffiUnsignedLong_CallExtension + on objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> { + int call( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>()(ref.pointer, arg0, arg1, arg2, arg3); } enum NSPointerFunctionsOptions { @@ -13072,434 +20115,821 @@ enum NSPointerFunctionsOptions { NSPointerFunctionsIntegerPersonality(1280), NSPointerFunctionsCopyIn(65536); - static const NSPointerFunctionsObjectPersonality = NSPointerFunctionsStrongMemory; + 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"), - }; + 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"; + if (this == NSPointerFunctionsStrongMemory) + return "NSPointerFunctionsOptions.NSPointerFunctionsStrongMemory, NSPointerFunctionsOptions.NSPointerFunctionsObjectPersonality"; return super.toString(); - }} + } +} late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); -final _objc_msgSend_146ksfy = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_146ksfy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); -late final _sel_pointerFunctionsWithOptions_ = objc.registerName("pointerFunctionsWithOptions:"); +late final _sel_pointerFunctionsWithOptions_ = + objc.registerName("pointerFunctionsWithOptions:"); late final _sel_hashFunction = objc.registerName("hashFunction"); -final _objc_msgSend_1sotwf1 = objc.msgSendPointer.cast , ffi.Pointer )>> )>> Function(ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer )>> )>> Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1sotwf1 = 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_1oonnyk = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> )>(); +final _objc_msgSend_1oonnyk = 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_1xqafxe = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>> )>> Function(ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>> )>> Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1xqafxe = 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_1i3z8j1 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> )>(); +final _objc_msgSend_1i3z8j1 = 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_1u1e56c = objc.msgSendPointer.cast )>> Function(ffi.Pointer , ffi.Pointer )>>().asFunction )>> Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1u1e56c = 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_10z8lan = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>> )>>().asFunction , ffi.Pointer , ffi.Pointer )>> )>(); +final _objc_msgSend_10z8lan = 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_1y69tkw = objc.msgSendPointer.cast Function(ffi.Pointer )>> Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer )>> Function(ffi.Pointer , ffi.Pointer )>(); -late final _sel_setDescriptionFunction_ = objc.registerName("setDescriptionFunction:"); -final _objc_msgSend_1a23vur = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer Function(ffi.Pointer )>> )>>().asFunction , ffi.Pointer , ffi.Pointer Function(ffi.Pointer )>> )>(); +final _objc_msgSend_1y69tkw = 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_1a23vur = 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_15kilzc = objc.msgSendPointer.cast , ffi.Pointer )>> )>> Function(ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer )>> )>> Function(ffi.Pointer , ffi.Pointer )>(); -late final _sel_setRelinquishFunction_ = objc.registerName("setRelinquishFunction:"); -final _objc_msgSend_18u5cwv = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> )>(); +final _objc_msgSend_15kilzc = 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_18u5cwv = 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_y49dq4 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>> , ffi.Bool )>> Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>> , ffi.Bool )>> Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_y49dq4 = 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_nyyll3 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>> , ffi.Bool )>> )>>().asFunction , ffi.Pointer , ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>> , 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:"); +final _objc_msgSend_nyyll3 = 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:"); /// NSPointerFunctions class NSPointerFunctions extends objc.NSObject { NSPointerFunctions._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSPointerFunctions.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); } /// initWithOptions: NSPointerFunctions initWithOptions_(NSPointerFunctionsOptions options) { - final _ret = _objc_msgSend_146ksfy(this.ref.retainAndReturnPointer(), _sel_initWithOptions_, options.value); - return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_146ksfy(this.ref.retainAndReturnPointer(), + _sel_initWithOptions_, options.value); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } /// pointerFunctionsWithOptions: - static NSPointerFunctions pointerFunctionsWithOptions_(NSPointerFunctionsOptions options) { - final _ret = _objc_msgSend_146ksfy(_class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options.value); - return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); + static NSPointerFunctions pointerFunctionsWithOptions_( + NSPointerFunctionsOptions options) { + final _ret = _objc_msgSend_146ksfy(_class_NSPointerFunctions, + _sel_pointerFunctionsWithOptions_, options.value); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } /// hashFunction - ffi.Pointer , ffi.Pointer )>> )>> get hashFunction { + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get hashFunction { return _objc_msgSend_1sotwf1(this.ref.pointer, _sel_hashFunction); - } /// setHashFunction: - set hashFunction(ffi.Pointer , ffi.Pointer )>> )>> value) { - return _objc_msgSend_1oonnyk(this.ref.pointer, _sel_setHashFunction_, value); - + set hashFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_1oonnyk( + this.ref.pointer, _sel_setHashFunction_, value); } /// isEqualFunction - ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> get 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_1xqafxe(this.ref.pointer, _sel_isEqualFunction); - } /// setIsEqualFunction: - set isEqualFunction(ffi.Pointer , ffi.Pointer , ffi.Pointer )>> )>> value) { - return _objc_msgSend_1i3z8j1(this.ref.pointer, _sel_setIsEqualFunction_, value); - + 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_1i3z8j1( + this.ref.pointer, _sel_setIsEqualFunction_, value); } /// sizeFunction - ffi.Pointer )>> get sizeFunction { + ffi.Pointer< + ffi.NativeFunction)>> + get sizeFunction { return _objc_msgSend_1u1e56c(this.ref.pointer, _sel_sizeFunction); - } /// setSizeFunction: - set sizeFunction(ffi.Pointer )>> value) { - return _objc_msgSend_10z8lan(this.ref.pointer, _sel_setSizeFunction_, value); - + set sizeFunction( + ffi.Pointer< + ffi + .NativeFunction)>> + value) { + return _objc_msgSend_10z8lan( + this.ref.pointer, _sel_setSizeFunction_, value); } /// descriptionFunction - ffi.Pointer Function(ffi.Pointer )>> get descriptionFunction { + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + get descriptionFunction { return _objc_msgSend_1y69tkw(this.ref.pointer, _sel_descriptionFunction); - } /// setDescriptionFunction: - set descriptionFunction(ffi.Pointer Function(ffi.Pointer )>> value) { - return _objc_msgSend_1a23vur(this.ref.pointer, _sel_setDescriptionFunction_, value); - + set descriptionFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value) { + return _objc_msgSend_1a23vur( + this.ref.pointer, _sel_setDescriptionFunction_, value); } /// relinquishFunction - ffi.Pointer , ffi.Pointer )>> )>> get relinquishFunction { + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get relinquishFunction { return _objc_msgSend_15kilzc(this.ref.pointer, _sel_relinquishFunction); - } /// setRelinquishFunction: - set relinquishFunction(ffi.Pointer , ffi.Pointer )>> )>> value) { - return _objc_msgSend_18u5cwv(this.ref.pointer, _sel_setRelinquishFunction_, value); - + set relinquishFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_18u5cwv( + this.ref.pointer, _sel_setRelinquishFunction_, value); } /// acquireFunction - ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>> , ffi.Bool )>> get 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_y49dq4(this.ref.pointer, _sel_acquireFunction); - } /// setAcquireFunction: - set acquireFunction(ffi.Pointer Function(ffi.Pointer , ffi.Pointer )>> , ffi.Bool )>> value) { - return _objc_msgSend_nyyll3(this.ref.pointer, _sel_setAcquireFunction_, value); - + 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_nyyll3( + this.ref.pointer, _sel_setAcquireFunction_, value); } /// usesStrongWriteBarrier bool get usesStrongWriteBarrier { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_usesStrongWriteBarrier); - } /// setUsesStrongWriteBarrier: - set usesStrongWriteBarrier(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setUsesStrongWriteBarrier_, value); - + set usesStrongWriteBarrier(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesStrongWriteBarrier_, value); } /// usesWeakReadAndWriteBarriers bool get usesWeakReadAndWriteBarriers { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_usesWeakReadAndWriteBarriers); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_usesWeakReadAndWriteBarriers); } /// setUsesWeakReadAndWriteBarriers: - set usesWeakReadAndWriteBarriers(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); - + set usesWeakReadAndWriteBarriers(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); } /// init NSPointerFunctions init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } /// new static NSPointerFunctions new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSPointerFunctions, _sel_new); - return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSPointerFunctions, _sel_allocWithZone_, zone); - return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSPointerFunctions, _sel_allocWithZone_, zone); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSPointerFunctions alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSPointerFunctions, _sel_alloc); - return NSPointerFunctions.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSPointerFunctions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSPointerFunctions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSPointerFunctions, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSPointerFunctions, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSPointerFunctions, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSPointerFunctions, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSPointerFunctions, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSPointerFunctions, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSPointerFunctions, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSPointerFunctions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerFunctions, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSPointerFunctions self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } /// retain NSPointerFunctions retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSPointerFunctions autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } } -late final _sel_initWithPointerFunctions_ = objc.registerName("initWithPointerFunctions:"); -late final _sel_pointerArrayWithOptions_ = objc.registerName("pointerArrayWithOptions:"); -late final _sel_pointerArrayWithPointerFunctions_ = objc.registerName("pointerArrayWithPointerFunctions:"); +late final _sel_initWithPointerFunctions_ = + objc.registerName("initWithPointerFunctions:"); +late final _sel_pointerArrayWithOptions_ = + objc.registerName("pointerArrayWithOptions:"); +late final _sel_pointerArrayWithPointerFunctions_ = + objc.registerName("pointerArrayWithPointerFunctions:"); late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); -final _objc_msgSend_hwxa7r = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); +final _objc_msgSend_hwxa7r = 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_hepzs = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -late final _sel_removePointerAtIndex_ = objc.registerName("removePointerAtIndex:"); -late final _sel_insertPointer_atIndex_ = objc.registerName("insertPointer:atIndex:"); -final _objc_msgSend_vzqe8w = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_replacePointerAtIndex_withPointer_ = objc.registerName("replacePointerAtIndex:withPointer:"); -final _objc_msgSend_19y6iy4 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , int , ffi.Pointer )>(); +final _objc_msgSend_hepzs = 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:"); +late final _sel_insertPointer_atIndex_ = + objc.registerName("insertPointer:atIndex:"); +final _objc_msgSend_vzqe8w = 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_19y6iy4 = 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_pointerArrayWithStrongObjects = objc.registerName("pointerArrayWithStrongObjects"); -late final _sel_pointerArrayWithWeakObjects = objc.registerName("pointerArrayWithWeakObjects"); -late final _sel_strongObjectsPointerArray = objc.registerName("strongObjectsPointerArray"); -late final _sel_weakObjectsPointerArray = objc.registerName("weakObjectsPointerArray"); +late final _sel_pointerArrayWithStrongObjects = + objc.registerName("pointerArrayWithStrongObjects"); +late final _sel_pointerArrayWithWeakObjects = + objc.registerName("pointerArrayWithWeakObjects"); +late final _sel_strongObjectsPointerArray = + objc.registerName("strongObjectsPointerArray"); +late final _sel_weakObjectsPointerArray = + objc.registerName("weakObjectsPointerArray"); late final _sel_allObjects = objc.registerName("allObjects"); /// NSPointerArray class NSPointerArray extends objc.NSObject { NSPointerArray._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSPointerArray.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSPointerArray); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPointerArray); } /// initWithOptions: NSPointerArray initWithOptions_(NSPointerFunctionsOptions options) { - final _ret = _objc_msgSend_146ksfy(this.ref.retainAndReturnPointer(), _sel_initWithOptions_, options.value); + final _ret = _objc_msgSend_146ksfy(this.ref.retainAndReturnPointer(), + _sel_initWithOptions_, options.value); return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// initWithPointerFunctions: NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithPointerFunctions_, functions.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithPointerFunctions_, functions.ref.pointer); return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } /// pointerArrayWithOptions: - static NSPointerArray pointerArrayWithOptions_(NSPointerFunctionsOptions options) { - final _ret = _objc_msgSend_146ksfy(_class_NSPointerArray, _sel_pointerArrayWithOptions_, options.value); + static NSPointerArray pointerArrayWithOptions_( + NSPointerFunctionsOptions options) { + final _ret = _objc_msgSend_146ksfy( + _class_NSPointerArray, _sel_pointerArrayWithOptions_, options.value); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// pointerArrayWithPointerFunctions: - static NSPointerArray pointerArrayWithPointerFunctions_(NSPointerFunctions functions) { - final _ret = _objc_msgSend_juohf7(_class_NSPointerArray, _sel_pointerArrayWithPointerFunctions_, functions.ref.pointer); + static NSPointerArray pointerArrayWithPointerFunctions_( + NSPointerFunctions functions) { + final _ret = _objc_msgSend_juohf7(_class_NSPointerArray, + _sel_pointerArrayWithPointerFunctions_, functions.ref.pointer); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// pointerFunctions NSPointerFunctions get pointerFunctions { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_pointerFunctions); - return NSPointerFunctions.castFromPointer(_ret, retain: true, release: true); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } /// pointerAtIndex: ffi.Pointer pointerAtIndex_(int index) { return _objc_msgSend_hwxa7r(this.ref.pointer, _sel_pointerAtIndex_, index); - } /// addPointer: void addPointer_(ffi.Pointer pointer) { -_objc_msgSend_hepzs(this.ref.pointer, _sel_addPointer_, pointer); - + _objc_msgSend_hepzs(this.ref.pointer, _sel_addPointer_, pointer); } /// removePointerAtIndex: void removePointerAtIndex_(int index) { -_objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removePointerAtIndex_, index); - + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removePointerAtIndex_, index); } /// insertPointer:atIndex: void insertPointer_atIndex_(ffi.Pointer item, int index) { -_objc_msgSend_vzqe8w(this.ref.pointer, _sel_insertPointer_atIndex_, item, index); - + _objc_msgSend_vzqe8w( + this.ref.pointer, _sel_insertPointer_atIndex_, item, index); } /// replacePointerAtIndex:withPointer: - void replacePointerAtIndex_withPointer_(int index, ffi.Pointer item) { -_objc_msgSend_19y6iy4(this.ref.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); - + void replacePointerAtIndex_withPointer_( + int index, ffi.Pointer item) { + _objc_msgSend_19y6iy4( + this.ref.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); } /// compact void compact() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_compact); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_compact); } /// count int get count { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_count); - } /// setCount: - set count(int value) { + set count(int value) { return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setCount_, value); - } /// pointerArrayWithStrongObjects static objc.ObjCObjectBase pointerArrayWithStrongObjects() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_pointerArrayWithStrongObjects); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// pointerArrayWithWeakObjects static objc.ObjCObjectBase pointerArrayWithWeakObjects() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_pointerArrayWithWeakObjects); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// strongObjectsPointerArray static NSPointerArray strongObjectsPointerArray() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_strongObjectsPointerArray); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_strongObjectsPointerArray); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } /// weakObjectsPointerArray static NSPointerArray weakObjectsPointerArray() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_weakObjectsPointerArray); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_weakObjectsPointerArray); return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } @@ -13511,7 +20941,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_compact); /// init NSPointerArray init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } @@ -13523,7 +20954,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_compact); /// allocWithZone: static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSPointerArray, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSPointerArray, _sel_allocWithZone_, zone); return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } @@ -13534,56 +20966,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_compact); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSPointerArray, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSPointerArray, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSPointerArray, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSPointerArray, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSPointerArray, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSPointerArray, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSPointerArray, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSPointerArray, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSPointerArray, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSPointerArray, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPointerArray, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPointerArray, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -13606,27 +21052,33 @@ _objc_msgSend_1tjlcwl(_class_NSPointerArray, _sel_setKeys_triggerChangeNotificat } /// countByEnumeratingWithState:objects:count: - int countByEnumeratingWithState_objects_count_(ffi.Pointer state, ffi.Pointer> buffer, int len) { - return _objc_msgSend_q12f7y(this.ref.pointer, _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); - + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _objc_msgSend_q12f7y(this.ref.pointer, + _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSPointerArray, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSPointerArray, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSPointerArray? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSPointerArray.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSPointerArray.castFromPointer(_ret, retain: false, release: true); } } @@ -13634,20 +21086,62 @@ late final _class_NSPort = objc.getClass("NSPort"); late final _sel_port = objc.registerName("port"); late final _sel_invalidate = objc.registerName("invalidate"); late final _sel_isValid = objc.registerName("isValid"); -late final _sel_scheduleInRunLoop_forMode_ = objc.registerName("scheduleInRunLoop:forMode:"); -late final _sel_removeFromRunLoop_forMode_ = objc.registerName("removeFromRunLoop:forMode:"); +late final _sel_scheduleInRunLoop_forMode_ = + objc.registerName("scheduleInRunLoop:forMode:"); +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_1k87i90 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , 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_1sldtak = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer , int )>(); +late final _sel_sendBeforeDate_components_from_reserved_ = + objc.registerName("sendBeforeDate:components:from:reserved:"); +final _objc_msgSend_1k87i90 = 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_1sldtak = 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 _class_NSConnection = objc.getClass("NSConnection"); late final _sel_statistics = objc.registerName("statistics"); late final _sel_allConnections = objc.registerName("allConnections"); late final _sel_defaultConnection = objc.registerName("defaultConnection"); -late final _sel_connectionWithRegisteredName_host_ = objc.registerName("connectionWithRegisteredName:host:"); +late final _sel_connectionWithRegisteredName_host_ = + objc.registerName("connectionWithRegisteredName:host:"); late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); -late final _sel_systemDefaultPortNameServer = objc.registerName("systemDefaultPortNameServer"); +late final _sel_systemDefaultPortNameServer = + objc.registerName("systemDefaultPortNameServer"); late final _sel_portForName_ = objc.registerName("portForName:"); late final _sel_portForName_host_ = objc.registerName("portForName:host:"); late final _sel_registerPort_name_ = objc.registerName("registerPort:name:"); @@ -13656,57 +21150,65 @@ late final _sel_removePortForName_ = objc.registerName("removePortForName:"); /// NSPortNameServer class NSPortNameServer extends objc.NSObject { NSPortNameServer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSPortNameServer] that points to the same underlying object as [other]. - NSPortNameServer.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSPortNameServer.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSPortNameServer] that wraps the given raw object pointer. NSPortNameServer.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSPortNameServer]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSPortNameServer); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPortNameServer); } /// systemDefaultPortNameServer static NSPortNameServer systemDefaultPortNameServer() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPortNameServer, _sel_systemDefaultPortNameServer); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPortNameServer, _sel_systemDefaultPortNameServer); return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } /// portForName: NSPort? portForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_portForName_, name.ref.pointer); - return _ret.address == 0 ? null : NSPort.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_portForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } /// portForName:host: NSPort? portForName_host_(objc.NSString name, objc.NSString? host) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_portForName_host_, name.ref.pointer, host?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSPort.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_portForName_host_, + name.ref.pointer, host?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } /// registerPort:name: bool registerPort_name_(NSPort port, objc.NSString name) { - return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_registerPort_name_, port.ref.pointer, name.ref.pointer); - + return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_registerPort_name_, + port.ref.pointer, name.ref.pointer); } /// removePortForName: bool removePortForName_(objc.NSString name) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_removePortForName_, name.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_removePortForName_, name.ref.pointer); } /// init NSPortNameServer init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } @@ -13718,7 +21220,8 @@ class NSPortNameServer extends objc.NSObject { /// allocWithZone: static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSPortNameServer, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSPortNameServer, _sel_allocWithZone_, zone); return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } @@ -13729,129 +21232,178 @@ class NSPortNameServer extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSPortNameServer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSPortNameServer, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSPortNameServer, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSPortNameServer, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSPortNameServer, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSPortNameServer, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSPortNameServer, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSPortNameServer, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSPortNameServer, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSPortNameServer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPortNameServer, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } -late final _sel_connectionWithRegisteredName_host_usingNameServer_ = objc.registerName("connectionWithRegisteredName:host:usingNameServer:"); +late final _sel_connectionWithRegisteredName_host_usingNameServer_ = + objc.registerName("connectionWithRegisteredName:host:usingNameServer:"); late final _class_NSDistantObject = objc.getClass("NSDistantObject"); -late final _sel_proxyWithTarget_connection_ = objc.registerName("proxyWithTarget:connection:"); -late final _sel_initWithTarget_connection_ = objc.registerName("initWithTarget:connection:"); -late final _sel_proxyWithLocal_connection_ = objc.registerName("proxyWithLocal:connection:"); -late final _sel_initWithLocal_connection_ = objc.registerName("initWithLocal:connection:"); -late final _sel_setProtocolForProxy_ = objc.registerName("setProtocolForProxy:"); +late final _sel_proxyWithTarget_connection_ = + objc.registerName("proxyWithTarget:connection:"); +late final _sel_initWithTarget_connection_ = + objc.registerName("initWithTarget:connection:"); +late final _sel_proxyWithLocal_connection_ = + objc.registerName("proxyWithLocal:connection:"); +late final _sel_initWithLocal_connection_ = + objc.registerName("initWithLocal:connection:"); +late final _sel_setProtocolForProxy_ = + objc.registerName("setProtocolForProxy:"); late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); /// NSDistantObject class NSDistantObject extends objc.NSProxy { NSDistantObject._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSDistantObject] that points to the same underlying object as [other]. - NSDistantObject.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSDistantObject.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSDistantObject] that wraps the given raw object pointer. NSDistantObject.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSDistantObject]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSDistantObject); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDistantObject); } /// proxyWithTarget:connection: - static objc.ObjCObjectBase? proxyWithTarget_connection_(objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_iq11qg(_class_NSDistantObject, _sel_proxyWithTarget_connection_, target.ref.pointer, connection.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + static objc.ObjCObjectBase? proxyWithTarget_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + _class_NSDistantObject, + _sel_proxyWithTarget_connection_, + target.ref.pointer, + connection.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// initWithTarget:connection: - NSDistantObject? initWithTarget_connection_(objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithTarget_connection_, target.ref.pointer, connection.ref.pointer); - return _ret.address == 0 ? null : NSDistantObject.castFromPointer(_ret, retain: false, release: true); + NSDistantObject? initWithTarget_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithTarget_connection_, + target.ref.pointer, + connection.ref.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: false, release: true); } /// proxyWithLocal:connection: - static objc.ObjCObjectBase proxyWithLocal_connection_(objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_iq11qg(_class_NSDistantObject, _sel_proxyWithLocal_connection_, target.ref.pointer, connection.ref.pointer); + static objc.ObjCObjectBase proxyWithLocal_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + _class_NSDistantObject, + _sel_proxyWithLocal_connection_, + target.ref.pointer, + connection.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// initWithLocal:connection: - NSDistantObject initWithLocal_connection_(objc.ObjCObjectBase target, NSConnection connection) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithLocal_connection_, target.ref.pointer, connection.ref.pointer); + NSDistantObject initWithLocal_connection_( + objc.ObjCObjectBase target, NSConnection connection) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithLocal_connection_, + target.ref.pointer, + connection.ref.pointer); return NSDistantObject.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSDistantObject? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSDistantObject.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: false, release: true); } /// setProtocolForProxy: void setProtocolForProxy_(objc.Protocol? proto) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolForProxy_, proto?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolForProxy_, + proto?.ref.pointer ?? ffi.nullptr); } /// connectionForProxy NSConnection get connectionForProxy { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionForProxy); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionForProxy); return NSConnection.castFromPointer(_ret, retain: true, release: true); } @@ -13881,62 +21433,75 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolForProxy_, proto?.ref.poi /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } } -late final _sel_rootProxyForConnectionWithRegisteredName_host_ = objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); -late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = objc.registerName("rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); -late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); -late final _sel_serviceConnectionWithName_rootObject_ = objc.registerName("serviceConnectionWithName:rootObject:"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_ = + objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = + objc.registerName( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); +late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = + objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); +late final _sel_serviceConnectionWithName_rootObject_ = + objc.registerName("serviceConnectionWithName:rootObject:"); late final _sel_requestTimeout = objc.registerName("requestTimeout"); late final _sel_setRequestTimeout_ = objc.registerName("setRequestTimeout:"); late final _sel_replyTimeout = objc.registerName("replyTimeout"); late final _sel_setReplyTimeout_ = objc.registerName("setReplyTimeout:"); late final _sel_rootObject = objc.registerName("rootObject"); late final _sel_setRootObject_ = objc.registerName("setRootObject:"); -late final _sel_independentConversationQueueing = objc.registerName("independentConversationQueueing"); -late final _sel_setIndependentConversationQueueing_ = objc.registerName("setIndependentConversationQueueing:"); +late final _sel_independentConversationQueueing = + objc.registerName("independentConversationQueueing"); +late final _sel_setIndependentConversationQueueing_ = + objc.registerName("setIndependentConversationQueueing:"); late final _sel_rootProxy = objc.registerName("rootProxy"); late final _sel_addRequestMode_ = objc.registerName("addRequestMode:"); late final _sel_removeRequestMode_ = objc.registerName("removeRequestMode:"); late final _sel_requestModes = objc.registerName("requestModes"); late final _sel_registerName_ = objc.registerName("registerName:"); -late final _sel_registerName_withNameServer_ = objc.registerName("registerName:withNameServer:"); -late final _sel_connectionWithReceivePort_sendPort_ = objc.registerName("connectionWithReceivePort:sendPort:"); +late final _sel_registerName_withNameServer_ = + objc.registerName("registerName:withNameServer:"); +late final _sel_connectionWithReceivePort_sendPort_ = + objc.registerName("connectionWithReceivePort:sendPort:"); late final _sel_currentConversation = objc.registerName("currentConversation"); -late final _sel_initWithReceivePort_sendPort_ = objc.registerName("initWithReceivePort:sendPort:"); +late final _sel_initWithReceivePort_sendPort_ = + objc.registerName("initWithReceivePort:sendPort:"); late final _sel_sendPort = objc.registerName("sendPort"); late final _sel_receivePort = objc.registerName("receivePort"); -late final _sel_enableMultipleThreads = objc.registerName("enableMultipleThreads"); -late final _sel_multipleThreadsEnabled = objc.registerName("multipleThreadsEnabled"); +late final _sel_enableMultipleThreads = + objc.registerName("enableMultipleThreads"); +late final _sel_multipleThreadsEnabled = + objc.registerName("multipleThreadsEnabled"); late final _sel_addRunLoop_ = objc.registerName("addRunLoop:"); late final _sel_removeRunLoop_ = objc.registerName("removeRunLoop:"); late final _sel_runInNewThread = objc.registerName("runInNewThread"); late final _sel_remoteObjects = objc.registerName("remoteObjects"); late final _sel_localObjects = objc.registerName("localObjects"); -late final _sel_dispatchWithComponents_ = objc.registerName("dispatchWithComponents:"); +late final _sel_dispatchWithComponents_ = + objc.registerName("dispatchWithComponents:"); /// NSConnection class NSConnection extends objc.NSObject { NSConnection._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSConnection] that points to the same underlying object as [other]. - NSConnection.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSConnection] that wraps the given raw object pointer. NSConnection.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSConnection]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSConnection); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSConnection); } /// statistics @@ -13947,116 +21512,170 @@ class NSConnection extends objc.NSObject { /// allConnections static objc.NSArray allConnections() { - final _ret = _objc_msgSend_1unuoxw(_class_NSConnection, _sel_allConnections); + final _ret = + _objc_msgSend_1unuoxw(_class_NSConnection, _sel_allConnections); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// defaultConnection static NSConnection defaultConnection() { - final _ret = _objc_msgSend_1unuoxw(_class_NSConnection, _sel_defaultConnection); + final _ret = + _objc_msgSend_1unuoxw(_class_NSConnection, _sel_defaultConnection); return NSConnection.castFromPointer(_ret, retain: true, release: true); } /// connectionWithRegisteredName:host: - static NSConnection? connectionWithRegisteredName_host_(objc.NSString name, objc.NSString? hostName) { - final _ret = _objc_msgSend_iq11qg(_class_NSConnection, _sel_connectionWithRegisteredName_host_, name.ref.pointer, hostName?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSConnection.castFromPointer(_ret, retain: true, release: true); + static NSConnection? connectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } /// connectionWithRegisteredName:host:usingNameServer: - static NSConnection? connectionWithRegisteredName_host_usingNameServer_(objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { - final _ret = _objc_msgSend_aud7dn(_class_NSConnection, _sel_connectionWithRegisteredName_host_usingNameServer_, name.ref.pointer, hostName?.ref.pointer ?? ffi.nullptr, server.ref.pointer); - return _ret.address == 0 ? null : NSConnection.castFromPointer(_ret, retain: true, release: true); + static NSConnection? connectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { + final _ret = _objc_msgSend_aud7dn( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_usingNameServer_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr, + server.ref.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } /// rootProxyForConnectionWithRegisteredName:host: - static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_(objc.NSString name, objc.NSString? hostName) { - final _ret = _objc_msgSend_iq11qg(_class_NSConnection, _sel_rootProxyForConnectionWithRegisteredName_host_, name.ref.pointer, hostName?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSDistantObject.castFromPointer(_ret, retain: true, release: true); + static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } /// rootProxyForConnectionWithRegisteredName:host:usingNameServer: - static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_usingNameServer_(objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { - final _ret = _objc_msgSend_aud7dn(_class_NSConnection, _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, name.ref.pointer, hostName?.ref.pointer ?? ffi.nullptr, server.ref.pointer); - return _ret.address == 0 ? null : NSDistantObject.castFromPointer(_ret, retain: true, release: true); + static NSDistantObject? + rootProxyForConnectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, + objc.NSString? hostName, + NSPortNameServer server) { + final _ret = _objc_msgSend_aud7dn( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, + name.ref.pointer, + hostName?.ref.pointer ?? ffi.nullptr, + server.ref.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } /// serviceConnectionWithName:rootObject:usingNameServer: - static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_(objc.NSString name, objc.ObjCObjectBase root, NSPortNameServer server) { - final _ret = _objc_msgSend_aud7dn(_class_NSConnection, _sel_serviceConnectionWithName_rootObject_usingNameServer_, name.ref.pointer, root.ref.pointer, server.ref.pointer); - return _ret.address == 0 ? null : NSConnection.castFromPointer(_ret, retain: true, release: true); + static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( + objc.NSString name, objc.ObjCObjectBase root, NSPortNameServer server) { + final _ret = _objc_msgSend_aud7dn( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_usingNameServer_, + name.ref.pointer, + root.ref.pointer, + server.ref.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } /// serviceConnectionWithName:rootObject: - static NSConnection? serviceConnectionWithName_rootObject_(objc.NSString name, objc.ObjCObjectBase root) { - final _ret = _objc_msgSend_iq11qg(_class_NSConnection, _sel_serviceConnectionWithName_rootObject_, name.ref.pointer, root.ref.pointer); - return _ret.address == 0 ? null : NSConnection.castFromPointer(_ret, retain: true, release: true); + static NSConnection? serviceConnectionWithName_rootObject_( + objc.NSString name, objc.ObjCObjectBase root) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_, + name.ref.pointer, + root.ref.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } /// requestTimeout double get requestTimeout { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_requestTimeout) : _objc_msgSend_10noklm(this.ref.pointer, _sel_requestTimeout); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_requestTimeout) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_requestTimeout); } /// setRequestTimeout: - set requestTimeout(double value) { - return _objc_msgSend_suh039(this.ref.pointer, _sel_setRequestTimeout_, value); - + set requestTimeout(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setRequestTimeout_, value); } /// replyTimeout double get replyTimeout { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_replyTimeout) : _objc_msgSend_10noklm(this.ref.pointer, _sel_replyTimeout); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_replyTimeout) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_replyTimeout); } /// setReplyTimeout: - set replyTimeout(double value) { + set replyTimeout(double value) { return _objc_msgSend_suh039(this.ref.pointer, _sel_setReplyTimeout_, value); - } /// rootObject objc.ObjCObjectBase? get rootObject { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_rootObject); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setRootObject: - set rootObject(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setRootObject_, value?.ref.pointer ?? ffi.nullptr); - + set rootObject(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setRootObject_, + value?.ref.pointer ?? ffi.nullptr); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); - + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } /// independentConversationQueueing bool get independentConversationQueueing { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_independentConversationQueueing); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_independentConversationQueueing); } /// setIndependentConversationQueueing: - set independentConversationQueueing(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setIndependentConversationQueueing_, value); - + set independentConversationQueueing(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setIndependentConversationQueueing_, value); } /// isValid bool get valid { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValid); - } /// rootProxy @@ -14067,20 +21686,19 @@ class NSConnection extends objc.NSObject { /// invalidate void invalidate() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); } /// addRequestMode: void addRequestMode_(objc.NSString rmode) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addRequestMode_, rmode.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addRequestMode_, rmode.ref.pointer); } /// removeRequestMode: void removeRequestMode_(objc.NSString rmode) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeRequestMode_, rmode.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeRequestMode_, rmode.ref.pointer); } /// requestModes @@ -14091,32 +21709,53 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeRequestMode_, rmode.ref.pointe /// registerName: bool registerName_(objc.NSString? name) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_registerName_, name?.ref.pointer ?? ffi.nullptr); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_registerName_, name?.ref.pointer ?? ffi.nullptr); } /// registerName:withNameServer: - bool registerName_withNameServer_(objc.NSString? name, NSPortNameServer server) { - return _objc_msgSend_1ywe6ev(this.ref.pointer, _sel_registerName_withNameServer_, name?.ref.pointer ?? ffi.nullptr, server.ref.pointer); - + bool registerName_withNameServer_( + objc.NSString? name, NSPortNameServer server) { + return _objc_msgSend_1ywe6ev( + this.ref.pointer, + _sel_registerName_withNameServer_, + name?.ref.pointer ?? ffi.nullptr, + server.ref.pointer); } /// connectionWithReceivePort:sendPort: - static NSConnection? connectionWithReceivePort_sendPort_(NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_iq11qg(_class_NSConnection, _sel_connectionWithReceivePort_sendPort_, receivePort?.ref.pointer ?? ffi.nullptr, sendPort?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSConnection.castFromPointer(_ret, retain: true, release: true); + static NSConnection? connectionWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_iq11qg( + _class_NSConnection, + _sel_connectionWithReceivePort_sendPort_, + receivePort?.ref.pointer ?? ffi.nullptr, + sendPort?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } /// currentConversation static objc.ObjCObjectBase? currentConversation() { - final _ret = _objc_msgSend_1unuoxw(_class_NSConnection, _sel_currentConversation); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSConnection, _sel_currentConversation); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// initWithReceivePort:sendPort: - NSConnection? initWithReceivePort_sendPort_(NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithReceivePort_sendPort_, receivePort?.ref.pointer ?? ffi.nullptr, sendPort?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSConnection.castFromPointer(_ret, retain: false, release: true); + NSConnection? initWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithReceivePort_sendPort_, + receivePort?.ref.pointer ?? ffi.nullptr, + sendPort?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: false, release: true); } /// sendPort @@ -14133,32 +21772,29 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeRequestMode_, rmode.ref.pointe /// enableMultipleThreads void enableMultipleThreads() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_enableMultipleThreads); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_enableMultipleThreads); } /// multipleThreadsEnabled bool get multipleThreadsEnabled { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_multipleThreadsEnabled); - } /// addRunLoop: void addRunLoop_(objc.NSRunLoop runloop) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addRunLoop_, runloop.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addRunLoop_, runloop.ref.pointer); } /// removeRunLoop: void removeRunLoop_(objc.NSRunLoop runloop) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeRunLoop_, runloop.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeRunLoop_, runloop.ref.pointer); } /// runInNewThread void runInNewThread() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_runInNewThread); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_runInNewThread); } /// remoteObjects @@ -14175,13 +21811,14 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_runInNewThread); /// dispatchWithComponents: void dispatchWithComponents_(objc.NSArray components) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_dispatchWithComponents_, components.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_dispatchWithComponents_, components.ref.pointer); } /// init NSConnection init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSConnection.castFromPointer(_ret, retain: false, release: true); } @@ -14193,7 +21830,8 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_dispatchWithComponents_, components. /// allocWithZone: static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSConnection, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSConnection, _sel_allocWithZone_, zone); return NSConnection.castFromPointer(_ret, retain: false, release: true); } @@ -14204,82 +21842,98 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_dispatchWithComponents_, components. } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSConnection, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSConnection, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSConnection, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSConnection, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSConnection, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSConnection, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSConnection, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSConnection, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSConnection, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSConnection, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSConnection, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSConnection, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSConnection, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } -late final _sel_addConnection_toRunLoop_forMode_ = objc.registerName("addConnection:toRunLoop:forMode:"); -late final _sel_removeConnection_fromRunLoop_forMode_ = objc.registerName("removeConnection:fromRunLoop:forMode:"); +late final _sel_addConnection_toRunLoop_forMode_ = + objc.registerName("addConnection:toRunLoop:forMode:"); +late final _sel_removeConnection_fromRunLoop_forMode_ = + objc.registerName("removeConnection:fromRunLoop:forMode:"); /// NSPort class NSPort extends objc.NSObject { NSPort._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSPort.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSPort); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSPort); } /// port @@ -14290,73 +21944,103 @@ class NSPort extends objc.NSObject { /// invalidate void invalidate() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); } /// isValid bool get valid { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValid); - } /// setDelegate: void setDelegate_(objc.ObjCObjectBase? anObject) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, anObject?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, + anObject?.ref.pointer ?? ffi.nullptr); } /// delegate objc.ObjCObjectBase? delegate() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// scheduleInRunLoop:forMode: void scheduleInRunLoop_forMode_(objc.NSRunLoop runLoop, objc.NSString mode) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, runLoop.ref.pointer, mode.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, + runLoop.ref.pointer, mode.ref.pointer); } /// removeFromRunLoop:forMode: void removeFromRunLoop_forMode_(objc.NSRunLoop runLoop, objc.NSString mode) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeFromRunLoop_forMode_, runLoop.ref.pointer, mode.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeFromRunLoop_forMode_, + runLoop.ref.pointer, mode.ref.pointer); } /// reservedSpaceLength int get reservedSpaceLength { return _objc_msgSend_eldhrq(this.ref.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_1k87i90(this.ref.pointer, _sel_sendBeforeDate_components_from_reserved_, limitDate.ref.pointer, components?.ref.pointer ?? ffi.nullptr, receivePort?.ref.pointer ?? ffi.nullptr, headerSpaceReserved); - + bool sendBeforeDate_components_from_reserved_( + objc.NSDate limitDate, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_1k87i90( + this.ref.pointer, + _sel_sendBeforeDate_components_from_reserved_, + limitDate.ref.pointer, + components?.ref.pointer ?? ffi.nullptr, + receivePort?.ref.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_1sldtak(this.ref.pointer, _sel_sendBeforeDate_msgid_components_from_reserved_, limitDate.ref.pointer, msgID, components?.ref.pointer ?? ffi.nullptr, receivePort?.ref.pointer ?? ffi.nullptr, headerSpaceReserved); - + bool sendBeforeDate_msgid_components_from_reserved_( + objc.NSDate limitDate, + int msgID, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_1sldtak( + this.ref.pointer, + _sel_sendBeforeDate_msgid_components_from_reserved_, + limitDate.ref.pointer, + msgID, + components?.ref.pointer ?? ffi.nullptr, + receivePort?.ref.pointer ?? ffi.nullptr, + headerSpaceReserved); } /// addConnection:toRunLoop:forMode: - void addConnection_toRunLoop_forMode_(NSConnection conn, objc.NSRunLoop runLoop, objc.NSString mode) { -_objc_msgSend_tenbla(this.ref.pointer, _sel_addConnection_toRunLoop_forMode_, conn.ref.pointer, runLoop.ref.pointer, mode.ref.pointer); - + void addConnection_toRunLoop_forMode_( + NSConnection conn, objc.NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_addConnection_toRunLoop_forMode_, + conn.ref.pointer, + runLoop.ref.pointer, + mode.ref.pointer); } /// removeConnection:fromRunLoop:forMode: - void removeConnection_fromRunLoop_forMode_(NSConnection conn, objc.NSRunLoop runLoop, objc.NSString mode) { -_objc_msgSend_tenbla(this.ref.pointer, _sel_removeConnection_fromRunLoop_forMode_, conn.ref.pointer, runLoop.ref.pointer, mode.ref.pointer); - + void removeConnection_fromRunLoop_forMode_( + NSConnection conn, objc.NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_removeConnection_fromRunLoop_forMode_, + conn.ref.pointer, + runLoop.ref.pointer, + mode.ref.pointer); } /// init NSPort init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSPort.castFromPointer(_ret, retain: false, release: true); } @@ -14368,7 +22052,8 @@ _objc_msgSend_tenbla(this.ref.pointer, _sel_removeConnection_fromRunLoop_forMode /// allocWithZone: static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSPort, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSPort, _sel_allocWithZone_, zone); return NSPort.castFromPointer(_ret, retain: false, release: true); } @@ -14379,69 +22064,86 @@ _objc_msgSend_tenbla(this.ref.pointer, _sel_removeConnection_fromRunLoop_forMode } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSPort, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSPort, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSPort, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSPort, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSPort, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSPort, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSPort, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSPort, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSPort, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSPort, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPort, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSPort, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSPort, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSPort, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSPort? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSPort.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: false, release: true); } } @@ -14453,11 +22155,14 @@ 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_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{ +late final _sel_operatingSystemVersionString = + objc.registerName("operatingSystemVersionString"); + +final class NSOperatingSystemVersion extends ffi.Struct { @ffi.Long() external int majorVersion; @@ -14466,24 +22171,56 @@ final class NSOperatingSystemVersion extends ffi.Struct{ @ffi.Long() external int patchVersion; - } -late final _sel_operatingSystemVersion = objc.registerName("operatingSystemVersion"); -final _objc_msgSend_1wzlp4e = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -final _objc_msgSend_1wzlp4eStret = objc.msgSendStretPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +late final _sel_operatingSystemVersion = + objc.registerName("operatingSystemVersion"); +final _objc_msgSend_1wzlp4e = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSOperatingSystemVersion Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1wzlp4eStret = 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_activeProcessorCount = + objc.registerName("activeProcessorCount"); late final _sel_physicalMemory = objc.registerName("physicalMemory"); -late final _sel_isOperatingSystemAtLeastVersion_ = objc.registerName("isOperatingSystemAtLeastVersion:"); -final _objc_msgSend_1cw7twn = objc.msgSendPointer.cast , ffi.Pointer , NSOperatingSystemVersion )>>().asFunction , ffi.Pointer , NSOperatingSystemVersion )>(); +late final _sel_isOperatingSystemAtLeastVersion_ = + objc.registerName("isOperatingSystemAtLeastVersion:"); +final _objc_msgSend_1cw7twn = 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:"); -late final _sel_enableAutomaticTermination_ = objc.registerName("enableAutomaticTermination:"); -late final _sel_automaticTerminationSupportEnabled = objc.registerName("automaticTerminationSupportEnabled"); -late final _sel_setAutomaticTerminationSupportEnabled_ = objc.registerName("setAutomaticTerminationSupportEnabled:"); +late final _sel_disableSuddenTermination = + objc.registerName("disableSuddenTermination"); +late final _sel_enableSuddenTermination = + objc.registerName("enableSuddenTermination"); +late final _sel_disableAutomaticTermination_ = + objc.registerName("disableAutomaticTermination:"); +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), @@ -14497,72 +22234,126 @@ enum NSActivityOptions { 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_1pavxqs = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Uint64 , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); + 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_1pavxqs = 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_17597p1 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Uint64 , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , int , ffi.Pointer , ffi.Pointer )>(); -void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline(ffi.Pointer block, bool arg0) => - block.ref.target.cast>() - .asFunction()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_bool_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Bool )>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_bool_closureTrampoline(ffi.Pointer block, bool arg0) => - (objc.getBlockClosure(block) as void Function(bool ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_bool_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Bool )>(_ObjCBlock_ffiVoid_bool_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_bool_listenerTrampoline(ffi.Pointer block, bool arg0) { - (objc.getBlockClosure(block) as void Function(bool ))(arg0); +late final _sel_performActivityWithOptions_reason_usingBlock_ = + objc.registerName("performActivityWithOptions:reason:usingBlock:"); +final _objc_msgSend_17597p1 = 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); +ffi.Pointer _ObjCBlock_ffiVoid_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + (objc.getBlockClosure(block) as void Function(bool))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_listenerTrampoline( + ffi.Pointer block, bool arg0) { + (objc.getBlockClosure(block) as void Function(bool))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Bool )> _ObjCBlock_ffiVoid_bool_listenerCallable = ffi.NativeCallable , ffi.Bool )>.listener( - _ObjCBlock_ffiVoid_bool_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable, ffi.Bool)> + _ObjCBlock_ffiVoid_bool_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>.listener(_ObjCBlock_ffiVoid_bool_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_bool_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(bool ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_bool_closureCallable, (bool arg0) => fn(arg0)), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(bool) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_closureCallable, (bool arg0) => fn(arg0)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -14573,69 +22364,87 @@ abstract final class ObjCBlock_ffiVoid_bool { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(bool ) fn) { + static objc.ObjCBlock listener( + void Function(bool) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_bool_listenerCallable.nativeFunction.cast(), (bool arg0) => fn(arg0)); + _ObjCBlock_ffiVoid_bool_listenerCallable.nativeFunction.cast(), + (bool arg0) => fn(arg0)); final wrapper = _wrapListenerBlock_117qins(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_bool_CallExtension on objc.ObjCBlock { - void call(bool arg0) =>ref.pointer.ref.invoke.cast block, ffi.Bool arg0)>>().asFunction , bool )>()( - ref.pointer, arg0); -} - -late final _sel_performExpiringActivityWithReason_usingBlock_ = objc.registerName("performExpiringActivityWithReason:usingBlock:"); +extension ObjCBlock_ffiVoid_bool_CallExtension + on objc.ObjCBlock { + void call(bool arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + ref.pointer, arg0); +} + +late final _sel_performExpiringActivityWithReason_usingBlock_ = + objc.registerName("performExpiringActivityWithReason:usingBlock:"); 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"), - }; - + 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_1ssuop7 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_isLowPowerModeEnabled = objc.registerName("isLowPowerModeEnabled"); +final _objc_msgSend_1ssuop7 = 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"); /// NSProcessInfo class NSProcessInfo extends objc.NSObject { NSProcessInfo._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSProcessInfo.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); } /// processInfo @@ -14669,139 +22478,154 @@ class NSProcessInfo extends objc.NSObject { } /// setProcessName: - set processName(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProcessName_, value.ref.pointer); - + set processName(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setProcessName_, value.ref.pointer); } /// processIdentifier int get processIdentifier { return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_processIdentifier); - } /// globallyUniqueString objc.NSString get globallyUniqueString { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_globallyUniqueString); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_globallyUniqueString); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystem int operatingSystem() { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_operatingSystem); - } /// operatingSystemName objc.NSString operatingSystemName() { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_operatingSystemName); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_operatingSystemName); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystemVersionString objc.NSString get operatingSystemVersionString { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_operatingSystemVersionString); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_operatingSystemVersionString); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// operatingSystemVersion NSOperatingSystemVersion get operatingSystemVersion { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_1wzlp4eStret(_ptr, this.ref.pointer, _sel_operatingSystemVersion) : _ptr.ref = _objc_msgSend_1wzlp4e(this.ref.pointer, _sel_operatingSystemVersion); + objc.useMsgSendVariants + ? _objc_msgSend_1wzlp4eStret( + _ptr, this.ref.pointer, _sel_operatingSystemVersion) + : _ptr.ref = _objc_msgSend_1wzlp4e( + this.ref.pointer, _sel_operatingSystemVersion); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// processorCount int get processorCount { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_processorCount); - } /// activeProcessorCount int get activeProcessorCount { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_activeProcessorCount); - } /// physicalMemory int get physicalMemory { return _objc_msgSend_1cirwn8(this.ref.pointer, _sel_physicalMemory); - } /// isOperatingSystemAtLeastVersion: bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { - return _objc_msgSend_1cw7twn(this.ref.pointer, _sel_isOperatingSystemAtLeastVersion_, version); - + return _objc_msgSend_1cw7twn( + this.ref.pointer, _sel_isOperatingSystemAtLeastVersion_, version); } /// systemUptime double get systemUptime { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_systemUptime) : _objc_msgSend_10noklm(this.ref.pointer, _sel_systemUptime); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_systemUptime) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_systemUptime); } /// disableSuddenTermination void disableSuddenTermination() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_disableSuddenTermination); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_disableSuddenTermination); } /// enableSuddenTermination void enableSuddenTermination() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_enableSuddenTermination); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_enableSuddenTermination); } /// disableAutomaticTermination: void disableAutomaticTermination_(objc.NSString reason) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_disableAutomaticTermination_, reason.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_disableAutomaticTermination_, + reason.ref.pointer); } /// enableAutomaticTermination: void enableAutomaticTermination_(objc.NSString reason) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_enableAutomaticTermination_, reason.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_enableAutomaticTermination_, reason.ref.pointer); } /// automaticTerminationSupportEnabled bool get automaticTerminationSupportEnabled { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_automaticTerminationSupportEnabled); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_automaticTerminationSupportEnabled); } /// setAutomaticTerminationSupportEnabled: - set automaticTerminationSupportEnabled(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); - + set automaticTerminationSupportEnabled(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); } /// beginActivityWithOptions:reason: - objc.ObjCObjectBase beginActivityWithOptions_reason_(NSActivityOptions options, objc.NSString reason) { - final _ret = _objc_msgSend_1pavxqs(this.ref.pointer, _sel_beginActivityWithOptions_reason_, options.value, reason.ref.pointer); + objc.ObjCObjectBase beginActivityWithOptions_reason_( + NSActivityOptions options, objc.NSString reason) { + final _ret = _objc_msgSend_1pavxqs( + this.ref.pointer, + _sel_beginActivityWithOptions_reason_, + options.value, + reason.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// endActivity: void endActivity_(objc.ObjCObjectBase activity) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_endActivity_, activity.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_endActivity_, activity.ref.pointer); } /// performActivityWithOptions:reason:usingBlock: - void performActivityWithOptions_reason_usingBlock_(NSActivityOptions options, objc.NSString reason, objc.ObjCBlock block) { -_objc_msgSend_17597p1(this.ref.pointer, _sel_performActivityWithOptions_reason_usingBlock_, options.value, reason.ref.pointer, block.ref.pointer); - + void performActivityWithOptions_reason_usingBlock_(NSActivityOptions options, + objc.NSString reason, objc.ObjCBlock block) { + _objc_msgSend_17597p1( + this.ref.pointer, + _sel_performActivityWithOptions_reason_usingBlock_, + options.value, + reason.ref.pointer, + block.ref.pointer); } /// performExpiringActivityWithReason:usingBlock: - void performExpiringActivityWithReason_usingBlock_(objc.NSString reason, objc.ObjCBlock block) { -_objc_msgSend_cmbt6k(this.ref.pointer, _sel_performExpiringActivityWithReason_usingBlock_, reason.ref.pointer, block.ref.pointer); - + void performExpiringActivityWithReason_usingBlock_( + objc.NSString reason, objc.ObjCBlock block) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_performExpiringActivityWithReason_usingBlock_, + reason.ref.pointer, + block.ref.pointer); } /// userName @@ -14825,24 +22649,22 @@ _objc_msgSend_cmbt6k(this.ref.pointer, _sel_performExpiringActivityWithReason_us /// isLowPowerModeEnabled bool get lowPowerModeEnabled { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isLowPowerModeEnabled); - } /// isMacCatalystApp bool get macCatalystApp { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isMacCatalystApp); - } /// isiOSAppOnMac bool get iOSAppOnMac { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isiOSAppOnMac); - } /// init NSProcessInfo init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } @@ -14854,7 +22676,8 @@ _objc_msgSend_cmbt6k(this.ref.pointer, _sel_performExpiringActivityWithReason_us /// allocWithZone: static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSProcessInfo, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSProcessInfo, _sel_allocWithZone_, zone); return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } @@ -14865,56 +22688,70 @@ _objc_msgSend_cmbt6k(this.ref.pointer, _sel_performExpiringActivityWithReason_us } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSProcessInfo, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSProcessInfo, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSProcessInfo, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSProcessInfo, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSProcessInfo, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSProcessInfo, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSProcessInfo, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSProcessInfo, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSProcessInfo, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSProcessInfo, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -14938,6 +22775,7 @@ _objc_msgSend_1tjlcwl(_class_NSProcessInfo, _sel_setKeys_triggerChangeNotificati } late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); + enum NSTextCheckingType { NSTextCheckingTypeOrthography(1), NSTextCheckingTypeSpelling(2), @@ -14953,34 +22791,56 @@ enum NSTextCheckingType { 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"), - }; - + 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_1d8v3ql = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1d8v3ql = 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_vi3lef = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -final _objc_msgSend_vi3lefStret = objc.msgSendStretPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_vi3lef = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_vi3lefStret = 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_orthography = objc.registerName("orthography"); late final _sel_grammarDetails = objc.registerName("grammarDetails"); late final _sel_duration = objc.registerName("duration"); @@ -14988,6 +22848,7 @@ late final _sel_components = objc.registerName("components"); late final _sel_replacementString = objc.registerName("replacementString"); late final _sel_alternativeStrings = objc.registerName("alternativeStrings"); late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); + enum NSRegularExpressionOptions { NSRegularExpressionCaseInsensitive(1), NSRegularExpressionAllowCommentsAndWhitespace(2), @@ -14997,31 +22858,57 @@ enum NSRegularExpressionOptions { 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_mq25jr = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer> )>(); -late final _sel_initWithPattern_options_error_ = objc.registerName("initWithPattern:options:error:"); + 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_mq25jr = 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:"); late final _sel_pattern = objc.registerName("pattern"); late final _sel_options = objc.registerName("options"); -final _objc_msgSend_jt3cu0 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_numberOfCaptureGroups = objc.registerName("numberOfCaptureGroups"); -late final _sel_escapedPatternForString_ = objc.registerName("escapedPatternForString:"); +final _objc_msgSend_jt3cu0 = 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), @@ -15029,19 +22916,17 @@ enum NSMatchingOptions { 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"), - }; - + 1 => NSMatchingReportProgress, + 2 => NSMatchingReportCompletion, + 4 => NSMatchingAnchored, + 8 => NSMatchingWithTransparentBounds, + 16 => NSMatchingWithoutAnchoringBounds, + _ => throw ArgumentError("Unknown value for NSMatchingOptions: $value"), + }; } enum NSMatchingFlags { @@ -15051,61 +22936,138 @@ enum NSMatchingFlags { 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"), - }; - -} - -void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() - .asFunction , int , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline ).cast(); -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); -ffi.Pointer _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerTrampoline(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); + 1 => NSMatchingProgress, + 2 => NSMatchingCompleted, + 4 => NSMatchingHitEnd, + 8 => NSMatchingRequiredEnd, + 16 => NSMatchingInternalError, + _ => throw ArgumentError("Unknown value for NSMatchingFlags: $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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) + .cast(); +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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerTrampoline( + 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); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )> _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Void Function( + NSTextCheckingResult?, ffi.UnsignedLong, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc + .ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunction(void Function(NSTextCheckingResult? , NSMatchingFlags , ffi.Pointer ) fn) => - objc.ObjCBlock)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureCallable, (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), NSMatchingFlags.fromValue(arg1), arg2)), - retain: false, release: true); + static objc.ObjCBlock)> + fromFunction(void Function(NSTextCheckingResult?, NSMatchingFlags, ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureCallable, + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), + NSMatchingFlags.fromValue(arg1), + arg2)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -15116,69 +23078,251 @@ abstract final class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock)> listener(void Function(NSTextCheckingResult? , NSMatchingFlags , ffi.Pointer ) fn) { + static objc.ObjCBlock< + ffi.Void Function( + NSTextCheckingResult?, ffi.UnsignedLong, ffi.Pointer)> + listener( + void Function( + NSTextCheckingResult?, NSMatchingFlags, ffi.Pointer) + fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerCallable.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)); + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_listenerCallable + .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)); final wrapper = _wrapListenerBlock_9w6y6n(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_CallExtension on objc.ObjCBlock)> { - void call(NSTextCheckingResult? arg0, NSMatchingFlags arg1, ffi.Pointer arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , int , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.value, arg2); -} - -late final _sel_enumerateMatchesInString_options_range_usingBlock_ = objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); -final _objc_msgSend_1c1lm06 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , objc.NSRange , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , int , objc.NSRange , ffi.Pointer )>(); -late final _sel_matchesInString_options_range_ = objc.registerName("matchesInString:options:range:"); -final _objc_msgSend_1ntyxzp = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , objc.NSRange )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , objc.NSRange )>(); -late final _sel_numberOfMatchesInString_options_range_ = objc.registerName("numberOfMatchesInString:options:range:"); -final _objc_msgSend_1y9v6af = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , objc.NSRange )>>().asFunction , ffi.Pointer , ffi.Pointer , int , objc.NSRange )>(); -late final _sel_firstMatchInString_options_range_ = objc.registerName("firstMatchInString:options:range:"); -late final _sel_rangeOfFirstMatchInString_options_range_ = objc.registerName("rangeOfFirstMatchInString:options:range:"); -final _objc_msgSend_6yg79o = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , objc.NSRange )>>().asFunction , ffi.Pointer , ffi.Pointer , int , objc.NSRange )>(); -final _objc_msgSend_6yg79oStret = objc.msgSendStretPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , objc.NSRange )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , int , objc.NSRange )>(); -late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = objc.registerName("stringByReplacingMatchesInString:options:range:withTemplate:"); -final _objc_msgSend_zsgini = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , objc.NSRange , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , objc.NSRange , ffi.Pointer )>(); -late final _sel_replaceMatchesInString_options_range_withTemplate_ = objc.registerName("replaceMatchesInString:options:range:withTemplate:"); -final _objc_msgSend_19w8ucc = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , objc.NSRange , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , int , objc.NSRange , ffi.Pointer )>(); -late final _sel_replacementStringForResult_inString_offset_template_ = objc.registerName("replacementStringForResult:inString:offset:template:"); -late final _sel_escapedTemplateForString_ = objc.registerName("escapedTemplateForString:"); +extension ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + NSTextCheckingResult?, ffi.UnsignedLong, ffi.Pointer)> { + void call(NSTextCheckingResult? arg0, NSMatchingFlags arg1, + ffi.Pointer arg2) => + ref.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)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.value, arg2); +} + +late final _sel_enumerateMatchesInString_options_range_usingBlock_ = + objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); +final _objc_msgSend_1c1lm06 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_matchesInString_options_range_ = + objc.registerName("matchesInString:options:range:"); +final _objc_msgSend_1ntyxzp = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_numberOfMatchesInString_options_range_ = + objc.registerName("numberOfMatchesInString:options:range:"); +final _objc_msgSend_1y9v6af = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_firstMatchInString_options_range_ = + objc.registerName("firstMatchInString:options:range:"); +late final _sel_rangeOfFirstMatchInString_options_range_ = + objc.registerName("rangeOfFirstMatchInString:options:range:"); +final _objc_msgSend_6yg79o = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +final _objc_msgSend_6yg79oStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = + objc.registerName( + "stringByReplacingMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_zsgini = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_replaceMatchesInString_options_range_withTemplate_ = + objc.registerName("replaceMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_19w8ucc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_replacementStringForResult_inString_offset_template_ = + objc.registerName("replacementStringForResult:inString:offset:template:"); +late final _sel_escapedTemplateForString_ = + objc.registerName("escapedTemplateForString:"); /// NSRegularExpression class NSRegularExpression extends objc.NSObject { NSRegularExpression._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSRegularExpression.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); + return _objc_msgSend_l8lotg( + obj.ref.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_mq25jr(_class_NSRegularExpression, _sel_regularExpressionWithPattern_options_error_, pattern.ref.pointer, options.value, error); - return _ret.address == 0 ? null : NSRegularExpression.castFromPointer(_ret, retain: true, release: true); + static NSRegularExpression? regularExpressionWithPattern_options_error_( + objc.NSString pattern, + NSRegularExpressionOptions options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_mq25jr( + _class_NSRegularExpression, + _sel_regularExpressionWithPattern_options_error_, + pattern.ref.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_mq25jr(this.ref.retainAndReturnPointer(), _sel_initWithPattern_options_error_, pattern.ref.pointer, options.value, error); - return _ret.address == 0 ? null : NSRegularExpression.castFromPointer(_ret, retain: false, release: true); + NSRegularExpression? initWithPattern_options_error_( + objc.NSString pattern, + NSRegularExpressionOptions options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_mq25jr( + this.ref.retainAndReturnPointer(), + _sel_initWithPattern_options_error_, + pattern.ref.pointer, + options.value, + error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } /// pattern @@ -15196,185 +23340,289 @@ class NSRegularExpression extends objc.NSObject { /// numberOfCaptureGroups int get numberOfCaptureGroups { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_numberOfCaptureGroups); - } /// escapedPatternForString: static objc.NSString escapedPatternForString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, _sel_escapedPatternForString_, string.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, + _sel_escapedPatternForString_, string.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// enumerateMatchesInString:options:range:usingBlock: - void enumerateMatchesInString_options_range_usingBlock_(objc.NSString string, NSMatchingOptions options, objc.NSRange range, objc.ObjCBlock)> block) { -_objc_msgSend_1c1lm06(this.ref.pointer, _sel_enumerateMatchesInString_options_range_usingBlock_, string.ref.pointer, options.value, range, block.ref.pointer); - + void enumerateMatchesInString_options_range_usingBlock_( + objc.NSString string, + NSMatchingOptions options, + objc.NSRange range, + objc.ObjCBlock< + ffi.Void Function(NSTextCheckingResult?, ffi.UnsignedLong, + ffi.Pointer)> + block) { + _objc_msgSend_1c1lm06( + this.ref.pointer, + _sel_enumerateMatchesInString_options_range_usingBlock_, + string.ref.pointer, + options.value, + range, + block.ref.pointer); } /// matchesInString:options:range: - objc.NSArray matchesInString_options_range_(objc.NSString string, NSMatchingOptions options, objc.NSRange range) { - final _ret = _objc_msgSend_1ntyxzp(this.ref.pointer, _sel_matchesInString_options_range_, string.ref.pointer, options.value, range); + objc.NSArray matchesInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + final _ret = _objc_msgSend_1ntyxzp( + this.ref.pointer, + _sel_matchesInString_options_range_, + string.ref.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, objc.NSRange range) { - return _objc_msgSend_1y9v6af(this.ref.pointer, _sel_numberOfMatchesInString_options_range_, string.ref.pointer, options.value, range); - + int numberOfMatchesInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + return _objc_msgSend_1y9v6af( + this.ref.pointer, + _sel_numberOfMatchesInString_options_range_, + string.ref.pointer, + options.value, + range); } /// firstMatchInString:options:range: - NSTextCheckingResult? firstMatchInString_options_range_(objc.NSString string, NSMatchingOptions options, objc.NSRange range) { - final _ret = _objc_msgSend_1ntyxzp(this.ref.pointer, _sel_firstMatchInString_options_range_, string.ref.pointer, options.value, range); - return _ret.address == 0 ? null : NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + NSTextCheckingResult? firstMatchInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + final _ret = _objc_msgSend_1ntyxzp( + this.ref.pointer, + _sel_firstMatchInString_options_range_, + string.ref.pointer, + options.value, + range); + return _ret.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// rangeOfFirstMatchInString:options:range: - objc.NSRange rangeOfFirstMatchInString_options_range_(objc.NSString string, NSMatchingOptions options, objc.NSRange range) { + objc.NSRange rangeOfFirstMatchInString_options_range_( + objc.NSString string, NSMatchingOptions options, objc.NSRange range) { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_6yg79oStret(_ptr, this.ref.pointer, _sel_rangeOfFirstMatchInString_options_range_, string.ref.pointer, options.value, range) : _ptr.ref = _objc_msgSend_6yg79o(this.ref.pointer, _sel_rangeOfFirstMatchInString_options_range_, string.ref.pointer, options.value, range); + objc.useMsgSendVariants + ? _objc_msgSend_6yg79oStret( + _ptr, + this.ref.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.ref.pointer, + options.value, + range) + : _ptr.ref = _objc_msgSend_6yg79o( + this.ref.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.ref.pointer, + options.value, + range); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// stringByReplacingMatchesInString:options:range:withTemplate: - objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_(objc.NSString string, NSMatchingOptions options, objc.NSRange range, objc.NSString templ) { - final _ret = _objc_msgSend_zsgini(this.ref.pointer, _sel_stringByReplacingMatchesInString_options_range_withTemplate_, string.ref.pointer, options.value, range, templ.ref.pointer); + objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( + objc.NSString string, + NSMatchingOptions options, + objc.NSRange range, + objc.NSString templ) { + final _ret = _objc_msgSend_zsgini( + this.ref.pointer, + _sel_stringByReplacingMatchesInString_options_range_withTemplate_, + string.ref.pointer, + options.value, + range, + templ.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// replaceMatchesInString:options:range:withTemplate: - int replaceMatchesInString_options_range_withTemplate_(objc.NSMutableString string, NSMatchingOptions options, objc.NSRange range, objc.NSString templ) { - return _objc_msgSend_19w8ucc(this.ref.pointer, _sel_replaceMatchesInString_options_range_withTemplate_, string.ref.pointer, options.value, range, templ.ref.pointer); - + int replaceMatchesInString_options_range_withTemplate_( + objc.NSMutableString string, + NSMatchingOptions options, + objc.NSRange range, + objc.NSString templ) { + return _objc_msgSend_19w8ucc( + this.ref.pointer, + _sel_replaceMatchesInString_options_range_withTemplate_, + string.ref.pointer, + options.value, + range, + templ.ref.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_eyseqq(this.ref.pointer, _sel_replacementStringForResult_inString_offset_template_, result.ref.pointer, string.ref.pointer, offset, templ.ref.pointer); + objc.NSString replacementStringForResult_inString_offset_template_( + NSTextCheckingResult result, + objc.NSString string, + int offset, + objc.NSString templ) { + final _ret = _objc_msgSend_eyseqq( + this.ref.pointer, + _sel_replacementStringForResult_inString_offset_template_, + result.ref.pointer, + string.ref.pointer, + offset, + templ.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// escapedTemplateForString: static objc.NSString escapedTemplateForString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, _sel_escapedTemplateForString_, string.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, + _sel_escapedTemplateForString_, string.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSRegularExpression init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } /// new static NSRegularExpression new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSRegularExpression, _sel_new); - return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSRegularExpression, _sel_allocWithZone_, zone); - return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSRegularExpression, _sel_allocWithZone_, zone); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSRegularExpression alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSRegularExpression, _sel_alloc); - return NSRegularExpression.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSRegularExpression, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSRegularExpression, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSRegularExpression, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSRegularExpression, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSRegularExpression, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSRegularExpression, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSRegularExpression, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSRegularExpression, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSRegularExpression, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSRegularExpression, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSRegularExpression, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSRegularExpression self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSRegularExpression.castFromPointer(_ret, retain: true, release: true); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } /// retain NSRegularExpression retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSRegularExpression.castFromPointer(_ret, retain: true, release: true); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSRegularExpression autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSRegularExpression.castFromPointer(_ret, retain: true, release: true); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSRegularExpression, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSRegularExpression, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSRegularExpression? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSRegularExpression.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } } @@ -15382,52 +23630,166 @@ late final _sel_regularExpression = objc.registerName("regularExpression"); late final _sel_phoneNumber = objc.registerName("phoneNumber"); late final _sel_numberOfRanges = objc.registerName("numberOfRanges"); late final _sel_rangeAtIndex_ = objc.registerName("rangeAtIndex:"); -final _objc_msgSend_rmij85 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -final _objc_msgSend_rmij85Stret = objc.msgSendStretPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); +final _objc_msgSend_rmij85 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_rmij85Stret = objc.msgSendStretPointer + .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_rangeWithName_ = objc.registerName("rangeWithName:"); -final _objc_msgSend_1pl4rx6 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -final _objc_msgSend_1pl4rx6Stret = objc.msgSendStretPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_resultByAdjustingRangesWithOffset_ = objc.registerName("resultByAdjustingRangesWithOffset:"); +final _objc_msgSend_1pl4rx6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1pl4rx6Stret = objc.msgSendStretPointer + .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_resultByAdjustingRangesWithOffset_ = + objc.registerName("resultByAdjustingRangesWithOffset:"); late final _sel_addressComponents = objc.registerName("addressComponents"); -late final _sel_orthographyCheckingResultWithRange_orthography_ = objc.registerName("orthographyCheckingResultWithRange:orthography:"); -final _objc_msgSend_1g0atks = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer )>(); -late final _sel_spellCheckingResultWithRange_ = objc.registerName("spellCheckingResultWithRange:"); -late final _sel_grammarCheckingResultWithRange_details_ = objc.registerName("grammarCheckingResultWithRange:details:"); -late final _sel_dateCheckingResultWithRange_date_ = objc.registerName("dateCheckingResultWithRange:date:"); -late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); -final _objc_msgSend_1trgi6b = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer , ffi.Pointer , ffi.Double )>>().asFunction Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer , ffi.Pointer , double )>(); -late final _sel_addressCheckingResultWithRange_components_ = objc.registerName("addressCheckingResultWithRange:components:"); -late final _sel_linkCheckingResultWithRange_URL_ = objc.registerName("linkCheckingResultWithRange:URL:"); -late final _sel_quoteCheckingResultWithRange_replacementString_ = objc.registerName("quoteCheckingResultWithRange:replacementString:"); -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_1desjtb = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , objc.NSRange , ffi.Pointer , ffi.Pointer )>(); -late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = objc.registerName("regularExpressionCheckingResultWithRanges:count:regularExpression:"); -final _objc_msgSend_1s39epe = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_ = objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); -late final _sel_transitInformationCheckingResultWithRange_components_ = objc.registerName("transitInformationCheckingResultWithRange:components:"); +late final _sel_orthographyCheckingResultWithRange_orthography_ = + objc.registerName("orthographyCheckingResultWithRange:orthography:"); +final _objc_msgSend_1g0atks = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_spellCheckingResultWithRange_ = + objc.registerName("spellCheckingResultWithRange:"); +late final _sel_grammarCheckingResultWithRange_details_ = + objc.registerName("grammarCheckingResultWithRange:details:"); +late final _sel_dateCheckingResultWithRange_date_ = + objc.registerName("dateCheckingResultWithRange:date:"); +late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = + objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); +final _objc_msgSend_1trgi6b = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer, + double)>(); +late final _sel_addressCheckingResultWithRange_components_ = + objc.registerName("addressCheckingResultWithRange:components:"); +late final _sel_linkCheckingResultWithRange_URL_ = + objc.registerName("linkCheckingResultWithRange:URL:"); +late final _sel_quoteCheckingResultWithRange_replacementString_ = + objc.registerName("quoteCheckingResultWithRange:replacementString:"); +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_1desjtb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = + objc.registerName( + "regularExpressionCheckingResultWithRanges:count:regularExpression:"); +final _objc_msgSend_1s39epe = 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_phoneNumberCheckingResultWithRange_phoneNumber_ = + objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); +late final _sel_transitInformationCheckingResultWithRange_components_ = + objc.registerName("transitInformationCheckingResultWithRange:components:"); /// NSTextCheckingResult class NSTextCheckingResult extends objc.NSObject { NSTextCheckingResult._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSTextCheckingResult.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); } /// resultType @@ -15439,369 +23801,611 @@ class NSTextCheckingResult extends objc.NSObject { /// range objc.NSRange get range { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_vi3lefStret(_ptr, this.ref.pointer, _sel_range) : _ptr.ref = _objc_msgSend_vi3lef(this.ref.pointer, _sel_range); + objc.useMsgSendVariants + ? _objc_msgSend_vi3lefStret(_ptr, this.ref.pointer, _sel_range) + : _ptr.ref = _objc_msgSend_vi3lef(this.ref.pointer, _sel_range); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// orthography NSOrthography? get orthography { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_orthography); - return _ret.address == 0 ? null : NSOrthography.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } /// grammarDetails objc.NSArray? get grammarDetails { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_grammarDetails); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// date objc.NSDate? get date { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_date); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// timeZone NSTimeZone? get timeZone { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_timeZone); - return _ret.address == 0 ? null : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } /// duration double get duration { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_duration) : _objc_msgSend_10noklm(this.ref.pointer, _sel_duration); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_duration) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_duration); } /// components objc.NSDictionary? get components { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_components); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// replacementString objc.NSString? get replacementString { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_replacementString); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_1unuoxw(this.ref.pointer, _sel_alternativeStrings); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_alternativeStrings); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// regularExpression NSRegularExpression? get regularExpression { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_regularExpression); - return _ret.address == 0 ? null : NSRegularExpression.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_regularExpression); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } /// phoneNumber objc.NSString? get phoneNumber { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_phoneNumber); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// numberOfRanges int get numberOfRanges { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_numberOfRanges); - } /// rangeAtIndex: objc.NSRange rangeAtIndex_(int idx) { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_rmij85Stret(_ptr, this.ref.pointer, _sel_rangeAtIndex_, idx) : _ptr.ref = _objc_msgSend_rmij85(this.ref.pointer, _sel_rangeAtIndex_, idx); + objc.useMsgSendVariants + ? _objc_msgSend_rmij85Stret( + _ptr, this.ref.pointer, _sel_rangeAtIndex_, idx) + : _ptr.ref = + _objc_msgSend_rmij85(this.ref.pointer, _sel_rangeAtIndex_, idx); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// rangeWithName: objc.NSRange rangeWithName_(objc.NSString name) { final _ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants ? _objc_msgSend_1pl4rx6Stret(_ptr, this.ref.pointer, _sel_rangeWithName_, name.ref.pointer) : _ptr.ref = _objc_msgSend_1pl4rx6(this.ref.pointer, _sel_rangeWithName_, name.ref.pointer); + objc.useMsgSendVariants + ? _objc_msgSend_1pl4rx6Stret( + _ptr, this.ref.pointer, _sel_rangeWithName_, name.ref.pointer) + : _ptr.ref = _objc_msgSend_1pl4rx6( + this.ref.pointer, _sel_rangeWithName_, name.ref.pointer); final _finalizable = _ptr.cast().asTypedList( - ffi.sizeOf(), finalizer: pkg_ffi.calloc.nativeFree); + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); return ffi.Struct.create(_finalizable); - } /// resultByAdjustingRangesWithOffset: NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { - final _ret = _objc_msgSend_crtxa9(this.ref.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_crtxa9( + this.ref.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// addressComponents objc.NSDictionary? get addressComponents { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_addressComponents); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_addressComponents); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// orthographyCheckingResultWithRange:orthography: - static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_(objc.NSRange range, NSOrthography orthography) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_orthographyCheckingResultWithRange_orthography_, range, orthography.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( + objc.NSRange range, NSOrthography orthography) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_orthographyCheckingResultWithRange_orthography_, + range, + orthography.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// spellCheckingResultWithRange: - static NSTextCheckingResult spellCheckingResultWithRange_(objc.NSRange range) { - final _ret = _objc_msgSend_176f8tz(_class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult spellCheckingResultWithRange_( + objc.NSRange range) { + final _ret = _objc_msgSend_176f8tz( + _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// grammarCheckingResultWithRange:details: - static NSTextCheckingResult grammarCheckingResultWithRange_details_(objc.NSRange range, objc.NSArray details) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_grammarCheckingResultWithRange_details_, range, details.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult grammarCheckingResultWithRange_details_( + objc.NSRange range, objc.NSArray details) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_grammarCheckingResultWithRange_details_, + range, + details.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// dateCheckingResultWithRange:date: - static NSTextCheckingResult dateCheckingResultWithRange_date_(objc.NSRange range, objc.NSDate date) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_dateCheckingResultWithRange_date_, range, date.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult dateCheckingResultWithRange_date_( + objc.NSRange range, objc.NSDate date) { + final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_, range, date.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// dateCheckingResultWithRange:date:timeZone:duration: - static NSTextCheckingResult dateCheckingResultWithRange_date_timeZone_duration_(objc.NSRange range, objc.NSDate date, NSTimeZone timeZone, double duration) { - final _ret = _objc_msgSend_1trgi6b(_class_NSTextCheckingResult, _sel_dateCheckingResultWithRange_date_timeZone_duration_, range, date.ref.pointer, timeZone.ref.pointer, duration); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult + dateCheckingResultWithRange_date_timeZone_duration_(objc.NSRange range, + objc.NSDate date, NSTimeZone timeZone, double duration) { + final _ret = _objc_msgSend_1trgi6b( + _class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_timeZone_duration_, + range, + date.ref.pointer, + timeZone.ref.pointer, + duration); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// addressCheckingResultWithRange:components: - static NSTextCheckingResult addressCheckingResultWithRange_components_(objc.NSRange range, objc.NSDictionary components) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_addressCheckingResultWithRange_components_, range, components.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult addressCheckingResultWithRange_components_( + objc.NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_addressCheckingResultWithRange_components_, + range, + components.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// linkCheckingResultWithRange:URL: - static NSTextCheckingResult linkCheckingResultWithRange_URL_(objc.NSRange range, objc.NSURL url) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_linkCheckingResultWithRange_URL_, range, url.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult linkCheckingResultWithRange_URL_( + objc.NSRange range, objc.NSURL url) { + final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, + _sel_linkCheckingResultWithRange_URL_, range, url.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// quoteCheckingResultWithRange:replacementString: - static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_(objc.NSRange range, objc.NSString replacementString) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_quoteCheckingResultWithRange_replacementString_, range, replacementString.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_quoteCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// dashCheckingResultWithRange:replacementString: - static NSTextCheckingResult dashCheckingResultWithRange_replacementString_(objc.NSRange range, objc.NSString replacementString) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_dashCheckingResultWithRange_replacementString_, range, replacementString.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_dashCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// replacementCheckingResultWithRange:replacementString: - static NSTextCheckingResult replacementCheckingResultWithRange_replacementString_(objc.NSRange range, objc.NSString replacementString) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_replacementCheckingResultWithRange_replacementString_, range, replacementString.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult + replacementCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_replacementCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// correctionCheckingResultWithRange:replacementString: - static NSTextCheckingResult correctionCheckingResultWithRange_replacementString_(objc.NSRange range, objc.NSString replacementString) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_correctionCheckingResultWithRange_replacementString_, range, replacementString.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_( + objc.NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_, + range, + replacementString.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// correctionCheckingResultWithRange:replacementString:alternativeStrings: - static NSTextCheckingResult correctionCheckingResultWithRange_replacementString_alternativeStrings_(objc.NSRange range, objc.NSString replacementString, objc.NSArray alternativeStrings) { - final _ret = _objc_msgSend_1desjtb(_class_NSTextCheckingResult, _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, range, replacementString.ref.pointer, alternativeStrings.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_alternativeStrings_( + objc.NSRange range, + objc.NSString replacementString, + objc.NSArray alternativeStrings) { + final _ret = _objc_msgSend_1desjtb( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, + range, + replacementString.ref.pointer, + alternativeStrings.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// regularExpressionCheckingResultWithRanges:count:regularExpression: - static NSTextCheckingResult regularExpressionCheckingResultWithRanges_count_regularExpression_(ffi.Pointer ranges, int count, NSRegularExpression regularExpression) { - final _ret = _objc_msgSend_1s39epe(_class_NSTextCheckingResult, _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, ranges, count, regularExpression.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult + regularExpressionCheckingResultWithRanges_count_regularExpression_( + ffi.Pointer ranges, + int count, + NSRegularExpression regularExpression) { + final _ret = _objc_msgSend_1s39epe( + _class_NSTextCheckingResult, + _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, + ranges, + count, + regularExpression.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// phoneNumberCheckingResultWithRange:phoneNumber: - static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_(objc.NSRange range, objc.NSString phoneNumber) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_phoneNumberCheckingResultWithRange_phoneNumber_, range, phoneNumber.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( + objc.NSRange range, objc.NSString phoneNumber) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_phoneNumberCheckingResultWithRange_phoneNumber_, + range, + phoneNumber.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// transitInformationCheckingResultWithRange:components: - static NSTextCheckingResult transitInformationCheckingResultWithRange_components_(objc.NSRange range, objc.NSDictionary components) { - final _ret = _objc_msgSend_1g0atks(_class_NSTextCheckingResult, _sel_transitInformationCheckingResultWithRange_components_, range, components.ref.pointer); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + static NSTextCheckingResult + transitInformationCheckingResultWithRange_components_( + objc.NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_1g0atks( + _class_NSTextCheckingResult, + _sel_transitInformationCheckingResultWithRange_components_, + range, + components.ref.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// init NSTextCheckingResult init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } /// new static NSTextCheckingResult new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSTextCheckingResult, _sel_new); - return NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSTextCheckingResult, _sel_allocWithZone_, zone); - return NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSTextCheckingResult, _sel_allocWithZone_, zone); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSTextCheckingResult alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSTextCheckingResult, _sel_alloc); - return NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSTextCheckingResult, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSTextCheckingResult, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSTextCheckingResult, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSTextCheckingResult, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSTextCheckingResult, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSTextCheckingResult, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSTextCheckingResult, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSTextCheckingResult, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSTextCheckingResult self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// retain NSTextCheckingResult retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSTextCheckingResult autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSTextCheckingResult.castFromPointer(_ret, retain: true, release: true); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSTextCheckingResult, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSTextCheckingResult, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSTextCheckingResult? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSTextCheckingResult.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } } late final _class_NSTimer = objc.getClass("NSTimer"); -late final _sel_timerWithTimeInterval_invocation_repeats_ = objc.registerName("timerWithTimeInterval:invocation:repeats:"); -final _objc_msgSend_1dbp0rg = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Double , ffi.Pointer , ffi.Bool )>>().asFunction 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_12fx7q4 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Double , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Bool )>>().asFunction 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 arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSTimer_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSTimer_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +late final _sel_timerWithTimeInterval_invocation_repeats_ = + objc.registerName("timerWithTimeInterval:invocation:repeats:"); +final _objc_msgSend_1dbp0rg = 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_12fx7q4 = 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); +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSTimer_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSTimer_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSTimer_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSTimer_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTimer_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSTimer { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSTimer_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSTimer_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSTimer ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSTimer_closureCallable, (ffi.Pointer arg0) => fn(NSTimer.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(NSTimer) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTimer_closureCallable, + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -15812,28 +24416,97 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(NSTimer ) fn) { + static objc.ObjCBlock listener( + void Function(NSTimer) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSTimer_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(NSTimer.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSTimer_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => + fn(NSTimer.castFromPointer(arg0, retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSTimer_CallExtension on objc.ObjCBlock { - void call(NSTimer arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer); -} - -late final _sel_timerWithTimeInterval_repeats_block_ = objc.registerName("timerWithTimeInterval:repeats:block:"); -final _objc_msgSend_1t6yrah = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Double , ffi.Bool , ffi.Pointer )>>().asFunction 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_tzx95k = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Double , ffi.Bool , ffi.Pointer )>>().asFunction , 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_1thgzrb = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Double , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Bool )>>().asFunction , ffi.Pointer , ffi.Pointer , double , ffi.Pointer , ffi.Pointer , ffi.Pointer , bool )>(); +extension ObjCBlock_ffiVoid_NSTimer_CallExtension + on objc.ObjCBlock { + void call(NSTimer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); +} + +late final _sel_timerWithTimeInterval_repeats_block_ = + objc.registerName("timerWithTimeInterval:repeats:block:"); +final _objc_msgSend_1t6yrah = 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_tzx95k = 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_1thgzrb = 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"); late final _sel_setFireDate_ = objc.registerName("setFireDate:"); @@ -15844,76 +24517,148 @@ late final _sel_setTolerance_ = objc.registerName("setTolerance:"); /// NSTimer class NSTimer extends objc.NSObject { NSTimer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSTimer.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSTimer); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTimer); } /// timerWithTimeInterval:invocation:repeats: - static NSTimer timerWithTimeInterval_invocation_repeats_(double ti, objc.NSInvocation invocation, bool yesOrNo) { - final _ret = _objc_msgSend_1dbp0rg(_class_NSTimer, _sel_timerWithTimeInterval_invocation_repeats_, ti, invocation.ref.pointer, yesOrNo); + static NSTimer timerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_1dbp0rg( + _class_NSTimer, + _sel_timerWithTimeInterval_invocation_repeats_, + ti, + invocation.ref.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_1dbp0rg(_class_NSTimer, _sel_scheduledTimerWithTimeInterval_invocation_repeats_, ti, invocation.ref.pointer, yesOrNo); + static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_1dbp0rg( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_invocation_repeats_, + ti, + invocation.ref.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_12fx7q4(_class_NSTimer, _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, ti, aTarget.ref.pointer, aSelector, userInfo?.ref.pointer ?? ffi.nullptr, yesOrNo); + static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_12fx7q4( + _class_NSTimer, + _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.ref.pointer, + aSelector, + userInfo?.ref.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_12fx7q4(_class_NSTimer, _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, ti, aTarget.ref.pointer, aSelector, userInfo?.ref.pointer ?? ffi.nullptr, yesOrNo); + static NSTimer + scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_12fx7q4( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.ref.pointer, + aSelector, + userInfo?.ref.pointer ?? ffi.nullptr, + yesOrNo); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// timerWithTimeInterval:repeats:block: - static NSTimer timerWithTimeInterval_repeats_block_(double interval, bool repeats, objc.ObjCBlock block) { - final _ret = _objc_msgSend_1t6yrah(_class_NSTimer, _sel_timerWithTimeInterval_repeats_block_, interval, repeats, block.ref.pointer); + static NSTimer timerWithTimeInterval_repeats_block_(double interval, + bool repeats, objc.ObjCBlock block) { + final _ret = _objc_msgSend_1t6yrah( + _class_NSTimer, + _sel_timerWithTimeInterval_repeats_block_, + interval, + repeats, + block.ref.pointer); return NSTimer.castFromPointer(_ret, retain: true, release: true); } /// scheduledTimerWithTimeInterval:repeats:block: - static NSTimer scheduledTimerWithTimeInterval_repeats_block_(double interval, bool repeats, objc.ObjCBlock block) { - final _ret = _objc_msgSend_1t6yrah(_class_NSTimer, _sel_scheduledTimerWithTimeInterval_repeats_block_, interval, repeats, block.ref.pointer); + static NSTimer scheduledTimerWithTimeInterval_repeats_block_(double interval, + bool repeats, objc.ObjCBlock block) { + final _ret = _objc_msgSend_1t6yrah( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_repeats_block_, + interval, + repeats, + block.ref.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, objc.ObjCBlock block) { - final _ret = _objc_msgSend_tzx95k(this.ref.retainAndReturnPointer(), _sel_initWithFireDate_interval_repeats_block_, date.ref.pointer, interval, repeats, block.ref.pointer); + NSTimer initWithFireDate_interval_repeats_block_( + objc.NSDate date, + double interval, + bool repeats, + objc.ObjCBlock block) { + final _ret = _objc_msgSend_tzx95k( + this.ref.retainAndReturnPointer(), + _sel_initWithFireDate_interval_repeats_block_, + date.ref.pointer, + interval, + repeats, + block.ref.pointer); return NSTimer.castFromPointer(_ret, retain: false, 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_1thgzrb(this.ref.retainAndReturnPointer(), _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, date.ref.pointer, ti, t.ref.pointer, s, ui?.ref.pointer ?? ffi.nullptr, rep); + 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_1thgzrb( + this.ref.retainAndReturnPointer(), + _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, + date.ref.pointer, + ti, + t.ref.pointer, + s, + ui?.ref.pointer ?? ffi.nullptr, + rep); return NSTimer.castFromPointer(_ret, retain: false, release: true); } /// fire void fire() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_fire); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_fire); } /// fireDate @@ -15923,50 +24668,52 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_fire); } /// setFireDate: - set fireDate(objc.NSDate value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFireDate_, value.ref.pointer); - + set fireDate(objc.NSDate value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFireDate_, value.ref.pointer); } /// timeInterval double get timeInterval { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeInterval) : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeInterval); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeInterval) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeInterval); } /// tolerance double get tolerance { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_tolerance) : _objc_msgSend_10noklm(this.ref.pointer, _sel_tolerance); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_tolerance) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_tolerance); } /// setTolerance: - set tolerance(double value) { + set tolerance(double value) { return _objc_msgSend_suh039(this.ref.pointer, _sel_setTolerance_, value); - } /// invalidate void invalidate() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); } /// isValid bool get valid { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isValid); - } /// userInfo objc.ObjCObjectBase? get userInfo { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// init NSTimer init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSTimer.castFromPointer(_ret, retain: false, release: true); } @@ -15978,7 +24725,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); /// allocWithZone: static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSTimer, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSTimer, _sel_allocWithZone_, zone); return NSTimer.castFromPointer(_ret, retain: false, release: true); } @@ -15989,56 +24737,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidate); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSTimer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSTimer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSTimer, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSTimer, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSTimer, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSTimer, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSTimer, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSTimer, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSTimer, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSTimer, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSTimer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSTimer, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTimer, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSTimer, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } @@ -16046,65 +24808,122 @@ _objc_msgSend_1tjlcwl(_class_NSTimer, _sel_setKeys_triggerChangeNotificationsFor late final _class_NSURLCache = objc.getClass("NSURLCache"); late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); -late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); -final _objc_msgSend_ebb7er = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , int , int , ffi.Pointer )>(); -late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); +late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); +final _objc_msgSend_ebb7er = 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:"); late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); -late final _sel_initWithResponse_data_ = objc.registerName("initWithResponse:data:"); +late final _sel_initWithResponse_data_ = + objc.registerName("initWithResponse:data:"); + 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_nhp99d = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); + 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_nhp99d = 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_storagePolicy = objc.registerName("storagePolicy"); -final _objc_msgSend_1xh4qg4 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1xh4qg4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, 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); + {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.ref.pointer, retain: true, release: true); + NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } /// initWithResponse:data: - NSCachedURLResponse initWithResponse_data_(NSURLResponse response, objc.NSData data) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithResponse_data_, response.ref.pointer, data.ref.pointer); - return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); + NSCachedURLResponse initWithResponse_data_( + NSURLResponse response, objc.NSData data) { + final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), + _sel_initWithResponse_data_, response.ref.pointer, data.ref.pointer); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, 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_nhp99d(this.ref.retainAndReturnPointer(), _sel_initWithResponse_data_userInfo_storagePolicy_, response.ref.pointer, data.ref.pointer, userInfo?.ref.pointer ?? ffi.nullptr, storagePolicy.value); - return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse response, + objc.NSData data, + objc.NSDictionary? userInfo, + NSURLCacheStoragePolicy storagePolicy) { + final _ret = _objc_msgSend_nhp99d( + this.ref.retainAndReturnPointer(), + _sel_initWithResponse_data_userInfo_storagePolicy_, + response.ref.pointer, + data.ref.pointer, + userInfo?.ref.pointer ?? ffi.nullptr, + storagePolicy.value); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } /// response @@ -16122,7 +24941,9 @@ class NSCachedURLResponse extends objc.NSObject { /// userInfo objc.NSDictionary? get userInfo { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// storagePolicy @@ -16133,124 +24954,157 @@ class NSCachedURLResponse extends objc.NSObject { /// init NSCachedURLResponse init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } /// new static NSCachedURLResponse new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_new); - return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); - return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSCachedURLResponse, _sel_allocWithZone_, zone); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSCachedURLResponse alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_alloc); - return NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSCachedURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSCachedURLResponse, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSCachedURLResponse, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSCachedURLResponse, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSCachedURLResponse, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSCachedURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSCachedURLResponse, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSCachedURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSCachedURLResponse, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSCachedURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSCachedURLResponse self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } /// retain NSCachedURLResponse retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSCachedURLResponse autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSCachedURLResponse, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSCachedURLResponse, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSCachedURLResponse? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSCachedURLResponse.castFromPointer(_ret, retain: false, release: true); - } -} - -late final _sel_cachedResponseForRequest_ = objc.registerName("cachedResponseForRequest:"); -late final _sel_storeCachedResponse_forRequest_ = objc.registerName("storeCachedResponse:forRequest:"); -late final _sel_removeCachedResponseForRequest_ = objc.registerName("removeCachedResponseForRequest:"); -late final _sel_removeAllCachedResponses = objc.registerName("removeAllCachedResponses"); -late final _sel_removeCachedResponsesSinceDate_ = objc.registerName("removeCachedResponsesSinceDate:"); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _sel_cachedResponseForRequest_ = + objc.registerName("cachedResponseForRequest:"); +late final _sel_storeCachedResponse_forRequest_ = + objc.registerName("storeCachedResponse:forRequest:"); +late final _sel_removeCachedResponseForRequest_ = + objc.registerName("removeCachedResponseForRequest:"); +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"); @@ -16262,162 +25116,232 @@ late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); /// NSURLSessionDataTask class NSURLSessionDataTask extends NSURLSessionTask { NSURLSessionDataTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. - NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); } /// init NSURLSessionDataTask init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionDataTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLSessionDataTask new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_new); - return NSURLSessionDataTask.castFromPointer(_ret, retain: false, release: true); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionDataTask, _sel_allocWithZone_, zone); - return NSURLSessionDataTask.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLSessionDataTask alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_alloc); - return NSURLSessionDataTask.castFromPointer(_ret, retain: false, release: true); + return NSURLSessionDataTask.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_cqxsqq(_class_NSURLSessionDataTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionDataTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionDataTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionDataTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionDataTask, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionDataTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionDataTask, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionDataTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionDataTask, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionDataTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionDataTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionDataTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLSessionDataTask self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLSessionDataTask retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLSessionDataTask autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); - } -} - -late final _sel_storeCachedResponse_forDataTask_ = objc.registerName("storeCachedResponse:forDataTask:"); -void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_storeCachedResponse_forDataTask_ = + objc.registerName("storeCachedResponse:forDataTask:"); +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); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSCachedURLResponse { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSCachedURLResponse? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable, (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(NSCachedURLResponse?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -16428,43 +25352,60 @@ abstract final class ObjCBlock_ffiVoid_NSCachedURLResponse { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(NSCachedURLResponse? ) fn) { + static objc.ObjCBlock listener( + void Function(NSCachedURLResponse?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSCachedURLResponse.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSCachedURLResponse_CallExtension on objc.ObjCBlock { - void call(NSCachedURLResponse? arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_getCachedResponseForDataTask_completionHandler_ = objc.registerName("getCachedResponseForDataTask:completionHandler:"); -late final _sel_removeCachedResponseForDataTask_ = objc.registerName("removeCachedResponseForDataTask:"); +extension ObjCBlock_ffiVoid_NSCachedURLResponse_CallExtension + on objc.ObjCBlock { + void call(NSCachedURLResponse? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_getCachedResponseForDataTask_completionHandler_ = + objc.registerName("getCachedResponseForDataTask:completionHandler:"); +late final _sel_removeCachedResponseForDataTask_ = + objc.registerName("removeCachedResponseForDataTask:"); /// NSURLCache class NSURLCache extends objc.NSObject { NSURLCache._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLCache.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCache); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCache); } /// sharedURLCache @@ -16475,109 +25416,135 @@ class NSURLCache extends objc.NSObject { /// setSharedURLCache: static void setSharedURLCache(NSURLCache value) { - return _objc_msgSend_ukcdfq(_class_NSURLCache, _sel_setSharedURLCache_, value.ref.pointer); - + return _objc_msgSend_ukcdfq( + _class_NSURLCache, _sel_setSharedURLCache_, value.ref.pointer); } /// initWithMemoryCapacity:diskCapacity:diskPath: - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_(int memoryCapacity, int diskCapacity, objc.NSString? path) { - final _ret = _objc_msgSend_ebb7er(this.ref.retainAndReturnPointer(), _sel_initWithMemoryCapacity_diskCapacity_diskPath_, memoryCapacity, diskCapacity, path?.ref.pointer ?? ffi.nullptr); + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, objc.NSString? path) { + final _ret = _objc_msgSend_ebb7er( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.ref.pointer ?? ffi.nullptr); return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// initWithMemoryCapacity:diskCapacity:directoryURL: - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_(int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { - final _ret = _objc_msgSend_ebb7er(this.ref.retainAndReturnPointer(), _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, memoryCapacity, diskCapacity, directoryURL?.ref.pointer ?? ffi.nullptr); + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_ebb7er( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.ref.pointer ?? ffi.nullptr); return NSURLCache.castFromPointer(_ret, retain: false, release: true); } /// cachedResponseForRequest: NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_cachedResponseForRequest_, request.ref.pointer); - return _ret.address == 0 ? null : NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_cachedResponseForRequest_, request.ref.pointer); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } /// storeCachedResponse:forRequest: - void storeCachedResponse_forRequest_(NSCachedURLResponse cachedResponse, NSURLRequest request) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_storeCachedResponse_forRequest_, cachedResponse.ref.pointer, request.ref.pointer); - + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_storeCachedResponse_forRequest_, + cachedResponse.ref.pointer, + request.ref.pointer); } /// removeCachedResponseForRequest: void removeCachedResponseForRequest_(NSURLRequest request) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForRequest_, request.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForRequest_, + request.ref.pointer); } /// removeAllCachedResponses void removeAllCachedResponses() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_removeAllCachedResponses); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_removeAllCachedResponses); } /// removeCachedResponsesSinceDate: void removeCachedResponsesSinceDate_(objc.NSDate date) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponsesSinceDate_, date.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponsesSinceDate_, + date.ref.pointer); } /// memoryCapacity int get memoryCapacity { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_memoryCapacity); - } /// setMemoryCapacity: - set memoryCapacity(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setMemoryCapacity_, value); - + set memoryCapacity(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMemoryCapacity_, value); } /// diskCapacity int get diskCapacity { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_diskCapacity); - } /// setDiskCapacity: - set diskCapacity(int value) { - return _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_setDiskCapacity_, value); - + set diskCapacity(int value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setDiskCapacity_, value); } /// currentMemoryUsage int get currentMemoryUsage { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentMemoryUsage); - } /// currentDiskUsage int get currentDiskUsage { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentDiskUsage); - } /// storeCachedResponse:forDataTask: - void storeCachedResponse_forDataTask_(NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_storeCachedResponse_forDataTask_, cachedResponse.ref.pointer, dataTask.ref.pointer); - + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_storeCachedResponse_forDataTask_, + cachedResponse.ref.pointer, + dataTask.ref.pointer); } /// getCachedResponseForDataTask:completionHandler: - void getCachedResponseForDataTask_completionHandler_(NSURLSessionDataTask dataTask, objc.ObjCBlock completionHandler) { -_objc_msgSend_cmbt6k(this.ref.pointer, _sel_getCachedResponseForDataTask_completionHandler_, dataTask.ref.pointer, completionHandler.ref.pointer); - + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.ref.pointer, + completionHandler.ref.pointer); } /// removeCachedResponseForDataTask: void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForDataTask_, dataTask.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_removeCachedResponseForDataTask_, dataTask.ref.pointer); } /// init NSURLCache init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLCache.castFromPointer(_ret, retain: false, release: true); } @@ -16589,7 +25556,8 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForDataTask_, da /// allocWithZone: static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLCache, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLCache, _sel_allocWithZone_, zone); return NSURLCache.castFromPointer(_ret, retain: false, release: true); } @@ -16600,56 +25568,70 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForDataTask_, da } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLCache, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLCache, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLCache, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLCache, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSURLCache, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLCache, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLCache, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLCache, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLCache, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLCache, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLCache, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCache, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -16673,54 +25655,156 @@ _objc_msgSend_1tjlcwl(_class_NSURLCache, _sel_setKeys_triggerChangeNotifications } late final _class_NSURLConnection = objc.getClass("NSURLConnection"); -late final _sel_initWithRequest_delegate_startImmediately_ = objc.registerName("initWithRequest:delegate:startImmediately:"); -final _objc_msgSend_at5jtv = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Bool )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , bool )>(); -late final _sel_initWithRequest_delegate_ = objc.registerName("initWithRequest:delegate:"); -late final _sel_connectionWithRequest_delegate_ = objc.registerName("connectionWithRequest:delegate:"); -late final _sel_unscheduleFromRunLoop_forMode_ = objc.registerName("unscheduleFromRunLoop:forMode:"); +late final _sel_initWithRequest_delegate_startImmediately_ = + objc.registerName("initWithRequest:delegate:startImmediately:"); +final _objc_msgSend_at5jtv = 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:"); +late final _sel_connectionWithRequest_delegate_ = + objc.registerName("connectionWithRequest:delegate:"); +late final _sel_unscheduleFromRunLoop_forMode_ = + objc.registerName("unscheduleFromRunLoop:forMode:"); late final _sel_setDelegateQueue_ = objc.registerName("setDelegateQueue:"); late final _sel_canHandleRequest_ = objc.registerName("canHandleRequest:"); -late final _sel_sendSynchronousRequest_returningResponse_error_ = objc.registerName("sendSynchronousRequest:returningResponse:error:"); -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline ).cast(); -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); -ffi.Pointer _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerTrampoline(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); +late final _sel_sendSynchronousRequest_returningResponse_error_ = + objc.registerName("sendSynchronousRequest:returningResponse:error:"); +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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) + .cast(); +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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerTrampoline( + 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); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(NSURLResponse?, objc.NSData?, + objc.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. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSURLResponse? , objc.NSData? , objc.NSError? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureCallable, (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))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureCallable, + (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))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -16731,62 +25815,162 @@ abstract final class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(NSURLResponse? , objc.NSData? , objc.NSError? ) fn) { + static objc + .ObjCBlock + listener(void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerCallable.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))); + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_listenerCallable + .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))); final wrapper = _wrapListenerBlock_tenbla(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(NSURLResponse?, objc.NSData?, + objc.NSError?)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_CallExtension on objc.ObjCBlock { - void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr, arg2?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_sendAsynchronousRequest_queue_completionHandler_ = objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); -void _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); +extension ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_CallExtension on objc + .ObjCBlock { + void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => + ref.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)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_sendAsynchronousRequest_queue_completionHandler_ = + objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); +void _ObjCBlock_ffiVoid_objcObjCObject_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); +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock?, objc.NSError)>`. abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock?, objc.NSError)> castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock?, objc.NSError)>(pointer, retain: retain, release: release); + static objc + .ObjCBlock?, objc.NSError)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, + objc.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. - static objc.ObjCBlock?, objc.NSError)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock?, objc.NSError)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock?, objc.NSError)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock?, objc.NSError)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock?, objc.NSError)> fromFunction(void Function(objc.ObjCObjectBase? , objc.NSError ) fn) => - objc.ObjCBlock?, objc.NSError)>(objc.newClosureBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: true, release: true), objc.NSError.castFromPointer(arg1, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock?, objc.NSError)> fromFunction( + void Function(objc.ObjCObjectBase?, objc.NSError) fn) => + objc.ObjCBlock?, objc.NSError)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -16797,60 +25981,126 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock?, objc.NSError)> listener(void Function(objc.ObjCObjectBase? , objc.NSError ) fn) { + static objc + .ObjCBlock?, objc.NSError)> + listener(void Function(objc.ObjCObjectBase?, objc.NSError) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), objc.NSError.castFromPointer(arg1, retain: false, release: true))); + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: false, release: true), + objc.NSError.castFromPointer(arg1, + retain: false, release: true))); final wrapper = _wrapListenerBlock_1tjlcwl(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock?, objc.NSError)>(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, + objc.NSError)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock?, objc.NSError)>`. -extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc.ObjCBlock?, objc.NSError)> { - void call(objc.ObjCObjectBase? arg0, objc.NSError arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.ref.pointer); -} - -final _objc_msgSend_10t0qpd = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); +extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc + .ObjCBlock?, objc.NSError)> { + void call(objc.ObjCObjectBase? arg0, objc.NSError arg1) => + ref.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)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.ref.pointer); +} + +final _objc_msgSend_10t0qpd = 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)>(); /// NSURLConnection class NSURLConnection extends objc.NSObject { NSURLConnection._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLConnection); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLConnection); } /// initWithRequest:delegate:startImmediately: - NSURLConnection? initWithRequest_delegate_startImmediately_(NSURLRequest request, objc.ObjCObjectBase? delegate, bool startImmediately) { - final _ret = _objc_msgSend_at5jtv(this.ref.retainAndReturnPointer(), _sel_initWithRequest_delegate_startImmediately_, request.ref.pointer, delegate?.ref.pointer ?? ffi.nullptr, startImmediately); - return _ret.address == 0 ? null : NSURLConnection.castFromPointer(_ret, retain: false, release: true); + NSURLConnection? initWithRequest_delegate_startImmediately_( + NSURLRequest request, + objc.ObjCObjectBase? delegate, + bool startImmediately) { + final _ret = _objc_msgSend_at5jtv( + this.ref.retainAndReturnPointer(), + _sel_initWithRequest_delegate_startImmediately_, + request.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr, + startImmediately); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: false, release: true); } /// initWithRequest:delegate: - NSURLConnection? initWithRequest_delegate_(NSURLRequest request, objc.ObjCObjectBase? delegate) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithRequest_delegate_, request.ref.pointer, delegate?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSURLConnection.castFromPointer(_ret, retain: false, release: true); + NSURLConnection? initWithRequest_delegate_( + NSURLRequest request, objc.ObjCObjectBase? delegate) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithRequest_delegate_, + request.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: false, release: true); } /// connectionWithRequest:delegate: - static NSURLConnection? connectionWithRequest_delegate_(NSURLRequest request, objc.ObjCObjectBase? delegate) { - final _ret = _objc_msgSend_iq11qg(_class_NSURLConnection, _sel_connectionWithRequest_delegate_, request.ref.pointer, delegate?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSURLConnection.castFromPointer(_ret, retain: true, release: true); + static NSURLConnection? connectionWithRequest_delegate_( + NSURLRequest request, objc.ObjCObjectBase? delegate) { + final _ret = _objc_msgSend_iq11qg( + _class_NSURLConnection, + _sel_connectionWithRequest_delegate_, + request.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } /// originalRequest @@ -16867,55 +26117,74 @@ class NSURLConnection extends objc.NSObject { /// start void start() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_start); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_start); } /// cancel void cancel() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } /// scheduleInRunLoop:forMode: void scheduleInRunLoop_forMode_(objc.NSRunLoop aRunLoop, objc.NSString mode) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, aRunLoop.ref.pointer, mode.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } /// unscheduleFromRunLoop:forMode: - void unscheduleFromRunLoop_forMode_(objc.NSRunLoop aRunLoop, objc.NSString mode) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_unscheduleFromRunLoop_forMode_, aRunLoop.ref.pointer, mode.ref.pointer); - + void unscheduleFromRunLoop_forMode_( + objc.NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_unscheduleFromRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } /// setDelegateQueue: void setDelegateQueue_(NSOperationQueue? queue) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegateQueue_, queue?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegateQueue_, + queue?.ref.pointer ?? ffi.nullptr); } /// canHandleRequest: static bool canHandleRequest_(NSURLRequest request) { - return _objc_msgSend_l8lotg(_class_NSURLConnection, _sel_canHandleRequest_, request.ref.pointer); - + return _objc_msgSend_l8lotg( + _class_NSURLConnection, _sel_canHandleRequest_, request.ref.pointer); } /// sendSynchronousRequest:returningResponse:error: - static objc.NSData? sendSynchronousRequest_returningResponse_error_(NSURLRequest request, ffi.Pointer> response, ffi.Pointer> error) { - final _ret = _objc_msgSend_1dca44n(_class_NSURLConnection, _sel_sendSynchronousRequest_returningResponse_error_, request.ref.pointer, response, error); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + static objc.NSData? sendSynchronousRequest_returningResponse_error_( + NSURLRequest request, + ffi.Pointer> response, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1dca44n( + _class_NSURLConnection, + _sel_sendSynchronousRequest_returningResponse_error_, + request.ref.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, objc.ObjCBlock handler) { -_objc_msgSend_10t0qpd(_class_NSURLConnection, _sel_sendAsynchronousRequest_queue_completionHandler_, request.ref.pointer, queue.ref.pointer, handler.ref.pointer); - + static void sendAsynchronousRequest_queue_completionHandler_( + NSURLRequest request, + NSOperationQueue queue, + objc.ObjCBlock< + ffi.Void Function(NSURLResponse?, objc.NSData?, objc.NSError?)> + handler) { + _objc_msgSend_10t0qpd( + _class_NSURLConnection, + _sel_sendAsynchronousRequest_queue_completionHandler_, + request.ref.pointer, + queue.ref.pointer, + handler.ref.pointer); } /// init NSURLConnection init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } @@ -16927,7 +26196,8 @@ _objc_msgSend_10t0qpd(_class_NSURLConnection, _sel_sendAsynchronousRequest_queue /// allocWithZone: static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLConnection, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLConnection, _sel_allocWithZone_, zone); return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } @@ -16938,56 +26208,70 @@ _objc_msgSend_10t0qpd(_class_NSURLConnection, _sel_sendAsynchronousRequest_queue } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLConnection, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLConnection, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLConnection, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSURLConnection, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLConnection, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLConnection, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLConnection, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLConnection, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLConnection, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLConnection, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -17011,69 +26295,124 @@ _objc_msgSend_1tjlcwl(_class_NSURLConnection, _sel_setKeys_triggerChangeNotifica } 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"), - }; - + 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_1dwdxi1 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_initWithUser_password_persistence_ = objc.registerName("initWithUser:password:persistence:"); -final _objc_msgSend_nwxkj = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_credentialWithUser_password_persistence_ = objc.registerName("credentialWithUser:password:persistence:"); +final _objc_msgSend_1dwdxi1 = 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_nwxkj = 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:"); 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_1lfx01 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer<__SecIdentity> , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , ffi.Pointer<__SecIdentity> , ffi.Pointer , int )>(); -late final _sel_credentialWithIdentity_certificates_persistence_ = objc.registerName("credentialWithIdentity:certificates:persistence:"); +final class __SecIdentity extends ffi.Opaque {} + +late final _sel_initWithIdentity_certificates_persistence_ = + objc.registerName("initWithIdentity:certificates:persistence:"); +final _objc_msgSend_1lfx01 = 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:"); late final _sel_identity = objc.registerName("identity"); -final _objc_msgSend_1dyqaf3 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1dyqaf3 = 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{ -} + +final class __SecTrust extends ffi.Opaque {} late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); -final _objc_msgSend_a2ucgd = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer<__SecTrust> )>>().asFunction , ffi.Pointer , ffi.Pointer<__SecTrust> )>(); +final _objc_msgSend_a2ucgd = 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:"); /// NSURLCredential class NSURLCredential extends objc.NSObject { NSURLCredential._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredential); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredential); } /// persistence @@ -17083,51 +26422,83 @@ class NSURLCredential extends objc.NSObject { } /// initWithUser:password:persistence: - NSURLCredential initWithUser_password_persistence_(objc.NSString user, objc.NSString password, NSURLCredentialPersistence persistence) { - final _ret = _objc_msgSend_nwxkj(this.ref.retainAndReturnPointer(), _sel_initWithUser_password_persistence_, user.ref.pointer, password.ref.pointer, persistence.value); + NSURLCredential initWithUser_password_persistence_(objc.NSString user, + objc.NSString password, NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_nwxkj( + this.ref.retainAndReturnPointer(), + _sel_initWithUser_password_persistence_, + user.ref.pointer, + password.ref.pointer, + persistence.value); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// credentialWithUser:password:persistence: - static NSURLCredential credentialWithUser_password_persistence_(objc.NSString user, objc.NSString password, NSURLCredentialPersistence persistence) { - final _ret = _objc_msgSend_nwxkj(_class_NSURLCredential, _sel_credentialWithUser_password_persistence_, user.ref.pointer, password.ref.pointer, persistence.value); + static NSURLCredential credentialWithUser_password_persistence_( + objc.NSString user, + objc.NSString password, + NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_nwxkj( + _class_NSURLCredential, + _sel_credentialWithUser_password_persistence_, + user.ref.pointer, + password.ref.pointer, + persistence.value); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// user objc.NSString? get user { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_user); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// password objc.NSString? get password { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_password); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// hasPassword bool get hasPassword { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_hasPassword); - } /// initWithIdentity:certificates:persistence: - NSURLCredential initWithIdentity_certificates_persistence_(ffi.Pointer<__SecIdentity> identity, objc.NSArray? certArray, NSURLCredentialPersistence persistence) { - final _ret = _objc_msgSend_1lfx01(this.ref.retainAndReturnPointer(), _sel_initWithIdentity_certificates_persistence_, identity, certArray?.ref.pointer ?? ffi.nullptr, persistence.value); + NSURLCredential initWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_1lfx01( + this.ref.retainAndReturnPointer(), + _sel_initWithIdentity_certificates_persistence_, + identity, + certArray?.ref.pointer ?? ffi.nullptr, + persistence.value); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// credentialWithIdentity:certificates:persistence: - static NSURLCredential credentialWithIdentity_certificates_persistence_(ffi.Pointer<__SecIdentity> identity, objc.NSArray? certArray, NSURLCredentialPersistence persistence) { - final _ret = _objc_msgSend_1lfx01(_class_NSURLCredential, _sel_credentialWithIdentity_certificates_persistence_, identity, certArray?.ref.pointer ?? ffi.nullptr, persistence.value); + static NSURLCredential credentialWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + NSURLCredentialPersistence persistence) { + final _ret = _objc_msgSend_1lfx01( + _class_NSURLCredential, + _sel_credentialWithIdentity_certificates_persistence_, + identity, + certArray?.ref.pointer ?? ffi.nullptr, + persistence.value); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// identity ffi.Pointer<__SecIdentity> get identity { return _objc_msgSend_1dyqaf3(this.ref.pointer, _sel_identity); - } /// certificates @@ -17138,19 +26509,22 @@ class NSURLCredential extends objc.NSObject { /// initWithTrust: NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_a2ucgd(this.ref.retainAndReturnPointer(), _sel_initWithTrust_, trust); + final _ret = _objc_msgSend_a2ucgd( + this.ref.retainAndReturnPointer(), _sel_initWithTrust_, trust); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } /// credentialForTrust: static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_a2ucgd(_class_NSURLCredential, _sel_credentialForTrust_, trust); + final _ret = _objc_msgSend_a2ucgd( + _class_NSURLCredential, _sel_credentialForTrust_, trust); return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// init NSURLCredential init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } @@ -17162,7 +26536,8 @@ class NSURLCredential extends objc.NSObject { /// allocWithZone: static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLCredential, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLCredential, _sel_allocWithZone_, zone); return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } @@ -17173,56 +26548,70 @@ class NSURLCredential extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLCredential, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLCredential, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLCredential, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSURLCredential, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLCredential, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLCredential, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLCredential, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLCredential, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLCredential, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLCredential, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredential, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredential, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -17246,86 +26635,146 @@ _objc_msgSend_1tjlcwl(_class_NSURLCredential, _sel_setKeys_triggerChangeNotifica /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSURLCredential, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSURLCredential, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSURLCredential? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSURLCredential.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLCredential.castFromPointer(_ret, retain: false, 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_sfgdlr = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Long , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , 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_initWithHost_port_protocol_realm_authenticationMethod_ = + objc.registerName("initWithHost:port:protocol:realm:authenticationMethod:"); +final _objc_msgSend_sfgdlr = 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_receivesCredentialSecurely = + objc.registerName("receivesCredentialSecurely"); 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_authenticationMethod = + objc.registerName("authenticationMethod"); late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); late final _sel_serverTrust = objc.registerName("serverTrust"); -final _objc_msgSend_uv0l05 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_uv0l05 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__SecTrust> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__SecTrust> Function( + ffi.Pointer, ffi.Pointer)>(); /// NSURLProtectionSpace class NSURLProtectionSpace extends objc.NSObject { NSURLProtectionSpace._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLProtectionSpace.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); + return _objc_msgSend_l8lotg( + obj.ref.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_sfgdlr(this.ref.retainAndReturnPointer(), _sel_initWithHost_port_protocol_realm_authenticationMethod_, host.ref.pointer, port, protocol?.ref.pointer ?? ffi.nullptr, realm?.ref.pointer ?? ffi.nullptr, authenticationMethod?.ref.pointer ?? ffi.nullptr); - return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); + NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? protocol, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_sfgdlr( + this.ref.retainAndReturnPointer(), + _sel_initWithHost_port_protocol_realm_authenticationMethod_, + host.ref.pointer, + port, + protocol?.ref.pointer ?? ffi.nullptr, + realm?.ref.pointer ?? ffi.nullptr, + authenticationMethod?.ref.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, 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_sfgdlr(this.ref.retainAndReturnPointer(), _sel_initWithProxyHost_port_type_realm_authenticationMethod_, host.ref.pointer, port, type?.ref.pointer ?? ffi.nullptr, realm?.ref.pointer ?? ffi.nullptr, authenticationMethod?.ref.pointer ?? ffi.nullptr); - return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); + NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? type, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_sfgdlr( + this.ref.retainAndReturnPointer(), + _sel_initWithProxyHost_port_type_realm_authenticationMethod_, + host.ref.pointer, + port, + type?.ref.pointer ?? ffi.nullptr, + realm?.ref.pointer ?? ffi.nullptr, + authenticationMethod?.ref.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } /// realm objc.NSString? get realm { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_realm); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// receivesCredentialSecurely bool get receivesCredentialSecurely { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_receivesCredentialSecurely); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_receivesCredentialSecurely); } /// isProxy bool get isProxy { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isProxy); - } /// host @@ -17337,203 +26786,289 @@ class NSURLProtectionSpace extends objc.NSObject { /// port int get port { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_port); - } /// proxyType objc.NSString? get proxyType { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_proxyType); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// protocol objc.NSString? get protocol { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_protocol); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// authenticationMethod objc.NSString get authenticationMethod { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_authenticationMethod); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_authenticationMethod); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// distinguishedNames objc.NSArray? get distinguishedNames { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_distinguishedNames); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_uv0l05(this.ref.pointer, _sel_serverTrust); - } /// init NSURLProtectionSpace init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLProtectionSpace new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtectionSpace, _sel_new); - return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLProtectionSpace, _sel_allocWithZone_, zone); - return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLProtectionSpace, _sel_allocWithZone_, zone); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLProtectionSpace alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtectionSpace, _sel_alloc); - return NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSURLProtectionSpace, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLProtectionSpace, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLProtectionSpace, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLProtectionSpace, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLProtectionSpace, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLProtectionSpace, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLProtectionSpace, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLProtectionSpace, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLProtectionSpace, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLProtectionSpace, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLProtectionSpace self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLProtectionSpace.castFromPointer(_ret, retain: true, release: true); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLProtectionSpace retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLProtectionSpace.castFromPointer(_ret, retain: true, release: true); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLProtectionSpace autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLProtectionSpace.castFromPointer(_ret, retain: true, release: true); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSURLProtectionSpace, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSURLProtectionSpace, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSURLProtectionSpace? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSURLProtectionSpace.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } } -late final _class_NSURLCredentialStorage = objc.getClass("NSURLCredentialStorage"); -late final _sel_sharedCredentialStorage = objc.registerName("sharedCredentialStorage"); -late final _sel_credentialsForProtectionSpace_ = objc.registerName("credentialsForProtectionSpace:"); +late final _class_NSURLCredentialStorage = + objc.getClass("NSURLCredentialStorage"); +late final _sel_sharedCredentialStorage = + objc.registerName("sharedCredentialStorage"); +late final _sel_credentialsForProtectionSpace_ = + objc.registerName("credentialsForProtectionSpace:"); late final _sel_allCredentials = objc.registerName("allCredentials"); -late final _sel_setCredential_forProtectionSpace_ = objc.registerName("setCredential:forProtectionSpace:"); -late final _sel_removeCredential_forProtectionSpace_ = objc.registerName("removeCredential:forProtectionSpace:"); -late final _sel_removeCredential_forProtectionSpace_options_ = objc.registerName("removeCredential:forProtectionSpace:options:"); -late final _sel_defaultCredentialForProtectionSpace_ = objc.registerName("defaultCredentialForProtectionSpace:"); -late final _sel_setDefaultCredential_forProtectionSpace_ = objc.registerName("setDefaultCredential:forProtectionSpace:"); -void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSDictionary_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSDictionary_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +late final _sel_setCredential_forProtectionSpace_ = + objc.registerName("setCredential:forProtectionSpace:"); +late final _sel_removeCredential_forProtectionSpace_ = + objc.registerName("removeCredential:forProtectionSpace:"); +late final _sel_removeCredential_forProtectionSpace_options_ = + objc.registerName("removeCredential:forProtectionSpace:options:"); +late final _sel_defaultCredentialForProtectionSpace_ = + objc.registerName("defaultCredentialForProtectionSpace:"); +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); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSDictionary_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSDictionary_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSDictionary_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSDictionary_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSDictionary { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSDictionary_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSDictionary? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSDictionary_closureCallable, (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSDictionary?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSDictionary_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -17544,65 +27079,143 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSDictionary? ) fn) { + static objc.ObjCBlock listener( + void Function(objc.NSDictionary?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSDictionary_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSDictionary.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSDictionary_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, + retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSDictionary_CallExtension on objc.ObjCBlock { - void call(objc.NSDictionary? arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc.registerName("getCredentialsForProtectionSpace:task:completionHandler:"); -late final _sel_setCredential_forProtectionSpace_task_ = objc.registerName("setCredential:forProtectionSpace:task:"); -late final _sel_removeCredential_forProtectionSpace_options_task_ = objc.registerName("removeCredential:forProtectionSpace:options:task:"); -final _objc_msgSend_19b8ge5 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction , 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 arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSURLCredential_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +extension ObjCBlock_ffiVoid_NSDictionary_CallExtension + on objc.ObjCBlock { + void call(objc.NSDictionary? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc + .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); +late final _sel_setCredential_forProtectionSpace_task_ = + objc.registerName("setCredential:forProtectionSpace:task:"); +late final _sel_removeCredential_forProtectionSpace_options_task_ = + objc.registerName("removeCredential:forProtectionSpace:options:task:"); +final _objc_msgSend_19b8ge5 = 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); +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLCredential_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSURLCredential_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSURLCredential_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLCredential_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLCredential_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSURLCredential { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLCredential_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSURLCredential? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSURLCredential_closureCallable, (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSURLCredential.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(NSURLCredential?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLCredential_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -17613,55 +27226,79 @@ abstract final class ObjCBlock_ffiVoid_NSURLCredential { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(NSURLCredential? ) fn) { + static objc.ObjCBlock listener( + void Function(NSURLCredential?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURLCredential_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : NSURLCredential.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSURLCredential_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, + retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURLCredential_CallExtension on objc.ObjCBlock { - void call(NSURLCredential? arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = objc.registerName("getDefaultCredentialForProtectionSpace:task:completionHandler:"); -late final _sel_setDefaultCredential_forProtectionSpace_task_ = objc.registerName("setDefaultCredential:forProtectionSpace:task:"); +extension ObjCBlock_ffiVoid_NSURLCredential_CallExtension + on objc.ObjCBlock { + void call(NSURLCredential? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = + objc.registerName( + "getDefaultCredentialForProtectionSpace:task:completionHandler:"); +late final _sel_setDefaultCredential_forProtectionSpace_task_ = + objc.registerName("setDefaultCredential:forProtectionSpace:task:"); /// NSURLCredentialStorage class NSURLCredentialStorage extends objc.NSObject { NSURLCredentialStorage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); } /// sharedCredentialStorage static NSURLCredentialStorage getSharedCredentialStorage() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredentialStorage, _sel_sharedCredentialStorage); - return NSURLCredentialStorage.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } /// credentialsForProtectionSpace: - objc.NSDictionary? credentialsForProtectionSpace_(NSURLProtectionSpace space) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_credentialsForProtectionSpace_, space.ref.pointer); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + objc.NSDictionary? credentialsForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_credentialsForProtectionSpace_, space.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// allCredentials @@ -17671,228 +27308,345 @@ class NSURLCredentialStorage extends objc.NSObject { } /// setCredential:forProtectionSpace: - void setCredential_forProtectionSpace_(NSURLCredential credential, NSURLProtectionSpace space) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setCredential_forProtectionSpace_, credential.ref.pointer, space.ref.pointer); - + void setCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_setCredential_forProtectionSpace_, + credential.ref.pointer, + space.ref.pointer); } /// removeCredential:forProtectionSpace: - void removeCredential_forProtectionSpace_(NSURLCredential credential, NSURLProtectionSpace space) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeCredential_forProtectionSpace_, credential.ref.pointer, space.ref.pointer); - + void removeCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_removeCredential_forProtectionSpace_, + credential.ref.pointer, + space.ref.pointer); } /// removeCredential:forProtectionSpace:options: - void removeCredential_forProtectionSpace_options_(NSURLCredential credential, NSURLProtectionSpace space, objc.NSDictionary? options) { -_objc_msgSend_tenbla(this.ref.pointer, _sel_removeCredential_forProtectionSpace_options_, credential.ref.pointer, space.ref.pointer, options?.ref.pointer ?? ffi.nullptr); - + void removeCredential_forProtectionSpace_options_(NSURLCredential credential, + NSURLProtectionSpace space, objc.NSDictionary? options) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_removeCredential_forProtectionSpace_options_, + credential.ref.pointer, + space.ref.pointer, + options?.ref.pointer ?? ffi.nullptr); } /// defaultCredentialForProtectionSpace: - NSURLCredential? defaultCredentialForProtectionSpace_(NSURLProtectionSpace space) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_defaultCredentialForProtectionSpace_, space.ref.pointer); - return _ret.address == 0 ? null : NSURLCredential.castFromPointer(_ret, retain: true, release: true); + NSURLCredential? defaultCredentialForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_defaultCredentialForProtectionSpace_, space.ref.pointer); + return _ret.address == 0 + ? null + : NSURLCredential.castFromPointer(_ret, retain: true, release: true); } /// setDefaultCredential:forProtectionSpace: - void setDefaultCredential_forProtectionSpace_(NSURLCredential credential, NSURLProtectionSpace space) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setDefaultCredential_forProtectionSpace_, credential.ref.pointer, space.ref.pointer); - + void setDefaultCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_setDefaultCredential_forProtectionSpace_, + credential.ref.pointer, + space.ref.pointer); } /// getCredentialsForProtectionSpace:task:completionHandler: - void getCredentialsForProtectionSpace_task_completionHandler_(NSURLProtectionSpace protectionSpace, NSURLSessionTask task, objc.ObjCBlock completionHandler) { -_objc_msgSend_10t0qpd(this.ref.pointer, _sel_getCredentialsForProtectionSpace_task_completionHandler_, protectionSpace.ref.pointer, task.ref.pointer, completionHandler.ref.pointer); - + void getCredentialsForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace protectionSpace, + NSURLSessionTask task, + objc.ObjCBlock completionHandler) { + _objc_msgSend_10t0qpd( + this.ref.pointer, + _sel_getCredentialsForProtectionSpace_task_completionHandler_, + protectionSpace.ref.pointer, + task.ref.pointer, + completionHandler.ref.pointer); } /// setCredential:forProtectionSpace:task: - void setCredential_forProtectionSpace_task_(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { -_objc_msgSend_tenbla(this.ref.pointer, _sel_setCredential_forProtectionSpace_task_, credential.ref.pointer, protectionSpace.ref.pointer, task.ref.pointer); - + void setCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_setCredential_forProtectionSpace_task_, + credential.ref.pointer, + protectionSpace.ref.pointer, + task.ref.pointer); } /// removeCredential:forProtectionSpace:options:task: - void removeCredential_forProtectionSpace_options_task_(NSURLCredential credential, NSURLProtectionSpace protectionSpace, objc.NSDictionary? options, NSURLSessionTask task) { -_objc_msgSend_19b8ge5(this.ref.pointer, _sel_removeCredential_forProtectionSpace_options_task_, credential.ref.pointer, protectionSpace.ref.pointer, options?.ref.pointer ?? ffi.nullptr, task.ref.pointer); - + void removeCredential_forProtectionSpace_options_task_( + NSURLCredential credential, + NSURLProtectionSpace protectionSpace, + objc.NSDictionary? options, + NSURLSessionTask task) { + _objc_msgSend_19b8ge5( + this.ref.pointer, + _sel_removeCredential_forProtectionSpace_options_task_, + credential.ref.pointer, + protectionSpace.ref.pointer, + options?.ref.pointer ?? ffi.nullptr, + task.ref.pointer); } /// getDefaultCredentialForProtectionSpace:task:completionHandler: - void getDefaultCredentialForProtectionSpace_task_completionHandler_(NSURLProtectionSpace space, NSURLSessionTask task, objc.ObjCBlock completionHandler) { -_objc_msgSend_10t0qpd(this.ref.pointer, _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, space.ref.pointer, task.ref.pointer, completionHandler.ref.pointer); - + void getDefaultCredentialForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace space, + NSURLSessionTask task, + objc.ObjCBlock completionHandler) { + _objc_msgSend_10t0qpd( + this.ref.pointer, + _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, + space.ref.pointer, + task.ref.pointer, + completionHandler.ref.pointer); } /// setDefaultCredential:forProtectionSpace:task: - void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { -_objc_msgSend_tenbla(this.ref.pointer, _sel_setDefaultCredential_forProtectionSpace_task_, credential.ref.pointer, protectionSpace.ref.pointer, task.ref.pointer); - + void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_setDefaultCredential_forProtectionSpace_task_, + credential.ref.pointer, + protectionSpace.ref.pointer, + task.ref.pointer); } /// init NSURLCredentialStorage init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLCredentialStorage.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLCredentialStorage new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredentialStorage, _sel_new); - return NSURLCredentialStorage.castFromPointer(_ret, retain: false, release: true); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLCredentialStorage, _sel_allocWithZone_, zone); - return NSURLCredentialStorage.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLCredentialStorage alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredentialStorage, _sel_alloc); - return NSURLCredentialStorage.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_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_cqxsqq(_class_NSURLCredentialStorage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLCredentialStorage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLCredentialStorage, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLCredentialStorage, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLCredentialStorage, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLCredentialStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLCredentialStorage, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLCredentialStorage, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLCredentialStorage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLCredentialStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLCredentialStorage self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLCredentialStorage.castFromPointer(_ret, retain: true, release: true); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLCredentialStorage retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLCredentialStorage.castFromPointer(_ret, retain: true, release: true); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLCredentialStorage autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLCredentialStorage.castFromPointer(_ret, retain: true, release: true); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } } late final _class_NSURLProtocol = objc.getClass("NSURLProtocol"); -late final _sel_initWithRequest_cachedResponse_client_ = objc.registerName("initWithRequest:cachedResponse:client:"); +late final _sel_initWithRequest_cachedResponse_client_ = + objc.registerName("initWithRequest:cachedResponse:client:"); late final _sel_client = objc.registerName("client"); late final _sel_request = objc.registerName("request"); late final _sel_cachedResponse = objc.registerName("cachedResponse"); late final _sel_canInitWithRequest_ = objc.registerName("canInitWithRequest:"); -late final _sel_canonicalRequestForRequest_ = objc.registerName("canonicalRequestForRequest:"); -late final _sel_requestIsCacheEquivalent_toRequest_ = objc.registerName("requestIsCacheEquivalent:toRequest:"); +late final _sel_canonicalRequestForRequest_ = + objc.registerName("canonicalRequestForRequest:"); +late final _sel_requestIsCacheEquivalent_toRequest_ = + objc.registerName("requestIsCacheEquivalent:toRequest:"); late final _sel_startLoading = objc.registerName("startLoading"); late final _sel_stopLoading = objc.registerName("stopLoading"); -late final _sel_propertyForKey_inRequest_ = objc.registerName("propertyForKey:inRequest:"); +late final _sel_propertyForKey_inRequest_ = + objc.registerName("propertyForKey:inRequest:"); late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); late final _sel_setURL_ = objc.registerName("setURL:"); late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); -final _objc_msgSend_12vaadl = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_12vaadl = 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_br89tg = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , 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_setNetworkServiceType_ = + objc.registerName("setNetworkServiceType:"); +final _objc_msgSend_br89tg = 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_1w8eyjo = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_setRequiresDNSSECValidation_ = objc.registerName("setRequiresDNSSECValidation:"); +final _objc_msgSend_1w8eyjo = 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:"); -late final _sel_setValue_forHTTPHeaderField_ = objc.registerName("setValue:forHTTPHeaderField:"); -late final _sel_addValue_forHTTPHeaderField_ = objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setAllHTTPHeaderFields_ = + objc.registerName("setAllHTTPHeaderFields:"); +late final _sel_setValue_forHTTPHeaderField_ = + objc.registerName("setValue:forHTTPHeaderField:"); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); -late final _sel_setHTTPShouldHandleCookies_ = objc.registerName("setHTTPShouldHandleCookies:"); -late final _sel_setHTTPShouldUsePipelining_ = objc.registerName("setHTTPShouldUsePipelining:"); +late final _sel_setHTTPShouldHandleCookies_ = + objc.registerName("setHTTPShouldHandleCookies:"); +late final _sel_setHTTPShouldUsePipelining_ = + objc.registerName("setHTTPShouldUsePipelining:"); /// NSMutableURLRequest class NSMutableURLRequest extends NSURLRequest { NSMutableURLRequest._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } /// URL objc.NSURL? get URL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setURL: - set URL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURL_, value?.ref.pointer ?? ffi.nullptr); - + set URL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURL_, value?.ref.pointer ?? ffi.nullptr); } /// cachePolicy @@ -17902,93 +27656,95 @@ class NSMutableURLRequest extends NSURLRequest { } /// setCachePolicy: - set cachePolicy(NSURLRequestCachePolicy value) { - return _objc_msgSend_12vaadl(this.ref.pointer, _sel_setCachePolicy_, value.value); - + set cachePolicy(NSURLRequestCachePolicy value) { + return _objc_msgSend_12vaadl( + this.ref.pointer, _sel_setCachePolicy_, value.value); } /// timeoutInterval double get timeoutInterval { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutInterval) : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutInterval) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); } /// setTimeoutInterval: - set timeoutInterval(double value) { - return _objc_msgSend_suh039(this.ref.pointer, _sel_setTimeoutInterval_, value); - + set timeoutInterval(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutInterval_, value); } /// mainDocumentURL objc.NSURL? get mainDocumentURL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setMainDocumentURL: - set mainDocumentURL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMainDocumentURL_, value?.ref.pointer ?? ffi.nullptr); - + set mainDocumentURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMainDocumentURL_, + value?.ref.pointer ?? ffi.nullptr); } /// networkServiceType NSURLRequestNetworkServiceType get networkServiceType { - final _ret = _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// setNetworkServiceType: - set networkServiceType(NSURLRequestNetworkServiceType value) { - return _objc_msgSend_br89tg(this.ref.pointer, _sel_setNetworkServiceType_, value.value); - + set networkServiceType(NSURLRequestNetworkServiceType value) { + return _objc_msgSend_br89tg( + this.ref.pointer, _sel_setNetworkServiceType_, value.value); } /// allowsCellularAccess bool get allowsCellularAccess { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); - } /// setAllowsCellularAccess: - set allowsCellularAccess(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsCellularAccess_, value); - + set allowsCellularAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsCellularAccess_, value); } /// allowsExpensiveNetworkAccess bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsExpensiveNetworkAccess); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } /// setAllowsExpensiveNetworkAccess: - set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); - + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } /// allowsConstrainedNetworkAccess bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsConstrainedNetworkAccess); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } /// setAllowsConstrainedNetworkAccess: - set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); - + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } /// assumesHTTP3Capable bool get assumesHTTP3Capable { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); - } /// setAssumesHTTP3Capable: - set assumesHTTP3Capable(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAssumesHTTP3Capable_, value); - + set assumesHTTP3Capable(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAssumesHTTP3Capable_, value); } /// attribution @@ -17998,21 +27754,21 @@ class NSMutableURLRequest extends NSURLRequest { } /// setAttribution: - set attribution(NSURLRequestAttribution value) { - return _objc_msgSend_1w8eyjo(this.ref.pointer, _sel_setAttribution_, value.value); - + set attribution(NSURLRequestAttribution value) { + return _objc_msgSend_1w8eyjo( + this.ref.pointer, _sel_setAttribution_, value.value); } /// requiresDNSSECValidation bool get requiresDNSSECValidation { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_requiresDNSSECValidation); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } /// setRequiresDNSSECValidation: - set requiresDNSSECValidation(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); - + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); } /// HTTPMethod @@ -18022,255 +27778,319 @@ class NSMutableURLRequest extends NSURLRequest { } /// setHTTPMethod: - set HTTPMethod(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPMethod_, value.ref.pointer); - + set HTTPMethod(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setHTTPMethod_, value.ref.pointer); } /// allHTTPHeaderFields objc.NSDictionary? get allHTTPHeaderFields { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_ukcdfq(this.ref.pointer, _sel_setAllHTTPHeaderFields_, value?.ref.pointer ?? ffi.nullptr); - + set allHTTPHeaderFields(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAllHTTPHeaderFields_, + value?.ref.pointer ?? ffi.nullptr); } /// setValue:forHTTPHeaderField: void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setValue_forHTTPHeaderField_, value?.ref.pointer ?? ffi.nullptr, field.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setValue_forHTTPHeaderField_, + value?.ref.pointer ?? ffi.nullptr, field.ref.pointer); } /// addValue:forHTTPHeaderField: void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_addValue_forHTTPHeaderField_, value.ref.pointer, field.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_addValue_forHTTPHeaderField_, + value.ref.pointer, field.ref.pointer); } /// HTTPBody objc.NSData? get HTTPBody { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// setHTTPBody: - set HTTPBody(objc.NSData? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPBody_, value?.ref.pointer ?? ffi.nullptr); - + set HTTPBody(objc.NSData? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setHTTPBody_, value?.ref.pointer ?? ffi.nullptr); } /// HTTPBodyStream objc.NSInputStream? get HTTPBodyStream { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); - return _ret.address == 0 ? null : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// setHTTPBodyStream: - set HTTPBodyStream(objc.NSInputStream? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPBodyStream_, value?.ref.pointer ?? ffi.nullptr); - + set HTTPBodyStream(objc.NSInputStream? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPBodyStream_, + value?.ref.pointer ?? ffi.nullptr); } /// HTTPShouldHandleCookies bool get HTTPShouldHandleCookies { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); - } /// setHTTPShouldHandleCookies: - set HTTPShouldHandleCookies(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setHTTPShouldHandleCookies_, value); - + set HTTPShouldHandleCookies(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldHandleCookies_, value); } /// HTTPShouldUsePipelining bool get HTTPShouldUsePipelining { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); - } /// setHTTPShouldUsePipelining: - set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); - + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); } /// requestWithURL: static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7(_class_NSMutableURLRequest, _sel_requestWithURL_, URL.ref.pointer); - return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.ref.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSMutableURLRequest, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSMutableURLRequest, _sel_supportsSecureCoding); } /// requestWithURL:cachePolicy:timeoutInterval: - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_191svj(_class_NSMutableURLRequest, _sel_requestWithURL_cachePolicy_timeoutInterval_, URL.ref.pointer, cachePolicy.value, timeoutInterval); - return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, + double timeoutInterval) { + final _ret = _objc_msgSend_191svj( + _class_NSMutableURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } /// initWithURL: NSMutableURLRequest initWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); - return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } /// initWithURL:cachePolicy:timeoutInterval: - NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_191svj(this.ref.retainAndReturnPointer(), _sel_initWithURL_cachePolicy_timeoutInterval_, URL.ref.pointer, cachePolicy.value, timeoutInterval); - return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_191svj( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } /// init NSMutableURLRequest init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } /// new static NSMutableURLRequest new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_new); - return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); - return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSMutableURLRequest, _sel_allocWithZone_, zone); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSMutableURLRequest alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_alloc); - return NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); + 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_cqxsqq(_class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSMutableURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSMutableURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSMutableURLRequest, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSMutableURLRequest, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSMutableURLRequest, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSMutableURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSMutableURLRequest, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSMutableURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSMutableURLRequest, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSMutableURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSMutableURLRequest self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } /// retain NSMutableURLRequest retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSMutableURLRequest autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSMutableURLRequest.castFromPointer(_ret, retain: true, release: true); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } /// initWithCoder: NSMutableURLRequest? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSMutableURLRequest.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } } -late final _sel_setProperty_forKey_inRequest_ = objc.registerName("setProperty:forKey:inRequest:"); -late final _sel_removePropertyForKey_inRequest_ = objc.registerName("removePropertyForKey:inRequest:"); +late final _sel_setProperty_forKey_inRequest_ = + objc.registerName("setProperty:forKey:inRequest:"); +late final _sel_removePropertyForKey_inRequest_ = + objc.registerName("removePropertyForKey:inRequest:"); late final _sel_registerClass_ = objc.registerName("registerClass:"); late final _sel_unregisterClass_ = objc.registerName("unregisterClass:"); late final _sel_canInitWithTask_ = objc.registerName("canInitWithTask:"); -late final _sel_initWithTask_cachedResponse_client_ = objc.registerName("initWithTask:cachedResponse:client:"); +late final _sel_initWithTask_cachedResponse_client_ = + objc.registerName("initWithTask:cachedResponse:client:"); late final _sel_task = objc.registerName("task"); /// NSURLProtocol class NSURLProtocol extends objc.NSObject { NSURLProtocol._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSURLProtocol.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); } /// initWithRequest:cachedResponse:client: - NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { - final _ret = _objc_msgSend_aud7dn(this.ref.retainAndReturnPointer(), _sel_initWithRequest_cachedResponse_client_, request.ref.pointer, cachedResponse?.ref.pointer ?? ffi.nullptr, client?.ref.pointer ?? ffi.nullptr); + NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, + NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithRequest_cachedResponse_client_, + request.ref.pointer, + cachedResponse?.ref.pointer ?? ffi.nullptr, + client?.ref.pointer ?? ffi.nullptr); return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// client objc.ObjCObjectBase? get client { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_client); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// request @@ -18282,90 +28102,115 @@ class NSURLProtocol extends objc.NSObject { /// cachedResponse NSCachedURLResponse? get cachedResponse { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_cachedResponse); - return _ret.address == 0 ? null : NSCachedURLResponse.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } /// canInitWithRequest: static bool canInitWithRequest_(NSURLRequest request) { - return _objc_msgSend_l8lotg(_class_NSURLProtocol, _sel_canInitWithRequest_, request.ref.pointer); - + return _objc_msgSend_l8lotg( + _class_NSURLProtocol, _sel_canInitWithRequest_, request.ref.pointer); } /// canonicalRequestForRequest: static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7(_class_NSURLProtocol, _sel_canonicalRequestForRequest_, request.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLProtocol, + _sel_canonicalRequestForRequest_, request.ref.pointer); return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } /// requestIsCacheEquivalent:toRequest: - static bool requestIsCacheEquivalent_toRequest_(NSURLRequest a, NSURLRequest b) { - return _objc_msgSend_1ywe6ev(_class_NSURLProtocol, _sel_requestIsCacheEquivalent_toRequest_, a.ref.pointer, b.ref.pointer); - + static bool requestIsCacheEquivalent_toRequest_( + NSURLRequest a, NSURLRequest b) { + return _objc_msgSend_1ywe6ev(_class_NSURLProtocol, + _sel_requestIsCacheEquivalent_toRequest_, a.ref.pointer, b.ref.pointer); } /// startLoading void startLoading() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_startLoading); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_startLoading); } /// stopLoading void stopLoading() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_stopLoading); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopLoading); } /// propertyForKey:inRequest: - static objc.ObjCObjectBase? propertyForKey_inRequest_(objc.NSString key, NSURLRequest request) { - final _ret = _objc_msgSend_iq11qg(_class_NSURLProtocol, _sel_propertyForKey_inRequest_, key.ref.pointer, request.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + static objc.ObjCObjectBase? propertyForKey_inRequest_( + objc.NSString key, NSURLRequest request) { + final _ret = _objc_msgSend_iq11qg(_class_NSURLProtocol, + _sel_propertyForKey_inRequest_, key.ref.pointer, request.ref.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_tenbla(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, value.ref.pointer, key.ref.pointer, request.ref.pointer); - + static void setProperty_forKey_inRequest_(objc.ObjCObjectBase value, + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_tenbla( + _class_NSURLProtocol, + _sel_setProperty_forKey_inRequest_, + value.ref.pointer, + key.ref.pointer, + request.ref.pointer); } /// removePropertyForKey:inRequest: - static void removePropertyForKey_inRequest_(objc.NSString key, NSMutableURLRequest request) { -_objc_msgSend_1tjlcwl(_class_NSURLProtocol, _sel_removePropertyForKey_inRequest_, key.ref.pointer, request.ref.pointer); - + static void removePropertyForKey_inRequest_( + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_1tjlcwl( + _class_NSURLProtocol, + _sel_removePropertyForKey_inRequest_, + key.ref.pointer, + request.ref.pointer); } /// registerClass: static bool registerClass_(objc.ObjCObjectBase protocolClass) { - return _objc_msgSend_l8lotg(_class_NSURLProtocol, _sel_registerClass_, protocolClass.ref.pointer); - + return _objc_msgSend_l8lotg( + _class_NSURLProtocol, _sel_registerClass_, protocolClass.ref.pointer); } /// unregisterClass: static void unregisterClass_(objc.ObjCObjectBase protocolClass) { -_objc_msgSend_ukcdfq(_class_NSURLProtocol, _sel_unregisterClass_, protocolClass.ref.pointer); - + _objc_msgSend_ukcdfq( + _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.ref.pointer); } /// canInitWithTask: static bool canInitWithTask_(NSURLSessionTask task) { - return _objc_msgSend_l8lotg(_class_NSURLProtocol, _sel_canInitWithTask_, task.ref.pointer); - + return _objc_msgSend_l8lotg( + _class_NSURLProtocol, _sel_canInitWithTask_, task.ref.pointer); } /// initWithTask:cachedResponse:client: - NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { - final _ret = _objc_msgSend_aud7dn(this.ref.retainAndReturnPointer(), _sel_initWithTask_cachedResponse_client_, task.ref.pointer, cachedResponse?.ref.pointer ?? ffi.nullptr, client?.ref.pointer ?? ffi.nullptr); + NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, + NSCachedURLResponse? cachedResponse, objc.ObjCObjectBase? client) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithTask_cachedResponse_client_, + task.ref.pointer, + cachedResponse?.ref.pointer ?? ffi.nullptr, + client?.ref.pointer ?? ffi.nullptr); return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } /// task NSURLSessionTask? get task { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_task); - return _ret.address == 0 ? null : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } /// init NSURLProtocol init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } @@ -18377,7 +28222,8 @@ _objc_msgSend_ukcdfq(_class_NSURLProtocol, _sel_unregisterClass_, protocolClass. /// allocWithZone: static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLProtocol, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLProtocol, _sel_allocWithZone_, zone); return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } @@ -18388,56 +28234,70 @@ _objc_msgSend_ukcdfq(_class_NSURLProtocol, _sel_unregisterClass_, protocolClass. } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLProtocol, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLProtocol, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSURLProtocol, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLProtocol, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLProtocol, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLProtocol, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLProtocol, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLProtocol, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLProtocol, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLProtocol, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -18461,44 +28321,70 @@ _objc_msgSend_1tjlcwl(_class_NSURLProtocol, _sel_setKeys_triggerChangeNotificati } late final _class_NSXMLParser = objc.getClass("NSXMLParser"); -late final _sel_initWithContentsOfURL_ = objc.registerName("initWithContentsOfURL:"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); late final _sel_initWithData_ = objc.registerName("initWithData:"); late final _sel_initWithStream_ = objc.registerName("initWithStream:"); -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:"); +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_6drw9t = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setExternalEntityResolvingPolicy_ = objc.registerName("setExternalEntityResolvingPolicy:"); -final _objc_msgSend_1277g64 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_allowedExternalEntityURLs = objc.registerName("allowedExternalEntityURLs"); -late final _sel_setAllowedExternalEntityURLs_ = objc.registerName("setAllowedExternalEntityURLs:"); + 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_6drw9t = 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_1277g64 = 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"); +late final _sel_setAllowedExternalEntityURLs_ = + objc.registerName("setAllowedExternalEntityURLs:"); 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_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"); @@ -18507,159 +28393,173 @@ late final _sel_columnNumber = objc.registerName("columnNumber"); /// NSXMLParser class NSXMLParser extends objc.NSObject { NSXMLParser._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {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.ref.pointer, retain: true, release: true); + NSXMLParser.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.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); + {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_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLParser); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLParser); } /// initWithContentsOfURL: NSXMLParser? initWithContentsOfURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_, url.ref.pointer); - return _ret.address == 0 ? null : NSXMLParser.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// initWithData: NSXMLParser initWithData_(objc.NSData data) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithData_, data.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithData_, data.ref.pointer); return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// initWithStream: NSXMLParser initWithStream_(objc.NSInputStream stream) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithStream_, stream.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithStream_, stream.ref.pointer); return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); - + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } /// shouldProcessNamespaces bool get shouldProcessNamespaces { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_shouldProcessNamespaces); - } /// setShouldProcessNamespaces: - set shouldProcessNamespaces(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setShouldProcessNamespaces_, value); - + set shouldProcessNamespaces(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldProcessNamespaces_, value); } /// shouldReportNamespacePrefixes bool get shouldReportNamespacePrefixes { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_shouldReportNamespacePrefixes); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_shouldReportNamespacePrefixes); } /// setShouldReportNamespacePrefixes: - set shouldReportNamespacePrefixes(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setShouldReportNamespacePrefixes_, value); - + set shouldReportNamespacePrefixes(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldReportNamespacePrefixes_, value); } /// externalEntityResolvingPolicy NSXMLParserExternalEntityResolvingPolicy get externalEntityResolvingPolicy { - final _ret = _objc_msgSend_6drw9t(this.ref.pointer, _sel_externalEntityResolvingPolicy); + final _ret = _objc_msgSend_6drw9t( + this.ref.pointer, _sel_externalEntityResolvingPolicy); return NSXMLParserExternalEntityResolvingPolicy.fromValue(_ret); } /// setExternalEntityResolvingPolicy: - set externalEntityResolvingPolicy(NSXMLParserExternalEntityResolvingPolicy value) { - return _objc_msgSend_1277g64(this.ref.pointer, _sel_setExternalEntityResolvingPolicy_, value.value); - + set externalEntityResolvingPolicy( + NSXMLParserExternalEntityResolvingPolicy value) { + return _objc_msgSend_1277g64( + this.ref.pointer, _sel_setExternalEntityResolvingPolicy_, value.value); } /// allowedExternalEntityURLs objc.NSSet? get allowedExternalEntityURLs { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allowedExternalEntityURLs); - return _ret.address == 0 ? null : objc.NSSet.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.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_ukcdfq(this.ref.pointer, _sel_setAllowedExternalEntityURLs_, value?.ref.pointer ?? ffi.nullptr); - + set allowedExternalEntityURLs(objc.NSSet? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setAllowedExternalEntityURLs_, value?.ref.pointer ?? ffi.nullptr); } /// parse bool parse() { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_parse); - } /// abortParsing void abortParsing() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_abortParsing); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_abortParsing); } /// parserError objc.NSError? get parserError { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_parserError); - return _ret.address == 0 ? null : objc.NSError.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } /// shouldResolveExternalEntities bool get shouldResolveExternalEntities { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_shouldResolveExternalEntities); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_shouldResolveExternalEntities); } /// setShouldResolveExternalEntities: - set shouldResolveExternalEntities(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setShouldResolveExternalEntities_, value); - + set shouldResolveExternalEntities(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldResolveExternalEntities_, value); } /// publicID objc.NSString? get publicID { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_publicID); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// systemID objc.NSString? get systemID { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_systemID); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// lineNumber int get lineNumber { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_lineNumber); - } /// columnNumber int get columnNumber { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_columnNumber); - } /// init NSXMLParser init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } @@ -18671,7 +28571,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_abortParsing); /// allocWithZone: static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSXMLParser, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSXMLParser, _sel_allocWithZone_, zone); return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } @@ -18682,56 +28583,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_abortParsing); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSXMLParser, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSXMLParser, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSXMLParser, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSXMLParser, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLParser, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLParser, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSXMLParser, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSXMLParser, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSXMLParser, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSXMLParser, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSXMLParser, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSXMLParser, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -18755,172 +28670,278 @@ _objc_msgSend_1tjlcwl(_class_NSXMLParser, _sel_setKeys_triggerChangeNotification } late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); + enum NSFileWrapperReadingOptions { NSFileWrapperReadingImmediate(1), NSFileWrapperReadingWithoutMapping(2); - final int value; const NSFileWrapperReadingOptions(this.value); static NSFileWrapperReadingOptions fromValue(int value) => switch (value) { - 1 => NSFileWrapperReadingImmediate, - 2 => NSFileWrapperReadingWithoutMapping, - _ => throw ArgumentError("Unknown value for NSFileWrapperReadingOptions: $value"), - }; - -} - -late final _sel_initWithURL_options_error_ = objc.registerName("initWithURL:options:error:"); -final _objc_msgSend_g0dcla = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer> )>(); -late final _sel_initDirectoryWithFileWrappers_ = objc.registerName("initDirectoryWithFileWrappers:"); -late final _sel_initRegularFileWithContents_ = objc.registerName("initRegularFileWithContents:"); -late final _sel_initSymbolicLinkWithDestinationURL_ = objc.registerName("initSymbolicLinkWithDestinationURL:"); -late final _sel_initWithSerializedRepresentation_ = objc.registerName("initWithSerializedRepresentation:"); + 1 => NSFileWrapperReadingImmediate, + 2 => NSFileWrapperReadingWithoutMapping, + _ => throw ArgumentError( + "Unknown value for NSFileWrapperReadingOptions: $value"), + }; +} + +late final _sel_initWithURL_options_error_ = + objc.registerName("initWithURL:options:error:"); +final _objc_msgSend_g0dcla = 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_initDirectoryWithFileWrappers_ = + objc.registerName("initDirectoryWithFileWrappers:"); +late final _sel_initRegularFileWithContents_ = + objc.registerName("initRegularFileWithContents:"); +late final _sel_initSymbolicLinkWithDestinationURL_ = + objc.registerName("initSymbolicLinkWithDestinationURL:"); +late final _sel_initWithSerializedRepresentation_ = + objc.registerName("initWithSerializedRepresentation:"); late final _sel_isDirectory = objc.registerName("isDirectory"); late final _sel_isRegularFile = objc.registerName("isRegularFile"); late final _sel_isSymbolicLink = objc.registerName("isSymbolicLink"); late final _sel_preferredFilename = objc.registerName("preferredFilename"); -late final _sel_setPreferredFilename_ = objc.registerName("setPreferredFilename:"); +late final _sel_setPreferredFilename_ = + objc.registerName("setPreferredFilename:"); late final _sel_filename = objc.registerName("filename"); late final _sel_setFilename_ = objc.registerName("setFilename:"); late final _sel_fileAttributes = objc.registerName("fileAttributes"); late final _sel_setFileAttributes_ = objc.registerName("setFileAttributes:"); -late final _sel_matchesContentsOfURL_ = objc.registerName("matchesContentsOfURL:"); -late final _sel_readFromURL_options_error_ = objc.registerName("readFromURL:options:error:"); -final _objc_msgSend_138eppz = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer> )>(); +late final _sel_matchesContentsOfURL_ = + objc.registerName("matchesContentsOfURL:"); +late final _sel_readFromURL_options_error_ = + objc.registerName("readFromURL:options:error:"); +final _objc_msgSend_138eppz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + enum NSFileWrapperWritingOptions { NSFileWrapperWritingAtomic(1), NSFileWrapperWritingWithNameUpdating(2); - final int value; const NSFileWrapperWritingOptions(this.value); static NSFileWrapperWritingOptions fromValue(int value) => switch (value) { - 1 => NSFileWrapperWritingAtomic, - 2 => NSFileWrapperWritingWithNameUpdating, - _ => throw ArgumentError("Unknown value for NSFileWrapperWritingOptions: $value"), - }; - -} - -late final _sel_writeToURL_options_originalContentsURL_error_ = objc.registerName("writeToURL:options:originalContentsURL:error:"); -final _objc_msgSend_nrvb12 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_serializedRepresentation = objc.registerName("serializedRepresentation"); + 1 => NSFileWrapperWritingAtomic, + 2 => NSFileWrapperWritingWithNameUpdating, + _ => throw ArgumentError( + "Unknown value for NSFileWrapperWritingOptions: $value"), + }; +} + +late final _sel_writeToURL_options_originalContentsURL_error_ = + objc.registerName("writeToURL:options:originalContentsURL:error:"); +final _objc_msgSend_nrvb12 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_serializedRepresentation = + objc.registerName("serializedRepresentation"); late final _sel_addFileWrapper_ = objc.registerName("addFileWrapper:"); -late final _sel_addRegularFileWithContents_preferredFilename_ = objc.registerName("addRegularFileWithContents:preferredFilename:"); +late final _sel_addRegularFileWithContents_preferredFilename_ = + objc.registerName("addRegularFileWithContents:preferredFilename:"); late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); late final _sel_fileWrappers = objc.registerName("fileWrappers"); late final _sel_keyForFileWrapper_ = objc.registerName("keyForFileWrapper:"); late final _sel_regularFileContents = objc.registerName("regularFileContents"); -late final _sel_symbolicLinkDestinationURL = objc.registerName("symbolicLinkDestinationURL"); -late final _sel_initSymbolicLinkWithDestination_ = objc.registerName("initSymbolicLinkWithDestination:"); -late final _sel_needsToBeUpdatedFromPath_ = objc.registerName("needsToBeUpdatedFromPath:"); +late final _sel_symbolicLinkDestinationURL = + objc.registerName("symbolicLinkDestinationURL"); +late final _sel_initSymbolicLinkWithDestination_ = + objc.registerName("initSymbolicLinkWithDestination:"); +late final _sel_needsToBeUpdatedFromPath_ = + objc.registerName("needsToBeUpdatedFromPath:"); late final _sel_updateFromPath_ = objc.registerName("updateFromPath:"); -late final _sel_writeToFile_atomically_updateFilenames_ = objc.registerName("writeToFile:atomically:updateFilenames:"); -final _objc_msgSend_1vcrzki = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Bool , ffi.Bool )>>().asFunction , ffi.Pointer , ffi.Pointer , bool , bool )>(); +late final _sel_writeToFile_atomically_updateFilenames_ = + objc.registerName("writeToFile:atomically:updateFilenames:"); +final _objc_msgSend_1vcrzki = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + bool)>(); late final _sel_addFileWithPath_ = objc.registerName("addFileWithPath:"); -late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = objc.registerName("addSymbolicLinkWithDestination:preferredFilename:"); -late final _sel_symbolicLinkDestination = objc.registerName("symbolicLinkDestination"); +late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = + objc.registerName("addSymbolicLinkWithDestination:preferredFilename:"); +late final _sel_symbolicLinkDestination = + objc.registerName("symbolicLinkDestination"); /// NSFileWrapper class NSFileWrapper extends objc.NSObject { NSFileWrapper._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSFileWrapper] that points to the same underlying object as [other]. - NSFileWrapper.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSFileWrapper.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSFileWrapper] that wraps the given raw object pointer. NSFileWrapper.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSFileWrapper]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); } /// initWithURL:options:error: - NSFileWrapper? initWithURL_options_error_(objc.NSURL url, NSFileWrapperReadingOptions options, ffi.Pointer> outError) { - final _ret = _objc_msgSend_g0dcla(this.ref.retainAndReturnPointer(), _sel_initWithURL_options_error_, url.ref.pointer, options.value, outError); - return _ret.address == 0 ? null : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); + NSFileWrapper? initWithURL_options_error_( + objc.NSURL url, + NSFileWrapperReadingOptions options, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_g0dcla( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_options_error_, + url.ref.pointer, + options.value, + outError); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// initDirectoryWithFileWrappers: - NSFileWrapper initDirectoryWithFileWrappers_(objc.NSDictionary childrenByPreferredName) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.ref.pointer); + NSFileWrapper initDirectoryWithFileWrappers_( + objc.NSDictionary childrenByPreferredName) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), + _sel_initDirectoryWithFileWrappers_, + childrenByPreferredName.ref.pointer); return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// initRegularFileWithContents: NSFileWrapper initRegularFileWithContents_(objc.NSData contents) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initRegularFileWithContents_, contents.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initRegularFileWithContents_, contents.ref.pointer); return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// initSymbolicLinkWithDestinationURL: NSFileWrapper initSymbolicLinkWithDestinationURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initSymbolicLinkWithDestinationURL_, url.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initSymbolicLinkWithDestinationURL_, url.ref.pointer); return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// initWithSerializedRepresentation: - NSFileWrapper? initWithSerializedRepresentation_(objc.NSData serializeRepresentation) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithSerializedRepresentation_, serializeRepresentation.ref.pointer); - return _ret.address == 0 ? null : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); + NSFileWrapper? initWithSerializedRepresentation_( + objc.NSData serializeRepresentation) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), + _sel_initWithSerializedRepresentation_, + serializeRepresentation.ref.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSFileWrapper? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } /// isDirectory bool get directory { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDirectory); - } /// isRegularFile bool get regularFile { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isRegularFile); - } /// isSymbolicLink bool get symbolicLink { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSymbolicLink); - } /// preferredFilename objc.NSString? get preferredFilename { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredFilename); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_preferredFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPreferredFilename: - set preferredFilename(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPreferredFilename_, value?.ref.pointer ?? ffi.nullptr); - + set preferredFilename(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPreferredFilename_, + value?.ref.pointer ?? ffi.nullptr); } /// filename objc.NSString? get filename { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_filename); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setFilename: - set filename(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFilename_, value?.ref.pointer ?? ffi.nullptr); - + set filename(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFilename_, value?.ref.pointer ?? ffi.nullptr); } /// fileAttributes @@ -18930,128 +28951,181 @@ class NSFileWrapper extends objc.NSObject { } /// setFileAttributes: - set fileAttributes(objc.NSDictionary value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileAttributes_, value.ref.pointer); - + set fileAttributes(objc.NSDictionary value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFileAttributes_, value.ref.pointer); } /// matchesContentsOfURL: bool matchesContentsOfURL_(objc.NSURL url) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_matchesContentsOfURL_, url.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_matchesContentsOfURL_, url.ref.pointer); } /// readFromURL:options:error: - bool readFromURL_options_error_(objc.NSURL url, NSFileWrapperReadingOptions options, ffi.Pointer> outError) { - return _objc_msgSend_138eppz(this.ref.pointer, _sel_readFromURL_options_error_, url.ref.pointer, options.value, outError); - + bool readFromURL_options_error_( + objc.NSURL url, + NSFileWrapperReadingOptions options, + ffi.Pointer> outError) { + return _objc_msgSend_138eppz( + this.ref.pointer, + _sel_readFromURL_options_error_, + url.ref.pointer, + options.value, + outError); } /// writeToURL:options:originalContentsURL:error: - bool writeToURL_options_originalContentsURL_error_(objc.NSURL url, NSFileWrapperWritingOptions options, objc.NSURL? originalContentsURL, ffi.Pointer> outError) { - return _objc_msgSend_nrvb12(this.ref.pointer, _sel_writeToURL_options_originalContentsURL_error_, url.ref.pointer, options.value, originalContentsURL?.ref.pointer ?? ffi.nullptr, outError); - + bool writeToURL_options_originalContentsURL_error_( + objc.NSURL url, + NSFileWrapperWritingOptions options, + objc.NSURL? originalContentsURL, + ffi.Pointer> outError) { + return _objc_msgSend_nrvb12( + this.ref.pointer, + _sel_writeToURL_options_originalContentsURL_error_, + url.ref.pointer, + options.value, + originalContentsURL?.ref.pointer ?? ffi.nullptr, + outError); } /// serializedRepresentation objc.NSData? get serializedRepresentation { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_serializedRepresentation); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_serializedRepresentation); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// addFileWrapper: objc.NSString addFileWrapper_(NSFileWrapper child) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_addFileWrapper_, child.ref.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_addFileWrapper_, child.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// addRegularFileWithContents:preferredFilename: - objc.NSString addRegularFileWithContents_preferredFilename_(objc.NSData data, objc.NSString fileName) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_addRegularFileWithContents_preferredFilename_, data.ref.pointer, fileName.ref.pointer); + objc.NSString addRegularFileWithContents_preferredFilename_( + objc.NSData data, objc.NSString fileName) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_addRegularFileWithContents_preferredFilename_, + data.ref.pointer, + fileName.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// removeFileWrapper: void removeFileWrapper_(NSFileWrapper child) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeFileWrapper_, child.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeFileWrapper_, child.ref.pointer); } /// fileWrappers objc.NSDictionary? get fileWrappers { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileWrappers); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// keyForFileWrapper: objc.NSString? keyForFileWrapper_(NSFileWrapper child) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_keyForFileWrapper_, child.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_keyForFileWrapper_, child.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// regularFileContents objc.NSData? get regularFileContents { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_regularFileContents); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_regularFileContents); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// symbolicLinkDestinationURL objc.NSURL? get symbolicLinkDestinationURL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_symbolicLinkDestinationURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_symbolicLinkDestinationURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// initWithPath: objc.ObjCObjectBase? initWithPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithPath_, path.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithPath_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); } /// initSymbolicLinkWithDestination: objc.ObjCObjectBase initSymbolicLinkWithDestination_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initSymbolicLinkWithDestination_, path.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initSymbolicLinkWithDestination_, path.ref.pointer); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// needsToBeUpdatedFromPath: bool needsToBeUpdatedFromPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_needsToBeUpdatedFromPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_needsToBeUpdatedFromPath_, path.ref.pointer); } /// updateFromPath: bool updateFromPath_(objc.NSString path) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_updateFromPath_, path.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_updateFromPath_, path.ref.pointer); } /// writeToFile:atomically:updateFilenames: - bool writeToFile_atomically_updateFilenames_(objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { - return _objc_msgSend_1vcrzki(this.ref.pointer, _sel_writeToFile_atomically_updateFilenames_, path.ref.pointer, atomicFlag, updateFilenamesFlag); - + bool writeToFile_atomically_updateFilenames_( + objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { + return _objc_msgSend_1vcrzki( + this.ref.pointer, + _sel_writeToFile_atomically_updateFilenames_, + path.ref.pointer, + atomicFlag, + updateFilenamesFlag); } /// addFileWithPath: objc.NSString addFileWithPath_(objc.NSString path) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_addFileWithPath_, path.ref.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_addFileWithPath_, path.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// addSymbolicLinkWithDestination:preferredFilename: - objc.NSString addSymbolicLinkWithDestination_preferredFilename_(objc.NSString path, objc.NSString filename) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_addSymbolicLinkWithDestination_preferredFilename_, path.ref.pointer, filename.ref.pointer); + objc.NSString addSymbolicLinkWithDestination_preferredFilename_( + objc.NSString path, objc.NSString filename) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_addSymbolicLinkWithDestination_preferredFilename_, + path.ref.pointer, + filename.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// symbolicLinkDestination objc.NSString symbolicLinkDestination() { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_symbolicLinkDestination); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_symbolicLinkDestination); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSFileWrapper init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } @@ -19063,7 +29137,8 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeFileWrapper_, child.ref.pointe /// allocWithZone: static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSFileWrapper, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSFileWrapper, _sel_allocWithZone_, zone); return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } @@ -19074,56 +29149,70 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeFileWrapper_, child.ref.pointe } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSFileWrapper, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSFileWrapper, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSFileWrapper, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSFileWrapper, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSFileWrapper, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSFileWrapper, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSFileWrapper, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSFileWrapper, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSFileWrapper, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSFileWrapper, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSFileWrapper, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSFileWrapper, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -19147,40 +29236,58 @@ _objc_msgSend_1tjlcwl(_class_NSFileWrapper, _sel_setKeys_triggerChangeNotificati /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSFileWrapper, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSFileWrapper, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } } late final _class_NSURLSession = objc.getClass("NSURLSession"); late final _sel_sharedSession = objc.registerName("sharedSession"); -late final _class_NSURLSessionConfiguration = objc.getClass("NSURLSessionConfiguration"); -late final _sel_defaultSessionConfiguration = objc.registerName("defaultSessionConfiguration"); -late final _sel_ephemeralSessionConfiguration = objc.registerName("ephemeralSessionConfiguration"); -late final _sel_backgroundSessionConfigurationWithIdentifier_ = objc.registerName("backgroundSessionConfigurationWithIdentifier:"); +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +late final _sel_ephemeralSessionConfiguration = + objc.registerName("ephemeralSessionConfiguration"); +late final _sel_backgroundSessionConfigurationWithIdentifier_ = + objc.registerName("backgroundSessionConfigurationWithIdentifier:"); late final _sel_identifier = objc.registerName("identifier"); late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); -late final _sel_setRequestCachePolicy_ = objc.registerName("setRequestCachePolicy:"); -late final _sel_timeoutIntervalForRequest = objc.registerName("timeoutIntervalForRequest"); -late final _sel_setTimeoutIntervalForRequest_ = objc.registerName("setTimeoutIntervalForRequest:"); -late final _sel_timeoutIntervalForResource = objc.registerName("timeoutIntervalForResource"); -late final _sel_setTimeoutIntervalForResource_ = objc.registerName("setTimeoutIntervalForResource:"); -late final _sel_waitsForConnectivity = objc.registerName("waitsForConnectivity"); -late final _sel_setWaitsForConnectivity_ = objc.registerName("setWaitsForConnectivity:"); +late final _sel_setRequestCachePolicy_ = + objc.registerName("setRequestCachePolicy:"); +late final _sel_timeoutIntervalForRequest = + objc.registerName("timeoutIntervalForRequest"); +late final _sel_setTimeoutIntervalForRequest_ = + objc.registerName("setTimeoutIntervalForRequest:"); +late final _sel_timeoutIntervalForResource = + objc.registerName("timeoutIntervalForResource"); +late final _sel_setTimeoutIntervalForResource_ = + objc.registerName("setTimeoutIntervalForResource:"); +late final _sel_waitsForConnectivity = + objc.registerName("waitsForConnectivity"); +late final _sel_setWaitsForConnectivity_ = + objc.registerName("setWaitsForConnectivity:"); late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); -late final _sel_sharedContainerIdentifier = objc.registerName("sharedContainerIdentifier"); -late final _sel_setSharedContainerIdentifier_ = objc.registerName("setSharedContainerIdentifier:"); -late final _sel_sessionSendsLaunchEvents = objc.registerName("sessionSendsLaunchEvents"); -late final _sel_setSessionSendsLaunchEvents_ = objc.registerName("setSessionSendsLaunchEvents:"); -late final _sel_connectionProxyDictionary = objc.registerName("connectionProxyDictionary"); -late final _sel_setConnectionProxyDictionary_ = objc.registerName("setConnectionProxyDictionary:"); +late final _sel_sharedContainerIdentifier = + objc.registerName("sharedContainerIdentifier"); +late final _sel_setSharedContainerIdentifier_ = + objc.registerName("setSharedContainerIdentifier:"); +late final _sel_sessionSendsLaunchEvents = + objc.registerName("sessionSendsLaunchEvents"); +late final _sel_setSessionSendsLaunchEvents_ = + objc.registerName("setSessionSendsLaunchEvents:"); +late final _sel_connectionProxyDictionary = + objc.registerName("connectionProxyDictionary"); +late final _sel_setConnectionProxyDictionary_ = + objc.registerName("setConnectionProxyDictionary:"); + enum SSLProtocol { kSSLProtocolUnknown(0), kTLSProtocol1(4), @@ -19196,35 +29303,52 @@ enum SSLProtocol { kTLSProtocol1Only(5), kSSLProtocolAll(6); - final int value; const SSLProtocol(this.value); static SSLProtocol fromValue(int value) => switch (value) { - 0 => kSSLProtocolUnknown, - 4 => kTLSProtocol1, - 7 => kTLSProtocol11, - 8 => kTLSProtocol12, - 9 => kDTLSProtocol1, - 10 => kTLSProtocol13, - 11 => kDTLSProtocol12, - 999 => kTLSProtocolMaxSupported, - 1 => kSSLProtocol2, - 2 => kSSLProtocol3, - 3 => kSSLProtocol3Only, - 5 => kTLSProtocol1Only, - 6 => kSSLProtocolAll, - _ => throw ArgumentError("Unknown value for SSLProtocol: $value"), - }; - -} - -late final _sel_TLSMinimumSupportedProtocol = objc.registerName("TLSMinimumSupportedProtocol"); -final _objc_msgSend_ewo6ux = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setTLSMinimumSupportedProtocol_ = objc.registerName("setTLSMinimumSupportedProtocol:"); -final _objc_msgSend_hcgw10 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedInt )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_TLSMaximumSupportedProtocol = objc.registerName("TLSMaximumSupportedProtocol"); -late final _sel_setTLSMaximumSupportedProtocol_ = objc.registerName("setTLSMaximumSupportedProtocol:"); + 0 => kSSLProtocolUnknown, + 4 => kTLSProtocol1, + 7 => kTLSProtocol11, + 8 => kTLSProtocol12, + 9 => kDTLSProtocol1, + 10 => kTLSProtocol13, + 11 => kDTLSProtocol12, + 999 => kTLSProtocolMaxSupported, + 1 => kSSLProtocol2, + 2 => kSSLProtocol3, + 3 => kSSLProtocol3Only, + 5 => kTLSProtocol1Only, + 6 => kSSLProtocolAll, + _ => throw ArgumentError("Unknown value for SSLProtocol: $value"), + }; +} + +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_ewo6ux = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_hcgw10 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); + enum tls_protocol_version_t { tls_protocol_version_TLSv10(769), tls_protocol_version_TLSv11(770), @@ -19233,606 +29357,811 @@ enum tls_protocol_version_t { tls_protocol_version_DTLSv10(-257), tls_protocol_version_DTLSv12(-259); - final int value; const tls_protocol_version_t(this.value); static tls_protocol_version_t fromValue(int value) => switch (value) { - 769 => tls_protocol_version_TLSv10, - 770 => tls_protocol_version_TLSv11, - 771 => tls_protocol_version_TLSv12, - 772 => tls_protocol_version_TLSv13, - -257 => tls_protocol_version_DTLSv10, - -259 => tls_protocol_version_DTLSv12, - _ => throw ArgumentError("Unknown value for tls_protocol_version_t: $value"), - }; - -} - -late final _sel_TLSMinimumSupportedProtocolVersion = objc.registerName("TLSMinimumSupportedProtocolVersion"); -final _objc_msgSend_a6qtz = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setTLSMinimumSupportedProtocolVersion_ = objc.registerName("setTLSMinimumSupportedProtocolVersion:"); -final _objc_msgSend_yb8bfm = objc.msgSendPointer.cast , ffi.Pointer , ffi.Uint16 )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_TLSMaximumSupportedProtocolVersion = objc.registerName("TLSMaximumSupportedProtocolVersion"); -late final _sel_setTLSMaximumSupportedProtocolVersion_ = objc.registerName("setTLSMaximumSupportedProtocolVersion:"); -late final _sel_HTTPShouldSetCookies = objc.registerName("HTTPShouldSetCookies"); -late final _sel_setHTTPShouldSetCookies_ = objc.registerName("setHTTPShouldSetCookies:"); -late final _sel_HTTPCookieAcceptPolicy = objc.registerName("HTTPCookieAcceptPolicy"); -late final _sel_setHTTPCookieAcceptPolicy_ = objc.registerName("setHTTPCookieAcceptPolicy:"); -late final _sel_HTTPAdditionalHeaders = objc.registerName("HTTPAdditionalHeaders"); -late final _sel_setHTTPAdditionalHeaders_ = objc.registerName("setHTTPAdditionalHeaders:"); -late final _sel_HTTPMaximumConnectionsPerHost = objc.registerName("HTTPMaximumConnectionsPerHost"); -late final _sel_setHTTPMaximumConnectionsPerHost_ = objc.registerName("setHTTPMaximumConnectionsPerHost:"); + 769 => tls_protocol_version_TLSv10, + 770 => tls_protocol_version_TLSv11, + 771 => tls_protocol_version_TLSv12, + 772 => tls_protocol_version_TLSv13, + -257 => tls_protocol_version_DTLSv10, + -259 => tls_protocol_version_DTLSv12, + _ => throw ArgumentError( + "Unknown value for tls_protocol_version_t: $value"), + }; +} + +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_a6qtz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Uint16 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_yb8bfm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Uint16)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocolVersion = + objc.registerName("TLSMaximumSupportedProtocolVersion"); +late final _sel_setTLSMaximumSupportedProtocolVersion_ = + objc.registerName("setTLSMaximumSupportedProtocolVersion:"); +late final _sel_HTTPShouldSetCookies = + objc.registerName("HTTPShouldSetCookies"); +late final _sel_setHTTPShouldSetCookies_ = + objc.registerName("setHTTPShouldSetCookies:"); +late final _sel_HTTPCookieAcceptPolicy = + objc.registerName("HTTPCookieAcceptPolicy"); +late final _sel_setHTTPCookieAcceptPolicy_ = + objc.registerName("setHTTPCookieAcceptPolicy:"); +late final _sel_HTTPAdditionalHeaders = + objc.registerName("HTTPAdditionalHeaders"); +late final _sel_setHTTPAdditionalHeaders_ = + objc.registerName("setHTTPAdditionalHeaders:"); +late final _sel_HTTPMaximumConnectionsPerHost = + objc.registerName("HTTPMaximumConnectionsPerHost"); +late final _sel_setHTTPMaximumConnectionsPerHost_ = + objc.registerName("setHTTPMaximumConnectionsPerHost:"); late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); -late final _sel_setHTTPCookieStorage_ = objc.registerName("setHTTPCookieStorage:"); -late final _sel_URLCredentialStorage = objc.registerName("URLCredentialStorage"); -late final _sel_setURLCredentialStorage_ = objc.registerName("setURLCredentialStorage:"); +late final _sel_setHTTPCookieStorage_ = + objc.registerName("setHTTPCookieStorage:"); +late final _sel_URLCredentialStorage = + objc.registerName("URLCredentialStorage"); +late final _sel_setURLCredentialStorage_ = + objc.registerName("setURLCredentialStorage:"); late final _sel_URLCache = objc.registerName("URLCache"); late final _sel_setURLCache_ = objc.registerName("setURLCache:"); -late final _sel_shouldUseExtendedBackgroundIdleMode = objc.registerName("shouldUseExtendedBackgroundIdleMode"); -late final _sel_setShouldUseExtendedBackgroundIdleMode_ = objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); +late final _sel_shouldUseExtendedBackgroundIdleMode = + objc.registerName("shouldUseExtendedBackgroundIdleMode"); +late final _sel_setShouldUseExtendedBackgroundIdleMode_ = + objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); late final _sel_protocolClasses = objc.registerName("protocolClasses"); late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); + enum NSURLSessionMultipathServiceType { NSURLSessionMultipathServiceTypeNone(0), NSURLSessionMultipathServiceTypeHandover(1), NSURLSessionMultipathServiceTypeInteractive(2), NSURLSessionMultipathServiceTypeAggregate(3); - final int value; const NSURLSessionMultipathServiceType(this.value); - static NSURLSessionMultipathServiceType fromValue(int value) => switch (value) { - 0 => NSURLSessionMultipathServiceTypeNone, - 1 => NSURLSessionMultipathServiceTypeHandover, - 2 => NSURLSessionMultipathServiceTypeInteractive, - 3 => NSURLSessionMultipathServiceTypeAggregate, - _ => throw ArgumentError("Unknown value for NSURLSessionMultipathServiceType: $value"), - }; - -} - -late final _sel_multipathServiceType = objc.registerName("multipathServiceType"); -final _objc_msgSend_zqvllq = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setMultipathServiceType_ = objc.registerName("setMultipathServiceType:"); -final _objc_msgSend_1ngj1qh = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_backgroundSessionConfiguration_ = objc.registerName("backgroundSessionConfiguration:"); + static NSURLSessionMultipathServiceType fromValue(int value) => + switch (value) { + 0 => NSURLSessionMultipathServiceTypeNone, + 1 => NSURLSessionMultipathServiceTypeHandover, + 2 => NSURLSessionMultipathServiceTypeInteractive, + 3 => NSURLSessionMultipathServiceTypeAggregate, + _ => throw ArgumentError( + "Unknown value for NSURLSessionMultipathServiceType: $value"), + }; +} + +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_zqvllq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_1ngj1qh = 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_backgroundSessionConfiguration_ = + objc.registerName("backgroundSessionConfiguration:"); /// NSURLSessionConfiguration class NSURLSessionConfiguration extends objc.NSObject { NSURLSessionConfiguration._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionConfiguration] that points to the same underlying object as [other]. - NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionConfiguration] that wraps the given raw object pointer. NSURLSessionConfiguration.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); } /// defaultSessionConfiguration static NSURLSessionConfiguration getDefaultSessionConfiguration() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } /// ephemeralSessionConfiguration static NSURLSessionConfiguration getEphemeralSessionConfiguration() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } /// backgroundSessionConfigurationWithIdentifier: - static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, _sel_backgroundSessionConfigurationWithIdentifier_, identifier.ref.pointer); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7( + _class_NSURLSessionConfiguration, + _sel_backgroundSessionConfigurationWithIdentifier_, + identifier.ref.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } /// identifier objc.NSString? get identifier { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_identifier); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// requestCachePolicy NSURLRequestCachePolicy get requestCachePolicy { - final _ret = _objc_msgSend_2xak1q(this.ref.pointer, _sel_requestCachePolicy); + final _ret = + _objc_msgSend_2xak1q(this.ref.pointer, _sel_requestCachePolicy); return NSURLRequestCachePolicy.fromValue(_ret); } /// setRequestCachePolicy: - set requestCachePolicy(NSURLRequestCachePolicy value) { - return _objc_msgSend_12vaadl(this.ref.pointer, _sel_setRequestCachePolicy_, value.value); - + set requestCachePolicy(NSURLRequestCachePolicy value) { + return _objc_msgSend_12vaadl( + this.ref.pointer, _sel_setRequestCachePolicy_, value.value); } /// timeoutIntervalForRequest double get timeoutIntervalForRequest { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutIntervalForRequest) : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutIntervalForRequest); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_timeoutIntervalForRequest) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_timeoutIntervalForRequest); } /// setTimeoutIntervalForRequest: - set timeoutIntervalForRequest(double value) { - return _objc_msgSend_suh039(this.ref.pointer, _sel_setTimeoutIntervalForRequest_, value); - + set timeoutIntervalForRequest(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutIntervalForRequest_, value); } /// timeoutIntervalForResource double get timeoutIntervalForResource { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_timeoutIntervalForResource) : _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutIntervalForResource); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret( + this.ref.pointer, _sel_timeoutIntervalForResource) + : _objc_msgSend_10noklm( + this.ref.pointer, _sel_timeoutIntervalForResource); } /// setTimeoutIntervalForResource: - set timeoutIntervalForResource(double value) { - return _objc_msgSend_suh039(this.ref.pointer, _sel_setTimeoutIntervalForResource_, value); - + set timeoutIntervalForResource(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutIntervalForResource_, value); } /// networkServiceType NSURLRequestNetworkServiceType get networkServiceType { - final _ret = _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// setNetworkServiceType: - set networkServiceType(NSURLRequestNetworkServiceType value) { - return _objc_msgSend_br89tg(this.ref.pointer, _sel_setNetworkServiceType_, value.value); - + set networkServiceType(NSURLRequestNetworkServiceType value) { + return _objc_msgSend_br89tg( + this.ref.pointer, _sel_setNetworkServiceType_, value.value); } /// allowsCellularAccess bool get allowsCellularAccess { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); - } /// setAllowsCellularAccess: - set allowsCellularAccess(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsCellularAccess_, value); - + set allowsCellularAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsCellularAccess_, value); } /// allowsExpensiveNetworkAccess bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsExpensiveNetworkAccess); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } /// setAllowsExpensiveNetworkAccess: - set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); - + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } /// allowsConstrainedNetworkAccess bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsConstrainedNetworkAccess); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } /// setAllowsConstrainedNetworkAccess: - set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); - + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } /// requiresDNSSECValidation bool get requiresDNSSECValidation { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_requiresDNSSECValidation); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } /// setRequiresDNSSECValidation: - set requiresDNSSECValidation(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); - + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); } /// waitsForConnectivity bool get waitsForConnectivity { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_waitsForConnectivity); - } /// setWaitsForConnectivity: - set waitsForConnectivity(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setWaitsForConnectivity_, value); - + set waitsForConnectivity(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setWaitsForConnectivity_, value); } /// isDiscretionary bool get discretionary { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDiscretionary); - } /// setDiscretionary: - set discretionary(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setDiscretionary_, value); - + set discretionary(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setDiscretionary_, value); } /// sharedContainerIdentifier objc.NSString? get sharedContainerIdentifier { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedContainerIdentifier); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedContainerIdentifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setSharedContainerIdentifier: - set sharedContainerIdentifier(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSharedContainerIdentifier_, value?.ref.pointer ?? ffi.nullptr); - + set sharedContainerIdentifier(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setSharedContainerIdentifier_, value?.ref.pointer ?? ffi.nullptr); } /// sessionSendsLaunchEvents bool get sessionSendsLaunchEvents { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_sessionSendsLaunchEvents); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_sessionSendsLaunchEvents); } /// setSessionSendsLaunchEvents: - set sessionSendsLaunchEvents(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setSessionSendsLaunchEvents_, value); - + set sessionSendsLaunchEvents(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setSessionSendsLaunchEvents_, value); } /// connectionProxyDictionary objc.NSDictionary? get connectionProxyDictionary { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionProxyDictionary); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionProxyDictionary); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setConnectionProxyDictionary: - set connectionProxyDictionary(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setConnectionProxyDictionary_, value?.ref.pointer ?? ffi.nullptr); - + set connectionProxyDictionary(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setConnectionProxyDictionary_, value?.ref.pointer ?? ffi.nullptr); } /// TLSMinimumSupportedProtocol SSLProtocol get TLSMinimumSupportedProtocol { - final _ret = _objc_msgSend_ewo6ux(this.ref.pointer, _sel_TLSMinimumSupportedProtocol); + final _ret = _objc_msgSend_ewo6ux( + this.ref.pointer, _sel_TLSMinimumSupportedProtocol); return SSLProtocol.fromValue(_ret); } /// setTLSMinimumSupportedProtocol: - set TLSMinimumSupportedProtocol(SSLProtocol value) { - return _objc_msgSend_hcgw10(this.ref.pointer, _sel_setTLSMinimumSupportedProtocol_, value.value); - + set TLSMinimumSupportedProtocol(SSLProtocol value) { + return _objc_msgSend_hcgw10( + this.ref.pointer, _sel_setTLSMinimumSupportedProtocol_, value.value); } /// TLSMaximumSupportedProtocol SSLProtocol get TLSMaximumSupportedProtocol { - final _ret = _objc_msgSend_ewo6ux(this.ref.pointer, _sel_TLSMaximumSupportedProtocol); + final _ret = _objc_msgSend_ewo6ux( + this.ref.pointer, _sel_TLSMaximumSupportedProtocol); return SSLProtocol.fromValue(_ret); } /// setTLSMaximumSupportedProtocol: - set TLSMaximumSupportedProtocol(SSLProtocol value) { - return _objc_msgSend_hcgw10(this.ref.pointer, _sel_setTLSMaximumSupportedProtocol_, value.value); - + set TLSMaximumSupportedProtocol(SSLProtocol value) { + return _objc_msgSend_hcgw10( + this.ref.pointer, _sel_setTLSMaximumSupportedProtocol_, value.value); } /// TLSMinimumSupportedProtocolVersion tls_protocol_version_t get TLSMinimumSupportedProtocolVersion { - final _ret = _objc_msgSend_a6qtz(this.ref.pointer, _sel_TLSMinimumSupportedProtocolVersion); + final _ret = _objc_msgSend_a6qtz( + this.ref.pointer, _sel_TLSMinimumSupportedProtocolVersion); return tls_protocol_version_t.fromValue(_ret); } /// setTLSMinimumSupportedProtocolVersion: - set TLSMinimumSupportedProtocolVersion(tls_protocol_version_t value) { - return _objc_msgSend_yb8bfm(this.ref.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value.value); - + set TLSMinimumSupportedProtocolVersion(tls_protocol_version_t value) { + return _objc_msgSend_yb8bfm(this.ref.pointer, + _sel_setTLSMinimumSupportedProtocolVersion_, value.value); } /// TLSMaximumSupportedProtocolVersion tls_protocol_version_t get TLSMaximumSupportedProtocolVersion { - final _ret = _objc_msgSend_a6qtz(this.ref.pointer, _sel_TLSMaximumSupportedProtocolVersion); + final _ret = _objc_msgSend_a6qtz( + this.ref.pointer, _sel_TLSMaximumSupportedProtocolVersion); return tls_protocol_version_t.fromValue(_ret); } /// setTLSMaximumSupportedProtocolVersion: - set TLSMaximumSupportedProtocolVersion(tls_protocol_version_t value) { - return _objc_msgSend_yb8bfm(this.ref.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value.value); - + set TLSMaximumSupportedProtocolVersion(tls_protocol_version_t value) { + return _objc_msgSend_yb8bfm(this.ref.pointer, + _sel_setTLSMaximumSupportedProtocolVersion_, value.value); } /// HTTPShouldUsePipelining bool get HTTPShouldUsePipelining { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); - } /// setHTTPShouldUsePipelining: - set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); - + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); } /// HTTPShouldSetCookies bool get HTTPShouldSetCookies { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldSetCookies); - } /// setHTTPShouldSetCookies: - set HTTPShouldSetCookies(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setHTTPShouldSetCookies_, value); - + set HTTPShouldSetCookies(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldSetCookies_, value); } /// HTTPCookieAcceptPolicy NSHTTPCookieAcceptPolicy get HTTPCookieAcceptPolicy { - final _ret = _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_HTTPCookieAcceptPolicy); + final _ret = + _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_HTTPCookieAcceptPolicy); return NSHTTPCookieAcceptPolicy.fromValue(_ret); } /// setHTTPCookieAcceptPolicy: - set HTTPCookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { - return _objc_msgSend_199e8fv(this.ref.pointer, _sel_setHTTPCookieAcceptPolicy_, value.value); - + set HTTPCookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { + return _objc_msgSend_199e8fv( + this.ref.pointer, _sel_setHTTPCookieAcceptPolicy_, value.value); } /// HTTPAdditionalHeaders objc.NSDictionary? get HTTPAdditionalHeaders { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPAdditionalHeaders); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPAdditionalHeaders); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setHTTPAdditionalHeaders: - set HTTPAdditionalHeaders(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPAdditionalHeaders_, value?.ref.pointer ?? ffi.nullptr); - + set HTTPAdditionalHeaders(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setHTTPAdditionalHeaders_, value?.ref.pointer ?? ffi.nullptr); } /// HTTPMaximumConnectionsPerHost int get HTTPMaximumConnectionsPerHost { - return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_HTTPMaximumConnectionsPerHost); - + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_HTTPMaximumConnectionsPerHost); } /// setHTTPMaximumConnectionsPerHost: - set HTTPMaximumConnectionsPerHost(int value) { - return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); - + set HTTPMaximumConnectionsPerHost(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); } /// HTTPCookieStorage NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPCookieStorage); - return _ret.address == 0 ? null : NSHTTPCookieStorage.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPCookieStorage); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } /// setHTTPCookieStorage: - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPCookieStorage_, value?.ref.pointer ?? ffi.nullptr); - + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPCookieStorage_, + value?.ref.pointer ?? ffi.nullptr); } /// URLCredentialStorage NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCredentialStorage); - return _ret.address == 0 ? null : NSURLCredentialStorage.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCredentialStorage); + return _ret.address == 0 + ? null + : NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } /// setURLCredentialStorage: - set URLCredentialStorage(NSURLCredentialStorage? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURLCredentialStorage_, value?.ref.pointer ?? ffi.nullptr); - + set URLCredentialStorage(NSURLCredentialStorage? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURLCredentialStorage_, + value?.ref.pointer ?? ffi.nullptr); } /// URLCache NSURLCache? get URLCache { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCache); - return _ret.address == 0 ? null : NSURLCache.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURLCache.castFromPointer(_ret, retain: true, release: true); } /// setURLCache: - set URLCache(NSURLCache? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURLCache_, value?.ref.pointer ?? ffi.nullptr); - + set URLCache(NSURLCache? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURLCache_, value?.ref.pointer ?? ffi.nullptr); } /// shouldUseExtendedBackgroundIdleMode bool get shouldUseExtendedBackgroundIdleMode { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_shouldUseExtendedBackgroundIdleMode); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_shouldUseExtendedBackgroundIdleMode); } /// setShouldUseExtendedBackgroundIdleMode: - set shouldUseExtendedBackgroundIdleMode(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); - + set shouldUseExtendedBackgroundIdleMode(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); } /// protocolClasses objc.NSArray? get protocolClasses { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_protocolClasses); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setProtocolClasses: - set protocolClasses(objc.NSArray? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolClasses_, value?.ref.pointer ?? ffi.nullptr); - + set protocolClasses(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolClasses_, + value?.ref.pointer ?? ffi.nullptr); } /// multipathServiceType NSURLSessionMultipathServiceType get multipathServiceType { - final _ret = _objc_msgSend_zqvllq(this.ref.pointer, _sel_multipathServiceType); + final _ret = + _objc_msgSend_zqvllq(this.ref.pointer, _sel_multipathServiceType); return NSURLSessionMultipathServiceType.fromValue(_ret); } /// setMultipathServiceType: - set multipathServiceType(NSURLSessionMultipathServiceType value) { - return _objc_msgSend_1ngj1qh(this.ref.pointer, _sel_setMultipathServiceType_, value.value); - + set multipathServiceType(NSURLSessionMultipathServiceType value) { + return _objc_msgSend_1ngj1qh( + this.ref.pointer, _sel_setMultipathServiceType_, value.value); } /// init NSURLSessionConfiguration init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLSessionConfiguration new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_new); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_new); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } /// backgroundSessionConfiguration: - static NSURLSessionConfiguration backgroundSessionConfiguration_(objc.NSString identifier) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, _sel_backgroundSessionConfiguration_, identifier.ref.pointer); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + static NSURLSessionConfiguration backgroundSessionConfiguration_( + objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.ref.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } /// allocWithZone: static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLSessionConfiguration alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_alloc); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_alloc); + return NSURLSessionConfiguration.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_cqxsqq(_class_NSURLSessionConfiguration, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionConfiguration, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionConfiguration, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionConfiguration, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionConfiguration, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionConfiguration, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionConfiguration, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionConfiguration, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionConfiguration, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionConfiguration, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLSessionConfiguration self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLSessionConfiguration retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLSessionConfiguration autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } } -late final _sel_sessionWithConfiguration_ = objc.registerName("sessionWithConfiguration:"); -late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); +late final _sel_sessionWithConfiguration_ = + objc.registerName("sessionWithConfiguration:"); +late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = + objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); late final _sel_delegateQueue = objc.registerName("delegateQueue"); late final _sel_configuration = objc.registerName("configuration"); late final _sel_sessionDescription = objc.registerName("sessionDescription"); -late final _sel_setSessionDescription_ = objc.registerName("setSessionDescription:"); -late final _sel_finishTasksAndInvalidate = objc.registerName("finishTasksAndInvalidate"); +late final _sel_setSessionDescription_ = + objc.registerName("setSessionDescription:"); +late final _sel_finishTasksAndInvalidate = + objc.registerName("finishTasksAndInvalidate"); late final _sel_invalidateAndCancel = objc.registerName("invalidateAndCancel"); -late final _sel_resetWithCompletionHandler_ = objc.registerName("resetWithCompletionHandler:"); -late final _sel_flushWithCompletionHandler_ = objc.registerName("flushWithCompletionHandler:"); -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_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); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerTrampoline(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); +late final _sel_resetWithCompletionHandler_ = + objc.registerName("resetWithCompletionHandler:"); +late final _sel_flushWithCompletionHandler_ = + objc.registerName("flushWithCompletionHandler:"); +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_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); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerTrampoline( + 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); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSArray, objc.NSArray, + objc.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. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSArray , objc.NSArray , objc.NSArray ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(objc.NSArray.castFromPointer(arg0, retain: true, release: true), objc.NSArray.castFromPointer(arg1, retain: true, release: true), objc.NSArray.castFromPointer(arg2, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, retain: true, release: true), + objc.NSArray.castFromPointer(arg1, retain: true, release: true), + objc.NSArray.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -19843,62 +30172,135 @@ abstract final class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSArray , objc.NSArray , objc.NSArray ) fn) { + static objc + .ObjCBlock + listener(void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(objc.NSArray.castFromPointer(arg0, retain: false, release: true), objc.NSArray.castFromPointer(arg1, retain: false, release: true), objc.NSArray.castFromPointer(arg2, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, + retain: false, release: true), + objc.NSArray.castFromPointer(arg1, + retain: false, release: true), + objc.NSArray.castFromPointer(arg2, + retain: false, release: true))); final wrapper = _wrapListenerBlock_tenbla(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(objc.NSArray, objc.NSArray, + objc.NSArray)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_CallExtension on objc.ObjCBlock { - void call(objc.NSArray arg0, objc.NSArray arg1, objc.NSArray arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); -} - -late final _sel_getTasksWithCompletionHandler_ = objc.registerName("getTasksWithCompletionHandler:"); -void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSArray1_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSArray1_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +extension ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_CallExtension on objc + .ObjCBlock { + void call(objc.NSArray arg0, objc.NSArray arg1, objc.NSArray arg2) => + ref.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)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); +} + +late final _sel_getTasksWithCompletionHandler_ = + objc.registerName("getTasksWithCompletionHandler:"); +void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray1_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSArray1_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSArray1_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSArray1_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSArray1 { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSArray1_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSArray1_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSArray ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSArray1_closureCallable, (ffi.Pointer arg0) => fn(objc.NSArray.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray1_closureCallable, + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -19909,65 +30311,122 @@ abstract final class ObjCBlock_ffiVoid_NSArray1 { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSArray ) fn) { + static objc.ObjCBlock listener( + void Function(objc.NSArray) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSArray1_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(objc.NSArray.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSArray1_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSArray1_CallExtension on objc.ObjCBlock { - void call(objc.NSArray arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer); -} - -late final _sel_getAllTasksWithCompletionHandler_ = objc.registerName("getAllTasksWithCompletionHandler:"); -late final _sel_dataTaskWithRequest_ = objc.registerName("dataTaskWithRequest:"); +extension ObjCBlock_ffiVoid_NSArray1_CallExtension + on objc.ObjCBlock { + void call(objc.NSArray arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); +} + +late final _sel_getAllTasksWithCompletionHandler_ = + objc.registerName("getAllTasksWithCompletionHandler:"); +late final _sel_dataTaskWithRequest_ = + objc.registerName("dataTaskWithRequest:"); late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); -late final _class_NSURLSessionUploadTask = objc.getClass("NSURLSessionUploadTask"); -void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSData_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSData_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSData_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSData_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +late final _class_NSURLSessionUploadTask = + objc.getClass("NSURLSessionUploadTask"); +void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSData_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSData_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSData { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSData? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSData_closureCallable, (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -19978,321 +30437,465 @@ abstract final class ObjCBlock_ffiVoid_NSData { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSData? ) fn) { + static objc.ObjCBlock listener( + void Function(objc.NSData?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSData_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_CallExtension on objc.ObjCBlock { - void call(objc.NSData? arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_cancelByProducingResumeData_ = objc.registerName("cancelByProducingResumeData:"); +extension ObjCBlock_ffiVoid_NSData_CallExtension + on objc.ObjCBlock { + void call(objc.NSData? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_cancelByProducingResumeData_ = + objc.registerName("cancelByProducingResumeData:"); /// NSURLSessionUploadTask class NSURLSessionUploadTask extends NSURLSessionDataTask { NSURLSessionUploadTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); } /// init NSURLSessionUploadTask init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLSessionUploadTask new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_new); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: false, release: true); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } /// cancelByProducingResumeData: - void cancelByProducingResumeData_(objc.ObjCBlock completionHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, completionHandler.ref.pointer); - + void cancelByProducingResumeData_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, + completionHandler.ref.pointer); } /// allocWithZone: static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLSessionUploadTask alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_alloc); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_alloc); + return NSURLSessionUploadTask.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_cqxsqq(_class_NSURLSessionUploadTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionUploadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionUploadTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionUploadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionUploadTask, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionUploadTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionUploadTask, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionUploadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionUploadTask, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionUploadTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionUploadTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionUploadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLSessionUploadTask self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLSessionUploadTask retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLSessionUploadTask autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } } -late final _sel_uploadTaskWithRequest_fromFile_ = objc.registerName("uploadTaskWithRequest:fromFile:"); -late final _sel_uploadTaskWithRequest_fromData_ = objc.registerName("uploadTaskWithRequest:fromData:"); -late final _sel_uploadTaskWithResumeData_ = objc.registerName("uploadTaskWithResumeData:"); -late final _sel_uploadTaskWithStreamedRequest_ = objc.registerName("uploadTaskWithStreamedRequest:"); -late final _class_NSURLSessionDownloadTask = objc.getClass("NSURLSessionDownloadTask"); +late final _sel_uploadTaskWithRequest_fromFile_ = + objc.registerName("uploadTaskWithRequest:fromFile:"); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); /// NSURLSessionDownloadTask class NSURLSessionDownloadTask extends NSURLSessionTask { NSURLSessionDownloadTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } /// cancelByProducingResumeData: - void cancelByProducingResumeData_(objc.ObjCBlock completionHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, completionHandler.ref.pointer); - + void cancelByProducingResumeData_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, + completionHandler.ref.pointer); } /// init NSURLSessionDownloadTask init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLSessionDownloadTask new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_new); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_new); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLSessionDownloadTask alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_alloc); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_alloc); + return NSURLSessionDownloadTask.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_cqxsqq(_class_NSURLSessionDownloadTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionDownloadTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionDownloadTask, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionDownloadTask, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionDownloadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionDownloadTask, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionDownloadTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionDownloadTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionDownloadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLSessionDownloadTask self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLSessionDownloadTask retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLSessionDownloadTask autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); - } -} - -late final _sel_downloadTaskWithRequest_ = objc.registerName("downloadTaskWithRequest:"); -late final _sel_downloadTaskWithURL_ = objc.registerName("downloadTaskWithURL:"); -late final _sel_downloadTaskWithResumeData_ = objc.registerName("downloadTaskWithResumeData:"); -late final _class_NSURLSessionStreamTask = objc.getClass("NSURLSessionStreamTask"); -void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.Bool arg1, ffi.Pointer arg2)>>() - .asFunction , bool , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Bool , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer , bool , ffi.Pointer ))(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Bool , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , bool , ffi.Pointer ))(arg0, arg1, arg2); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +late final _sel_downloadTaskWithURL_ = + objc.registerName("downloadTaskWithURL:"); +late final _sel_downloadTaskWithResumeData_ = + objc.registerName("downloadTaskWithResumeData:"); +late final _class_NSURLSessionStreamTask = + objc.getClass("NSURLSessionStreamTask"); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Bool , ffi.Pointer )> _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Bool , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSData_bool_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSData, ffi.Bool, + objc.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. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSData , bool , objc.NSError? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable, (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn(objc.NSData.castFromPointer(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock + fromFunction(void Function(objc.NSData, bool, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable, + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -20303,226 +30906,382 @@ abstract final class ObjCBlock_ffiVoid_NSData_bool_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSData , bool , objc.NSError? ) fn) { + static objc.ObjCBlock + listener(void Function(objc.NSData, bool, objc.NSError?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn(objc.NSData.castFromPointer(arg0, retain: false, release: true), arg1, arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + objc.NSData.castFromPointer(arg0, retain: false, release: true), + arg1, + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); final wrapper = _wrapListenerBlock_hfhq9m(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(objc.NSData, ffi.Bool, objc.NSError?)>(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_bool_NSError_CallExtension on objc.ObjCBlock { - void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , bool , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer, arg1, arg2?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc.registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); -final _objc_msgSend_15i4521 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong , ffi.Double , ffi.Pointer )>>().asFunction , ffi.Pointer , int , int , double , ffi.Pointer )>(); -late final _sel_writeData_timeout_completionHandler_ = objc.registerName("writeData:timeout:completionHandler:"); -final _objc_msgSend_5qmwfe = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Double , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer , double , ffi.Pointer )>(); +extension ObjCBlock_ffiVoid_NSData_bool_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1, arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc + .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); +final _objc_msgSend_15i4521 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + double, + ffi.Pointer)>(); +late final _sel_writeData_timeout_completionHandler_ = + objc.registerName("writeData:timeout:completionHandler:"); +final _objc_msgSend_5qmwfe = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); late final _sel_captureStreams = objc.registerName("captureStreams"); late final _sel_closeWrite = objc.registerName("closeWrite"); late final _sel_closeRead = objc.registerName("closeRead"); -late final _sel_startSecureConnection = objc.registerName("startSecureConnection"); -late final _sel_stopSecureConnection = objc.registerName("stopSecureConnection"); +late final _sel_startSecureConnection = + objc.registerName("startSecureConnection"); +late final _sel_stopSecureConnection = + objc.registerName("stopSecureConnection"); /// NSURLSessionStreamTask class NSURLSessionStreamTask extends NSURLSessionTask { NSURLSessionStreamTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionStreamTask] that wraps the given raw object pointer. NSURLSessionStreamTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); } /// readDataOfMinLength:maxLength:timeout:completionHandler: - void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, int maxBytes, double timeout, objc.ObjCBlock completionHandler) { -_objc_msgSend_15i4521(this.ref.pointer, _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, minBytes, maxBytes, timeout, completionHandler.ref.pointer); - + void readDataOfMinLength_maxLength_timeout_completionHandler_( + int minBytes, + int maxBytes, + double timeout, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_15i4521( + this.ref.pointer, + _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, + minBytes, + maxBytes, + timeout, + completionHandler.ref.pointer); } /// writeData:timeout:completionHandler: - void writeData_timeout_completionHandler_(objc.NSData data, double timeout, objc.ObjCBlock completionHandler) { -_objc_msgSend_5qmwfe(this.ref.pointer, _sel_writeData_timeout_completionHandler_, data.ref.pointer, timeout, completionHandler.ref.pointer); - + void writeData_timeout_completionHandler_(objc.NSData data, double timeout, + objc.ObjCBlock completionHandler) { + _objc_msgSend_5qmwfe( + this.ref.pointer, + _sel_writeData_timeout_completionHandler_, + data.ref.pointer, + timeout, + completionHandler.ref.pointer); } /// captureStreams void captureStreams() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_captureStreams); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_captureStreams); } /// closeWrite void closeWrite() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_closeWrite); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeWrite); } /// closeRead void closeRead() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_closeRead); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeRead); } /// startSecureConnection void startSecureConnection() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_startSecureConnection); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_startSecureConnection); } /// stopSecureConnection void stopSecureConnection() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_stopSecureConnection); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopSecureConnection); } /// init NSURLSessionStreamTask init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLSessionStreamTask new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_new); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: false, release: true); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLSessionStreamTask alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_alloc); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_alloc); + return NSURLSessionStreamTask.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_cqxsqq(_class_NSURLSessionStreamTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionStreamTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionStreamTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionStreamTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionStreamTask, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionStreamTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionStreamTask, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionStreamTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionStreamTask, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionStreamTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionStreamTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionStreamTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLSessionStreamTask self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLSessionStreamTask retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLSessionStreamTask autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: true, release: true); - } -} - -late final _sel_streamTaskWithHostName_port_ = objc.registerName("streamTaskWithHostName:port:"); -final _objc_msgSend_spwp90 = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Long )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_streamTaskWithHostName_port_ = + objc.registerName("streamTaskWithHostName:port:"); +final _objc_msgSend_spwp90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); late final _class_NSNetService = objc.getClass("NSNetService"); -late final _sel_initWithDomain_type_name_port_ = objc.registerName("initWithDomain:type:name:port:"); -final _objc_msgSend_1vcjoth = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Int )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_initWithDomain_type_name_ = objc.registerName("initWithDomain:type:name:"); +late final _sel_initWithDomain_type_name_port_ = + objc.registerName("initWithDomain:type:name:port:"); +final _objc_msgSend_1vcjoth = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithDomain_type_name_ = + objc.registerName("initWithDomain:type:name:"); late final _sel_includesPeerToPeer = objc.registerName("includesPeerToPeer"); -late final _sel_setIncludesPeerToPeer_ = objc.registerName("setIncludesPeerToPeer:"); +late final _sel_setIncludesPeerToPeer_ = + objc.registerName("setIncludesPeerToPeer:"); late final _sel_type = objc.registerName("type"); late final _sel_addresses = objc.registerName("addresses"); + enum NSNetServiceOptions { NSNetServiceNoAutoRename(1), NSNetServiceListenForConnections(2); - final int value; const NSNetServiceOptions(this.value); static NSNetServiceOptions fromValue(int value) => switch (value) { - 1 => NSNetServiceNoAutoRename, - 2 => NSNetServiceListenForConnections, - _ => throw ArgumentError("Unknown value for NSNetServiceOptions: $value"), - }; - + 1 => NSNetServiceNoAutoRename, + 2 => NSNetServiceListenForConnections, + _ => + throw ArgumentError("Unknown value for NSNetServiceOptions: $value"), + }; } late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); -final _objc_msgSend_hj2tkj = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_hj2tkj = 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_resolve = objc.registerName("resolve"); late final _sel_stop = objc.registerName("stop"); -late final _sel_dictionaryFromTXTRecordData_ = objc.registerName("dictionaryFromTXTRecordData:"); -late final _sel_dataFromTXTRecordDictionary_ = objc.registerName("dataFromTXTRecordDictionary:"); +late final _sel_dictionaryFromTXTRecordData_ = + objc.registerName("dictionaryFromTXTRecordData:"); +late final _sel_dataFromTXTRecordDictionary_ = + objc.registerName("dataFromTXTRecordDictionary:"); late final _sel_resolveWithTimeout_ = objc.registerName("resolveWithTimeout:"); -late final _sel_getInputStream_outputStream_ = objc.registerName("getInputStream:outputStream:"); -final _objc_msgSend_1xn13sz = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer> , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer> , ffi.Pointer> )>(); +late final _sel_getInputStream_outputStream_ = + objc.registerName("getInputStream:outputStream:"); +final _objc_msgSend_1xn13sz = 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_setTXTRecordData_ = objc.registerName("setTXTRecordData:"); late final _sel_TXTRecordData = objc.registerName("TXTRecordData"); late final _sel_startMonitoring = objc.registerName("startMonitoring"); @@ -20531,70 +31290,84 @@ late final _sel_stopMonitoring = objc.registerName("stopMonitoring"); /// NSNetService class NSNetService extends objc.NSObject { NSNetService._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSNetService] that points to the same underlying object as [other]. - NSNetService.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSNetService.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSNetService] that wraps the given raw object pointer. NSNetService.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSNetService]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSNetService); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSNetService); } /// initWithDomain:type:name:port: - NSNetService initWithDomain_type_name_port_(objc.NSString domain, objc.NSString type, objc.NSString name, int port) { - final _ret = _objc_msgSend_1vcjoth(this.ref.retainAndReturnPointer(), _sel_initWithDomain_type_name_port_, domain.ref.pointer, type.ref.pointer, name.ref.pointer, port); + NSNetService initWithDomain_type_name_port_( + objc.NSString domain, objc.NSString type, objc.NSString name, int port) { + final _ret = _objc_msgSend_1vcjoth( + this.ref.retainAndReturnPointer(), + _sel_initWithDomain_type_name_port_, + domain.ref.pointer, + type.ref.pointer, + name.ref.pointer, + port); return NSNetService.castFromPointer(_ret, retain: false, release: true); } /// initWithDomain:type:name: - NSNetService initWithDomain_type_name_(objc.NSString domain, objc.NSString type, objc.NSString name) { - final _ret = _objc_msgSend_aud7dn(this.ref.retainAndReturnPointer(), _sel_initWithDomain_type_name_, domain.ref.pointer, type.ref.pointer, name.ref.pointer); + NSNetService initWithDomain_type_name_( + objc.NSString domain, objc.NSString type, objc.NSString name) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithDomain_type_name_, + domain.ref.pointer, + type.ref.pointer, + name.ref.pointer); return NSNetService.castFromPointer(_ret, retain: false, release: true); } /// scheduleInRunLoop:forMode: void scheduleInRunLoop_forMode_(objc.NSRunLoop aRunLoop, objc.NSString mode) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, aRunLoop.ref.pointer, mode.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } /// removeFromRunLoop:forMode: void removeFromRunLoop_forMode_(objc.NSRunLoop aRunLoop, objc.NSString mode) { -_objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeFromRunLoop_forMode_, aRunLoop.ref.pointer, mode.ref.pointer); - + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.ref.pointer, mode.ref.pointer); } /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDelegate: - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); - + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } /// includesPeerToPeer bool get includesPeerToPeer { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_includesPeerToPeer); - } /// setIncludesPeerToPeer: - set includesPeerToPeer(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setIncludesPeerToPeer_, value); - + set includesPeerToPeer(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setIncludesPeerToPeer_, value); } /// name @@ -20618,96 +31391,101 @@ _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_removeFromRunLoop_forMode_, aRunLoo /// hostName objc.NSString? get hostName { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_hostName); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// addresses objc.NSArray? get addresses { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_addresses); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// port int get port { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_port); - } /// publish void publish() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); } /// publishWithOptions: void publishWithOptions_(NSNetServiceOptions options) { -_objc_msgSend_hj2tkj(this.ref.pointer, _sel_publishWithOptions_, options.value); - + _objc_msgSend_hj2tkj( + this.ref.pointer, _sel_publishWithOptions_, options.value); } /// resolve void resolve() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_resolve); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resolve); } /// stop void stop() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_stop); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stop); } /// dictionaryFromTXTRecordData: static objc.NSDictionary dictionaryFromTXTRecordData_(objc.NSData txtData) { - final _ret = _objc_msgSend_juohf7(_class_NSNetService, _sel_dictionaryFromTXTRecordData_, txtData.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSNetService, + _sel_dictionaryFromTXTRecordData_, txtData.ref.pointer); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// dataFromTXTRecordDictionary: - static objc.NSData dataFromTXTRecordDictionary_(objc.NSDictionary txtDictionary) { - final _ret = _objc_msgSend_juohf7(_class_NSNetService, _sel_dataFromTXTRecordDictionary_, txtDictionary.ref.pointer); + static objc.NSData dataFromTXTRecordDictionary_( + objc.NSDictionary txtDictionary) { + final _ret = _objc_msgSend_juohf7(_class_NSNetService, + _sel_dataFromTXTRecordDictionary_, txtDictionary.ref.pointer); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// resolveWithTimeout: void resolveWithTimeout_(double timeout) { -_objc_msgSend_suh039(this.ref.pointer, _sel_resolveWithTimeout_, timeout); - + _objc_msgSend_suh039(this.ref.pointer, _sel_resolveWithTimeout_, timeout); } /// getInputStream:outputStream: - bool getInputStream_outputStream_(ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _objc_msgSend_1xn13sz(this.ref.pointer, _sel_getInputStream_outputStream_, inputStream, outputStream); - + bool getInputStream_outputStream_( + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _objc_msgSend_1xn13sz(this.ref.pointer, + _sel_getInputStream_outputStream_, inputStream, outputStream); } /// setTXTRecordData: bool setTXTRecordData_(objc.NSData? recordData) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_setTXTRecordData_, recordData?.ref.pointer ?? ffi.nullptr); - + return _objc_msgSend_l8lotg(this.ref.pointer, _sel_setTXTRecordData_, + recordData?.ref.pointer ?? ffi.nullptr); } /// TXTRecordData objc.NSData? TXTRecordData() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_TXTRecordData); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// startMonitoring void startMonitoring() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_startMonitoring); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_startMonitoring); } /// stopMonitoring void stopMonitoring() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_stopMonitoring); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopMonitoring); } /// init NSNetService init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSNetService.castFromPointer(_ret, retain: false, release: true); } @@ -20719,7 +31497,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopMonitoring); /// allocWithZone: static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSNetService, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSNetService, _sel_allocWithZone_, zone); return NSNetService.castFromPointer(_ret, retain: false, release: true); } @@ -20730,56 +31509,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopMonitoring); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSNetService, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSNetService, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSNetService, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSNetService, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSNetService, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSNetService, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSNetService, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSNetService, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSNetService, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSNetService, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSNetService, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSNetService, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSNetService, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSNetService, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSNetService, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -20802,58 +31595,75 @@ _objc_msgSend_1tjlcwl(_class_NSNetService, _sel_setKeys_triggerChangeNotificatio } } -late final _sel_streamTaskWithNetService_ = objc.registerName("streamTaskWithNetService:"); -late final _class_NSURLSessionWebSocketTask = objc.getClass("NSURLSessionWebSocketTask"); -late final _class_NSURLSessionWebSocketMessage = objc.getClass("NSURLSessionWebSocketMessage"); +late final _sel_streamTaskWithNetService_ = + objc.registerName("streamTaskWithNetService:"); +late final _class_NSURLSessionWebSocketTask = + objc.getClass("NSURLSessionWebSocketTask"); +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); + enum NSURLSessionWebSocketMessageType { NSURLSessionWebSocketMessageTypeData(0), NSURLSessionWebSocketMessageTypeString(1); - final int value; const NSURLSessionWebSocketMessageType(this.value); - static NSURLSessionWebSocketMessageType fromValue(int value) => switch (value) { - 0 => NSURLSessionWebSocketMessageTypeData, - 1 => NSURLSessionWebSocketMessageTypeString, - _ => throw ArgumentError("Unknown value for NSURLSessionWebSocketMessageType: $value"), - }; - + static NSURLSessionWebSocketMessageType fromValue(int value) => + switch (value) { + 0 => NSURLSessionWebSocketMessageTypeData, + 1 => NSURLSessionWebSocketMessageTypeString, + _ => throw ArgumentError( + "Unknown value for NSURLSessionWebSocketMessageType: $value"), + }; } -final _objc_msgSend_1kew1r = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1kew1r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); /// NSURLSessionWebSocketMessage class NSURLSessionWebSocketMessage extends objc.NSObject { NSURLSessionWebSocketMessage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - NSURLSessionWebSocketMessage.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + NSURLSessionWebSocketMessage.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSURLSessionWebSocketMessage); } /// initWithData: NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithData_, data.ref.pointer); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithData_, data.ref.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } /// initWithString: NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithString_, string.ref.pointer); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, string.ref.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } /// type @@ -20865,153 +31675,246 @@ class NSURLSessionWebSocketMessage extends objc.NSObject { /// data objc.NSData? get data { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// string objc.NSString? get string { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_string); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSURLSessionWebSocketMessage init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLSessionWebSocketMessage new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_new); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_new); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: - static NSURLSessionWebSocketMessage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); + static NSURLSessionWebSocketMessage allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLSessionWebSocketMessage alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_alloc); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_alloc); + return NSURLSessionWebSocketMessage.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_cqxsqq(_class_NSURLSessionWebSocketMessage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionWebSocketMessage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionWebSocketMessage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionWebSocketMessage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionWebSocketMessage, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1(_class_NSURLSessionWebSocketMessage, + _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionWebSocketMessage, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionWebSocketMessage, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionWebSocketMessage, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionWebSocketMessage, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionWebSocketMessage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionWebSocketMessage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, + _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLSessionWebSocketMessage self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLSessionWebSocketMessage retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLSessionWebSocketMessage autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: true, release: true); - } -} - -late final _sel_sendMessage_completionHandler_ = objc.registerName("sendMessage:completionHandler:"); -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target.cast arg0, ffi.Pointer arg1)>>() - .asFunction , ffi.Pointer )>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer , ffi.Pointer ))(arg0, arg1); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_sendMessage_completionHandler_ = + objc.registerName("sendMessage:completionHandler:"); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, + objc.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. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSURLSessionWebSocketMessage? , objc.NSError? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0.address == 0 ? null : NSURLSessionWebSocketMessage.castFromPointer(arg0, retain: true, release: true), arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -21022,23 +31925,57 @@ abstract final class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(NSURLSessionWebSocketMessage? , objc.NSError? ) fn) { + static objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + listener(void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0.address == 0 ? null : NSURLSessionWebSocketMessage.castFromPointer(arg0, retain: false, release: true), arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, + retain: false, release: true))); final wrapper = _wrapListenerBlock_1tjlcwl(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, + objc.NSError?)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_CallExtension on objc.ObjCBlock { - void call(NSURLSessionWebSocketMessage? arg0, objc.NSError? arg1) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>().asFunction , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); -} +extension ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_CallExtension + on objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> { + void call(NSURLSessionWebSocketMessage? arg0, objc.NSError? arg1) => + ref.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)>()(ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_receiveMessageWithCompletionHandler_ = + objc.registerName("receiveMessageWithCompletionHandler:"); +late final _sel_sendPingWithPongReceiveHandler_ = + objc.registerName("sendPingWithPongReceiveHandler:"); -late final _sel_receiveMessageWithCompletionHandler_ = objc.registerName("receiveMessageWithCompletionHandler:"); -late final _sel_sendPingWithPongReceiveHandler_ = objc.registerName("sendPingWithPongReceiveHandler:"); enum NSURLSessionWebSocketCloseCode { NSURLSessionWebSocketCloseCodeInvalid(0), NSURLSessionWebSocketCloseCodeNormalClosure(1000), @@ -21054,92 +31991,120 @@ enum NSURLSessionWebSocketCloseCode { NSURLSessionWebSocketCloseCodeInternalServerError(1011), NSURLSessionWebSocketCloseCodeTLSHandshakeFailure(1015); - final int value; const NSURLSessionWebSocketCloseCode(this.value); static NSURLSessionWebSocketCloseCode fromValue(int value) => switch (value) { - 0 => NSURLSessionWebSocketCloseCodeInvalid, - 1000 => NSURLSessionWebSocketCloseCodeNormalClosure, - 1001 => NSURLSessionWebSocketCloseCodeGoingAway, - 1002 => NSURLSessionWebSocketCloseCodeProtocolError, - 1003 => NSURLSessionWebSocketCloseCodeUnsupportedData, - 1005 => NSURLSessionWebSocketCloseCodeNoStatusReceived, - 1006 => NSURLSessionWebSocketCloseCodeAbnormalClosure, - 1007 => NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, - 1008 => NSURLSessionWebSocketCloseCodePolicyViolation, - 1009 => NSURLSessionWebSocketCloseCodeMessageTooBig, - 1010 => NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing, - 1011 => NSURLSessionWebSocketCloseCodeInternalServerError, - 1015 => NSURLSessionWebSocketCloseCodeTLSHandshakeFailure, - _ => throw ArgumentError("Unknown value for NSURLSessionWebSocketCloseCode: $value"), - }; - -} - -late final _sel_cancelWithCloseCode_reason_ = objc.registerName("cancelWithCloseCode:reason:"); -final _objc_msgSend_18im7ej = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , int , ffi.Pointer )>(); + 0 => NSURLSessionWebSocketCloseCodeInvalid, + 1000 => NSURLSessionWebSocketCloseCodeNormalClosure, + 1001 => NSURLSessionWebSocketCloseCodeGoingAway, + 1002 => NSURLSessionWebSocketCloseCodeProtocolError, + 1003 => NSURLSessionWebSocketCloseCodeUnsupportedData, + 1005 => NSURLSessionWebSocketCloseCodeNoStatusReceived, + 1006 => NSURLSessionWebSocketCloseCodeAbnormalClosure, + 1007 => NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, + 1008 => NSURLSessionWebSocketCloseCodePolicyViolation, + 1009 => NSURLSessionWebSocketCloseCodeMessageTooBig, + 1010 => NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing, + 1011 => NSURLSessionWebSocketCloseCodeInternalServerError, + 1015 => NSURLSessionWebSocketCloseCodeTLSHandshakeFailure, + _ => throw ArgumentError( + "Unknown value for NSURLSessionWebSocketCloseCode: $value"), + }; +} + +late final _sel_cancelWithCloseCode_reason_ = + objc.registerName("cancelWithCloseCode:reason:"); +final _objc_msgSend_18im7ej = 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_maximumMessageSize = objc.registerName("maximumMessageSize"); -late final _sel_setMaximumMessageSize_ = objc.registerName("setMaximumMessageSize:"); +late final _sel_setMaximumMessageSize_ = + objc.registerName("setMaximumMessageSize:"); late final _sel_closeCode = objc.registerName("closeCode"); -final _objc_msgSend_a13zbl = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_a13zbl = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_closeReason = objc.registerName("closeReason"); /// NSURLSessionWebSocketTask class NSURLSessionWebSocketTask extends NSURLSessionTask { NSURLSessionWebSocketTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); } /// sendMessage:completionHandler: - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, objc.ObjCBlock completionHandler) { -_objc_msgSend_cmbt6k(this.ref.pointer, _sel_sendMessage_completionHandler_, message.ref.pointer, completionHandler.ref.pointer); - + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + objc.ObjCBlock completionHandler) { + _objc_msgSend_cmbt6k(this.ref.pointer, _sel_sendMessage_completionHandler_, + message.ref.pointer, completionHandler.ref.pointer); } /// receiveMessageWithCompletionHandler: - void receiveMessageWithCompletionHandler_(objc.ObjCBlock completionHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_receiveMessageWithCompletionHandler_, completionHandler.ref.pointer); - + void receiveMessageWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + completionHandler) { + _objc_msgSend_4daxhl( + this.ref.pointer, + _sel_receiveMessageWithCompletionHandler_, + completionHandler.ref.pointer); } /// sendPingWithPongReceiveHandler: - void sendPingWithPongReceiveHandler_(objc.ObjCBlock pongReceiveHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_sendPingWithPongReceiveHandler_, pongReceiveHandler.ref.pointer); - + void sendPingWithPongReceiveHandler_( + objc.ObjCBlock pongReceiveHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.ref.pointer); } /// cancelWithCloseCode:reason: - void cancelWithCloseCode_reason_(NSURLSessionWebSocketCloseCode closeCode, objc.NSData? reason) { -_objc_msgSend_18im7ej(this.ref.pointer, _sel_cancelWithCloseCode_reason_, closeCode.value, reason?.ref.pointer ?? ffi.nullptr); - + void cancelWithCloseCode_reason_( + NSURLSessionWebSocketCloseCode closeCode, objc.NSData? reason) { + _objc_msgSend_18im7ej(this.ref.pointer, _sel_cancelWithCloseCode_reason_, + closeCode.value, reason?.ref.pointer ?? ffi.nullptr); } /// maximumMessageSize int get maximumMessageSize { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_maximumMessageSize); - } /// setMaximumMessageSize: - set maximumMessageSize(int value) { - return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setMaximumMessageSize_, value); - + set maximumMessageSize(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setMaximumMessageSize_, value); } /// closeCode @@ -21151,149 +32116,262 @@ _objc_msgSend_18im7ej(this.ref.pointer, _sel_cancelWithCloseCode_reason_, closeC /// closeReason objc.NSData? get closeReason { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_closeReason); - return _ret.address == 0 ? null : objc.NSData.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// init NSURLSessionWebSocketTask init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } /// new static NSURLSessionWebSocketTask new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_new); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSURLSessionWebSocketTask alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_alloc); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.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_cqxsqq(_class_NSURLSessionWebSocketTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSessionWebSocketTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionWebSocketTask, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionWebSocketTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSessionWebSocketTask, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSessionWebSocketTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSessionWebSocketTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSessionWebSocketTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// self NSURLSessionWebSocketTask self() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_self); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } /// retain NSURLSessionWebSocketTask retain() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_retain); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } /// autorelease NSURLSessionWebSocketTask autorelease() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_autorelease); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: true, release: true); - } -} - -late final _sel_webSocketTaskWithURL_ = objc.registerName("webSocketTaskWithURL:"); -late final _sel_webSocketTaskWithURL_protocols_ = objc.registerName("webSocketTaskWithURL:protocols:"); -late final _sel_webSocketTaskWithRequest_ = objc.registerName("webSocketTaskWithRequest:"); -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_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); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline(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); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_webSocketTaskWithURL_ = + objc.registerName("webSocketTaskWithURL:"); +late final _sel_webSocketTaskWithURL_protocols_ = + objc.registerName("webSocketTaskWithURL:protocols:"); +late final _sel_webSocketTaskWithRequest_ = + objc.registerName("webSocketTaskWithRequest:"); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline( + 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); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.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. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSData? , NSURLResponse? , objc.NSError? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -21304,67 +32382,208 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSData? , NSURLResponse? , objc.NSError? ) fn) { + static objc + .ObjCBlock + listener(void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: false, release: true), arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: false, release: true), arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); final wrapper = _wrapListenerBlock_tenbla(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_CallExtension on objc.ObjCBlock { - void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr, arg2?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_dataTaskWithRequest_completionHandler_ = objc.registerName("dataTaskWithRequest:completionHandler:"); -late final _sel_dataTaskWithURL_completionHandler_ = objc.registerName("dataTaskWithURL:completionHandler:"); -late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); -final _objc_msgSend_37obke = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_uploadTaskWithRequest_fromData_completionHandler_ = objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); -late final _sel_uploadTaskWithResumeData_completionHandler_ = objc.registerName("uploadTaskWithResumeData:completionHandler:"); -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target.cast arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction , ffi.Pointer , ffi.Pointer )>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_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); -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline(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); +extension ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { + void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + ref.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)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_dataTaskWithRequest_completionHandler_ = + objc.registerName("dataTaskWithRequest:completionHandler:"); +late final _sel_dataTaskWithURL_completionHandler_ = + objc.registerName("dataTaskWithURL:completionHandler:"); +late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); +final _objc_msgSend_37obke = 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_uploadTaskWithRequest_fromData_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); +late final _sel_uploadTaskWithResumeData_completionHandler_ = + objc.registerName("uploadTaskWithResumeData:completionHandler:"); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_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); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline( + 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); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )> _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable = ffi.NativeCallable , ffi.Pointer , ffi.Pointer , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.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. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(objc.NSURL? , NSURLResponse? , objc.NSError? ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -21375,44 +32594,86 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(objc.NSURL? , NSURLResponse? , objc.NSError? ) fn) { + static objc + .ObjCBlock + listener(void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn(arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: false, release: true), arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: false, release: true), arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSURL + .castFromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); final wrapper = _wrapListenerBlock_tenbla(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_CallExtension on objc.ObjCBlock { - void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer )>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr, arg2?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_downloadTaskWithRequest_completionHandler_ = objc.registerName("downloadTaskWithRequest:completionHandler:"); -late final _sel_downloadTaskWithURL_completionHandler_ = objc.registerName("downloadTaskWithURL:completionHandler:"); -late final _sel_downloadTaskWithResumeData_completionHandler_ = objc.registerName("downloadTaskWithResumeData:completionHandler:"); +extension ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { + void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + ref.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)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_downloadTaskWithRequest_completionHandler_ = + objc.registerName("downloadTaskWithRequest:completionHandler:"); +late final _sel_downloadTaskWithURL_completionHandler_ = + objc.registerName("downloadTaskWithURL:completionHandler:"); +late final _sel_downloadTaskWithResumeData_completionHandler_ = + objc.registerName("downloadTaskWithResumeData:completionHandler:"); /// NSURLSession class NSURLSession extends objc.NSObject { NSURLSession._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSURLSession] that points to the same underlying object as [other]. - NSURLSession.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSURLSession.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSURLSession] that wraps the given raw object pointer. NSURLSession.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSURLSession]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSession); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSession); } /// sharedSession @@ -21422,14 +32683,24 @@ class NSURLSession extends objc.NSObject { } /// sessionWithConfiguration: - static NSURLSession sessionWithConfiguration_(NSURLSessionConfiguration configuration) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSession, _sel_sessionWithConfiguration_, configuration.ref.pointer); + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_juohf7(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.ref.pointer); return NSURLSession.castFromPointer(_ret, retain: true, release: true); } /// sessionWithConfiguration:delegate:delegateQueue: - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_(NSURLSessionConfiguration configuration, objc.ObjCObjectBase? delegate, NSOperationQueue? queue) { - final _ret = _objc_msgSend_aud7dn(_class_NSURLSession, _sel_sessionWithConfiguration_delegate_delegateQueue_, configuration.ref.pointer, delegate?.ref.pointer ?? ffi.nullptr, queue?.ref.pointer ?? ffi.nullptr); + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.ObjCObjectBase? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr, + queue?.ref.pointer ?? ffi.nullptr); return NSURLSession.castFromPointer(_ret, retain: true, release: true); } @@ -21442,150 +32713,202 @@ class NSURLSession extends objc.NSObject { /// delegate objc.ObjCObjectBase? get delegate { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// configuration NSURLSessionConfiguration get configuration { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_configuration); - return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } /// sessionDescription objc.NSString? get sessionDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sessionDescription); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sessionDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setSessionDescription: - set sessionDescription(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSessionDescription_, value?.ref.pointer ?? ffi.nullptr); - + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSessionDescription_, + value?.ref.pointer ?? ffi.nullptr); } /// finishTasksAndInvalidate void finishTasksAndInvalidate() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_finishTasksAndInvalidate); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_finishTasksAndInvalidate); } /// invalidateAndCancel void invalidateAndCancel() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidateAndCancel); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidateAndCancel); } /// resetWithCompletionHandler: - void resetWithCompletionHandler_(objc.ObjCBlock completionHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_resetWithCompletionHandler_, completionHandler.ref.pointer); - + void resetWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_resetWithCompletionHandler_, + completionHandler.ref.pointer); } /// flushWithCompletionHandler: - void flushWithCompletionHandler_(objc.ObjCBlock completionHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_flushWithCompletionHandler_, completionHandler.ref.pointer); - + void flushWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_flushWithCompletionHandler_, + completionHandler.ref.pointer); } /// getTasksWithCompletionHandler: - void getTasksWithCompletionHandler_(objc.ObjCBlock completionHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_getTasksWithCompletionHandler_, completionHandler.ref.pointer); - + void getTasksWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(objc.NSArray, objc.NSArray, objc.NSArray)> + completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.ref.pointer); } /// getAllTasksWithCompletionHandler: - void getAllTasksWithCompletionHandler_(objc.ObjCBlock completionHandler) { -_objc_msgSend_4daxhl(this.ref.pointer, _sel_getAllTasksWithCompletionHandler_, completionHandler.ref.pointer); - + void getAllTasksWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, + _sel_getAllTasksWithCompletionHandler_, completionHandler.ref.pointer); } /// dataTaskWithRequest: NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_dataTaskWithRequest_, request.ref.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dataTaskWithRequest_, request.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } /// dataTaskWithURL: NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_dataTaskWithURL_, url.ref.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dataTaskWithURL_, url.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } /// uploadTaskWithRequest:fromFile: - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_(NSURLRequest request, objc.NSURL fileURL) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_uploadTaskWithRequest_fromFile_, request.ref.pointer, fileURL.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromFile_, + request.ref.pointer, + fileURL.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// uploadTaskWithRequest:fromData: - NSURLSessionUploadTask uploadTaskWithRequest_fromData_(NSURLRequest request, objc.NSData bodyData) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_uploadTaskWithRequest_fromData_, request.ref.pointer, bodyData.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromData_, + request.ref.pointer, + bodyData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// uploadTaskWithResumeData: NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_uploadTaskWithResumeData_, resumeData.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_uploadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// uploadTaskWithStreamedRequest: NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_uploadTaskWithStreamedRequest_, request.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_uploadTaskWithStreamedRequest_, request.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// downloadTaskWithRequest: NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_downloadTaskWithRequest_, request.ref.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_downloadTaskWithRequest_, request.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// downloadTaskWithURL: NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_downloadTaskWithURL_, url.ref.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_downloadTaskWithURL_, url.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// downloadTaskWithResumeData: NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_downloadTaskWithResumeData_, resumeData.ref.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_downloadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// streamTaskWithHostName:port: - NSURLSessionStreamTask streamTaskWithHostName_port_(objc.NSString hostname, int port) { - final _ret = _objc_msgSend_spwp90(this.ref.pointer, _sel_streamTaskWithHostName_port_, hostname.ref.pointer, port); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, int port) { + final _ret = _objc_msgSend_spwp90(this.ref.pointer, + _sel_streamTaskWithHostName_port_, hostname.ref.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } /// streamTaskWithNetService: NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_streamTaskWithNetService_, service.ref.pointer); - return NSURLSessionStreamTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_streamTaskWithNetService_, service.ref.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } /// webSocketTaskWithURL: NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_webSocketTaskWithURL_, url.ref.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_webSocketTaskWithURL_, url.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } /// webSocketTaskWithURL:protocols: - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_(objc.NSURL url, objc.NSArray protocols) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_webSocketTaskWithURL_protocols_, url.ref.pointer, protocols.ref.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.NSArray protocols) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_webSocketTaskWithURL_protocols_, + url.ref.pointer, + protocols.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } /// webSocketTaskWithRequest: NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_webSocketTaskWithRequest_, request.ref.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_webSocketTaskWithRequest_, request.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } /// init NSURLSession init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSURLSession.castFromPointer(_ret, retain: false, release: true); } @@ -21596,56 +32919,133 @@ _objc_msgSend_4daxhl(this.ref.pointer, _sel_getAllTasksWithCompletionHandler_, c } /// dataTaskWithRequest:completionHandler: - NSURLSessionDataTask dataTaskWithRequest_completionHandler_(NSURLRequest request, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_1kkhn3j(this.ref.pointer, _sel_dataTaskWithRequest_completionHandler_, request.ref.pointer, completionHandler.ref.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_dataTaskWithRequest_completionHandler_, + request.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } /// dataTaskWithURL:completionHandler: - NSURLSessionDataTask dataTaskWithURL_completionHandler_(objc.NSURL url, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_1kkhn3j(this.ref.pointer, _sel_dataTaskWithURL_completionHandler_, url.ref.pointer, completionHandler.ref.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_dataTaskWithURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } /// uploadTaskWithRequest:fromFile:completionHandler: - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_(NSURLRequest request, objc.NSURL fileURL, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_37obke(this.ref.pointer, _sel_uploadTaskWithRequest_fromFile_completionHandler_, request.ref.pointer, fileURL.ref.pointer, completionHandler.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + objc.NSURL fileURL, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_37obke( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromFile_completionHandler_, + request.ref.pointer, + fileURL.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// uploadTaskWithRequest:fromData:completionHandler: - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_(NSURLRequest request, objc.NSData? bodyData, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_37obke(this.ref.pointer, _sel_uploadTaskWithRequest_fromData_completionHandler_, request.ref.pointer, bodyData?.ref.pointer ?? ffi.nullptr, completionHandler.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + objc.NSData? bodyData, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_37obke( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromData_completionHandler_, + request.ref.pointer, + bodyData?.ref.pointer ?? ffi.nullptr, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// uploadTaskWithResumeData:completionHandler: - NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_(objc.NSData resumeData, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_1kkhn3j(this.ref.pointer, _sel_uploadTaskWithResumeData_completionHandler_, resumeData.ref.pointer, completionHandler.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_uploadTaskWithResumeData_completionHandler_, + resumeData.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } /// downloadTaskWithRequest:completionHandler: - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_(NSURLRequest request, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_1kkhn3j(this.ref.pointer, _sel_downloadTaskWithRequest_completionHandler_, request.ref.pointer, completionHandler.ref.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithRequest_completionHandler_, + request.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// downloadTaskWithURL:completionHandler: - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(objc.NSURL url, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_1kkhn3j(this.ref.pointer, _sel_downloadTaskWithURL_completionHandler_, url.ref.pointer, completionHandler.ref.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// downloadTaskWithResumeData:completionHandler: - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_(objc.NSData resumeData, objc.ObjCBlock completionHandler) { - final _ret = _objc_msgSend_1kkhn3j(this.ref.pointer, _sel_downloadTaskWithResumeData_completionHandler_, resumeData.ref.pointer, completionHandler.ref.pointer); - return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithResumeData_completionHandler_, + resumeData.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } /// allocWithZone: static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSURLSession, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLSession, _sel_allocWithZone_, zone); return NSURLSession.castFromPointer(_ret, retain: false, release: true); } @@ -21656,56 +33056,70 @@ _objc_msgSend_4daxhl(this.ref.pointer, _sel_getAllTasksWithCompletionHandler_, c } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSURLSession, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSURLSession, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSURLSession, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSURLSession, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSURLSession, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSURLSession, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSURLSession, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSession, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSURLSession, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSURLSession, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSURLSession, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSURLSession, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSURLSession, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSession, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -21730,28 +33144,30 @@ _objc_msgSend_1tjlcwl(_class_NSURLSession, _sel_setKeys_triggerChangeNotificatio late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); late final _sel_target = objc.registerName("target"); -late final _sel_protocolCheckerWithTarget_protocol_ = objc.registerName("protocolCheckerWithTarget:protocol:"); -late final _sel_initWithTarget_protocol_ = objc.registerName("initWithTarget:protocol:"); +late final _sel_protocolCheckerWithTarget_protocol_ = + objc.registerName("protocolCheckerWithTarget:protocol:"); +late final _sel_initWithTarget_protocol_ = + objc.registerName("initWithTarget:protocol:"); /// NSProtocolChecker class NSProtocolChecker extends objc.NSProxy { NSProtocolChecker._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSProtocolChecker] that points to the same underlying object as [other]. - NSProtocolChecker.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSProtocolChecker.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSProtocolChecker] that wraps the given raw object pointer. NSProtocolChecker.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSProtocolChecker]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); } /// protocol @@ -21763,19 +33179,32 @@ class NSProtocolChecker extends objc.NSProxy { /// target objc.NSObject? get target { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_target); - return _ret.address == 0 ? null : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } /// protocolCheckerWithTarget:protocol: - static NSProtocolChecker protocolCheckerWithTarget_protocol_(objc.NSObject anObject, objc.Protocol aProtocol) { - final _ret = _objc_msgSend_iq11qg(_class_NSProtocolChecker, _sel_protocolCheckerWithTarget_protocol_, anObject.ref.pointer, aProtocol.ref.pointer); + static NSProtocolChecker protocolCheckerWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_iq11qg( + _class_NSProtocolChecker, + _sel_protocolCheckerWithTarget_protocol_, + anObject.ref.pointer, + aProtocol.ref.pointer); return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); } /// initWithTarget:protocol: - NSProtocolChecker initWithTarget_protocol_(objc.NSObject anObject, objc.Protocol aProtocol) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithTarget_protocol_, anObject.ref.pointer, aProtocol.ref.pointer); - return NSProtocolChecker.castFromPointer(_ret, retain: false, release: true); + NSProtocolChecker initWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithTarget_protocol_, + anObject.ref.pointer, + aProtocol.ref.pointer); + return NSProtocolChecker.castFromPointer(_ret, + retain: false, release: true); } /// alloc @@ -21808,76 +33237,126 @@ late final _sel_setExecutableURL_ = objc.registerName("setExecutableURL:"); late final _sel_setArguments_ = objc.registerName("setArguments:"); late final _sel_setEnvironment_ = objc.registerName("setEnvironment:"); late final _sel_currentDirectoryURL = objc.registerName("currentDirectoryURL"); -late final _sel_setCurrentDirectoryURL_ = objc.registerName("setCurrentDirectoryURL:"); +late final _sel_setCurrentDirectoryURL_ = + objc.registerName("setCurrentDirectoryURL:"); late final _sel_standardInput = objc.registerName("standardInput"); late final _sel_setStandardInput_ = objc.registerName("setStandardInput:"); late final _sel_standardOutput = objc.registerName("standardOutput"); late final _sel_setStandardOutput_ = objc.registerName("setStandardOutput:"); late final _sel_standardError = objc.registerName("standardError"); late final _sel_setStandardError_ = objc.registerName("setStandardError:"); -late final _sel_launchAndReturnError_ = objc.registerName("launchAndReturnError:"); +late final _sel_launchAndReturnError_ = + objc.registerName("launchAndReturnError:"); late final _sel_interrupt = objc.registerName("interrupt"); late final _sel_terminate = objc.registerName("terminate"); late final _sel_isRunning = objc.registerName("isRunning"); late final _sel_terminationStatus = objc.registerName("terminationStatus"); + enum NSTaskTerminationReason { NSTaskTerminationReasonExit(1), NSTaskTerminationReasonUncaughtSignal(2); - final int value; const NSTaskTerminationReason(this.value); static NSTaskTerminationReason fromValue(int value) => switch (value) { - 1 => NSTaskTerminationReasonExit, - 2 => NSTaskTerminationReasonUncaughtSignal, - _ => throw ArgumentError("Unknown value for NSTaskTerminationReason: $value"), - }; - + 1 => NSTaskTerminationReasonExit, + 2 => NSTaskTerminationReasonUncaughtSignal, + _ => throw ArgumentError( + "Unknown value for NSTaskTerminationReason: $value"), + }; } late final _sel_terminationReason = objc.registerName("terminationReason"); -final _objc_msgSend_19wfngj = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target.cast arg0)>>() - .asFunction )>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSTask_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSTask_closureTrampoline(ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSTask_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer , ffi.Pointer )>(_ObjCBlock_ffiVoid_NSTask_closureTrampoline ).cast(); -void _ObjCBlock_ffiVoid_NSTask_listenerTrampoline(ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer ))(arg0); +final _objc_msgSend_19wfngj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSTask_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } -ffi.NativeCallable , ffi.Pointer )> _ObjCBlock_ffiVoid_NSTask_listenerCallable = ffi.NativeCallable , ffi.Pointer )>.listener( - _ObjCBlock_ffiVoid_NSTask_listenerTrampoline )..keepIsolateAlive = false; + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSTask_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTask_listenerTrampoline) + ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_NSTask { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - objc.ObjCBlock(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSTask_fnPtrCallable, ptr.cast()), - retain: false, release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSTask_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSTask ) fn) => - objc.ObjCBlock(objc.newClosureBlock(_ObjCBlock_ffiVoid_NSTask_closureCallable, (ffi.Pointer arg0) => fn(NSTask.castFromPointer(arg0, retain: true, release: true))), - retain: false, release: true); + static objc.ObjCBlock fromFunction( + void Function(NSTask) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSTask_closureCallable, + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -21888,207 +33367,254 @@ abstract final class ObjCBlock_ffiVoid_NSTask { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener(void Function(NSTask ) fn) { + static objc.ObjCBlock listener( + void Function(NSTask) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSTask_listenerCallable.nativeFunction.cast(), (ffi.Pointer arg0) => fn(NSTask.castFromPointer(arg0, retain: false, release: true))); + _ObjCBlock_ffiVoid_NSTask_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => + fn(NSTask.castFromPointer(arg0, retain: false, release: true))); final wrapper = _wrapListenerBlock_ukcdfq(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } /// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSTask_CallExtension on objc.ObjCBlock { - void call(NSTask arg0) =>ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction , ffi.Pointer )>()( - ref.pointer, arg0.ref.pointer); +extension ObjCBlock_ffiVoid_NSTask_CallExtension + on objc.ObjCBlock { + void call(NSTask arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); } late final _sel_terminationHandler = objc.registerName("terminationHandler"); -late final _sel_setTerminationHandler_ = objc.registerName("setTerminationHandler:"); -late final _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_ = objc.registerName("launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); -final _objc_msgSend_1rgs79u = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> , ffi.Pointer )>(); +late final _sel_setTerminationHandler_ = + objc.registerName("setTerminationHandler:"); +late final _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_ = + objc.registerName( + "launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); +final _objc_msgSend_1rgs79u = 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_waitUntilExit = objc.registerName("waitUntilExit"); late final _sel_launchPath = objc.registerName("launchPath"); late final _sel_setLaunchPath_ = objc.registerName("setLaunchPath:"); -late final _sel_setCurrentDirectoryPath_ = objc.registerName("setCurrentDirectoryPath:"); +late final _sel_setCurrentDirectoryPath_ = + objc.registerName("setCurrentDirectoryPath:"); late final _sel_launch = objc.registerName("launch"); -late final _sel_launchedTaskWithLaunchPath_arguments_ = objc.registerName("launchedTaskWithLaunchPath:arguments:"); +late final _sel_launchedTaskWithLaunchPath_arguments_ = + objc.registerName("launchedTaskWithLaunchPath:arguments:"); /// NSTask class NSTask extends objc.NSObject { NSTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSTask] that points to the same underlying object as [other]. - NSTask.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSTask] that wraps the given raw object pointer. NSTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSTask]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSTask); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSTask); } /// init NSTask init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSTask.castFromPointer(_ret, retain: false, release: true); } /// executableURL objc.NSURL? get executableURL { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executableURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setExecutableURL: - set executableURL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setExecutableURL_, value?.ref.pointer ?? ffi.nullptr); - + set executableURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setExecutableURL_, + value?.ref.pointer ?? ffi.nullptr); } /// arguments objc.NSArray? get arguments { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_arguments); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setArguments: - set arguments(objc.NSArray? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setArguments_, value?.ref.pointer ?? ffi.nullptr); - + set arguments(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setArguments_, + value?.ref.pointer ?? ffi.nullptr); } /// environment objc.NSDictionary? get environment { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_environment); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setEnvironment: - set environment(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEnvironment_, value?.ref.pointer ?? ffi.nullptr); - + set environment(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEnvironment_, + value?.ref.pointer ?? ffi.nullptr); } /// currentDirectoryURL objc.NSURL? get currentDirectoryURL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryURL); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// setCurrentDirectoryURL: - set currentDirectoryURL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrentDirectoryURL_, value?.ref.pointer ?? ffi.nullptr); - + set currentDirectoryURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrentDirectoryURL_, + value?.ref.pointer ?? ffi.nullptr); } /// standardInput objc.ObjCObjectBase? get standardInput { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standardInput); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setStandardInput: - set standardInput(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardInput_, value?.ref.pointer ?? ffi.nullptr); - + set standardInput(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardInput_, + value?.ref.pointer ?? ffi.nullptr); } /// standardOutput objc.ObjCObjectBase? get standardOutput { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standardOutput); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setStandardOutput: - set standardOutput(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardOutput_, value?.ref.pointer ?? ffi.nullptr); - + set standardOutput(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardOutput_, + value?.ref.pointer ?? ffi.nullptr); } /// standardError objc.ObjCObjectBase? get standardError { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_standardError); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setStandardError: - set standardError(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardError_, value?.ref.pointer ?? ffi.nullptr); - + set standardError(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStandardError_, + value?.ref.pointer ?? ffi.nullptr); } /// launchAndReturnError: bool launchAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_1rk90ll(this.ref.pointer, _sel_launchAndReturnError_, error); - + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_launchAndReturnError_, error); } /// interrupt void interrupt() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_interrupt); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_interrupt); } /// terminate void terminate() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_terminate); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_terminate); } /// suspend bool suspend() { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_suspend); - } /// resume bool resume() { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_resume); - } /// processIdentifier int get processIdentifier { return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_processIdentifier); - } /// isRunning bool get running { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isRunning); - } /// terminationStatus int get terminationStatus { return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_terminationStatus); - } /// terminationReason NSTaskTerminationReason get terminationReason { - final _ret = _objc_msgSend_19wfngj(this.ref.pointer, _sel_terminationReason); + final _ret = + _objc_msgSend_19wfngj(this.ref.pointer, _sel_terminationReason); return NSTaskTerminationReason.fromValue(_ret); } /// terminationHandler objc.ObjCBlock? get terminationHandler { - final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_terminationHandler); - return _ret.address == 0 ? null : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_terminationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, + retain: true, release: true); } /// setTerminationHandler: - set terminationHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setTerminationHandler_, value?.ref.pointer ?? ffi.nullptr); - + set terminationHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setTerminationHandler_, + value?.ref.pointer ?? ffi.nullptr); } /// qualityOfService @@ -22098,56 +33624,75 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_terminate); } /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_1fcr8u4(this.ref.pointer, _sel_setQualityOfService_, value.value); - + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); } /// launchedTaskWithExecutableURL:arguments:error:terminationHandler: - static NSTask? launchedTaskWithExecutableURL_arguments_error_terminationHandler_(objc.NSURL url, objc.NSArray arguments, ffi.Pointer> error, objc.ObjCBlock? terminationHandler) { - final _ret = _objc_msgSend_1rgs79u(_class_NSTask, _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, url.ref.pointer, arguments.ref.pointer, error, terminationHandler?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSTask.castFromPointer(_ret, retain: true, release: true); + static NSTask? + launchedTaskWithExecutableURL_arguments_error_terminationHandler_( + objc.NSURL url, + objc.NSArray arguments, + ffi.Pointer> error, + objc.ObjCBlock? terminationHandler) { + final _ret = _objc_msgSend_1rgs79u( + _class_NSTask, + _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, + url.ref.pointer, + arguments.ref.pointer, + error, + terminationHandler?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTask.castFromPointer(_ret, retain: true, release: true); } /// waitUntilExit void waitUntilExit() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilExit); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilExit); } /// launchPath objc.NSString? get launchPath { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_launchPath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setLaunchPath: - set launchPath(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLaunchPath_, value?.ref.pointer ?? ffi.nullptr); - + set launchPath(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setLaunchPath_, + value?.ref.pointer ?? ffi.nullptr); } /// currentDirectoryPath objc.NSString get currentDirectoryPath { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryPath); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentDirectoryPath); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCurrentDirectoryPath: - set currentDirectoryPath(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCurrentDirectoryPath_, value.ref.pointer); - + set currentDirectoryPath(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setCurrentDirectoryPath_, value.ref.pointer); } /// launch void launch() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_launch); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_launch); } /// launchedTaskWithLaunchPath:arguments: - static NSTask launchedTaskWithLaunchPath_arguments_(objc.NSString path, objc.NSArray arguments) { - final _ret = _objc_msgSend_iq11qg(_class_NSTask, _sel_launchedTaskWithLaunchPath_arguments_, path.ref.pointer, arguments.ref.pointer); + static NSTask launchedTaskWithLaunchPath_arguments_( + objc.NSString path, objc.NSArray arguments) { + final _ret = _objc_msgSend_iq11qg( + _class_NSTask, + _sel_launchedTaskWithLaunchPath_arguments_, + path.ref.pointer, + arguments.ref.pointer); return NSTask.castFromPointer(_ret, retain: true, release: true); } @@ -22159,7 +33704,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_launch); /// allocWithZone: static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSTask, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSTask, _sel_allocWithZone_, zone); return NSTask.castFromPointer(_ret, retain: false, release: true); } @@ -22170,56 +33716,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_launch); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSTask, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSTask, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSTask, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSTask, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSTask, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTask, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSTask, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSTask, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSTask, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -22243,6 +33803,7 @@ _objc_msgSend_1tjlcwl(_class_NSTask, _sel_setKeys_triggerChangeNotificationsForD } late final _class_NSXMLNode = objc.getClass("NSXMLNode"); + enum NSXMLNodeKind { NSXMLInvalidKind(0), NSXMLDocumentKind(1), @@ -22258,31 +33819,37 @@ enum NSXMLNodeKind { NSXMLElementDeclarationKind(11), NSXMLNotationDeclarationKind(12); - final int value; const NSXMLNodeKind(this.value); static NSXMLNodeKind fromValue(int value) => switch (value) { - 0 => NSXMLInvalidKind, - 1 => NSXMLDocumentKind, - 2 => NSXMLElementKind, - 3 => NSXMLAttributeKind, - 4 => NSXMLNamespaceKind, - 5 => NSXMLProcessingInstructionKind, - 6 => NSXMLCommentKind, - 7 => NSXMLTextKind, - 8 => NSXMLDTDKind, - 9 => NSXMLEntityDeclarationKind, - 10 => NSXMLAttributeDeclarationKind, - 11 => NSXMLElementDeclarationKind, - 12 => NSXMLNotationDeclarationKind, - _ => throw ArgumentError("Unknown value for NSXMLNodeKind: $value"), - }; - + 0 => NSXMLInvalidKind, + 1 => NSXMLDocumentKind, + 2 => NSXMLElementKind, + 3 => NSXMLAttributeKind, + 4 => NSXMLNamespaceKind, + 5 => NSXMLProcessingInstructionKind, + 6 => NSXMLCommentKind, + 7 => NSXMLTextKind, + 8 => NSXMLDTDKind, + 9 => NSXMLEntityDeclarationKind, + 10 => NSXMLAttributeDeclarationKind, + 11 => NSXMLElementDeclarationKind, + 12 => NSXMLNotationDeclarationKind, + _ => throw ArgumentError("Unknown value for NSXMLNodeKind: $value"), + }; } late final _sel_initWithKind_ = objc.registerName("initWithKind:"); -final _objc_msgSend_ayvqtd = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_ayvqtd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + enum NSXMLNodeOptions { NSXMLNodeOptionsNone(0), NSXMLNodeIsCDATA(1), @@ -22313,116 +33880,197 @@ enum NSXMLNodeOptions { NSXMLNodePreserveQuotes(24), NSXMLNodePreserveAll(4293918750); - final int value; const NSXMLNodeOptions(this.value); static NSXMLNodeOptions fromValue(int value) => switch (value) { - 0 => NSXMLNodeOptionsNone, - 1 => NSXMLNodeIsCDATA, - 2 => NSXMLNodeExpandEmptyElement, - 4 => NSXMLNodeCompactEmptyElement, - 8 => NSXMLNodeUseSingleQuotes, - 16 => NSXMLNodeUseDoubleQuotes, - 32 => NSXMLNodeNeverEscapeContents, - 512 => NSXMLDocumentTidyHTML, - 1024 => NSXMLDocumentTidyXML, - 8192 => NSXMLDocumentValidate, - 16384 => NSXMLNodeLoadExternalEntitiesAlways, - 32768 => NSXMLNodeLoadExternalEntitiesSameOriginOnly, - 524288 => NSXMLNodeLoadExternalEntitiesNever, - 65536 => NSXMLDocumentXInclude, - 131072 => NSXMLNodePrettyPrint, - 262144 => NSXMLDocumentIncludeContentTypeDeclaration, - 1048576 => NSXMLNodePreserveNamespaceOrder, - 2097152 => NSXMLNodePreserveAttributeOrder, - 4194304 => NSXMLNodePreserveEntities, - 8388608 => NSXMLNodePreservePrefixes, - 16777216 => NSXMLNodePreserveCDATA, - 33554432 => NSXMLNodePreserveWhitespace, - 67108864 => NSXMLNodePreserveDTD, - 134217728 => NSXMLNodePreserveCharacterReferences, - 268435456 => NSXMLNodePromoteSignificantWhitespace, - 6 => NSXMLNodePreserveEmptyElements, - 24 => NSXMLNodePreserveQuotes, - 4293918750 => NSXMLNodePreserveAll, - _ => throw ArgumentError("Unknown value for NSXMLNodeOptions: $value"), - }; - -} - -late final _sel_initWithKind_options_ = objc.registerName("initWithKind:options:"); -final _objc_msgSend_hddv7u = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int , int )>(); + 0 => NSXMLNodeOptionsNone, + 1 => NSXMLNodeIsCDATA, + 2 => NSXMLNodeExpandEmptyElement, + 4 => NSXMLNodeCompactEmptyElement, + 8 => NSXMLNodeUseSingleQuotes, + 16 => NSXMLNodeUseDoubleQuotes, + 32 => NSXMLNodeNeverEscapeContents, + 512 => NSXMLDocumentTidyHTML, + 1024 => NSXMLDocumentTidyXML, + 8192 => NSXMLDocumentValidate, + 16384 => NSXMLNodeLoadExternalEntitiesAlways, + 32768 => NSXMLNodeLoadExternalEntitiesSameOriginOnly, + 524288 => NSXMLNodeLoadExternalEntitiesNever, + 65536 => NSXMLDocumentXInclude, + 131072 => NSXMLNodePrettyPrint, + 262144 => NSXMLDocumentIncludeContentTypeDeclaration, + 1048576 => NSXMLNodePreserveNamespaceOrder, + 2097152 => NSXMLNodePreserveAttributeOrder, + 4194304 => NSXMLNodePreserveEntities, + 8388608 => NSXMLNodePreservePrefixes, + 16777216 => NSXMLNodePreserveCDATA, + 33554432 => NSXMLNodePreserveWhitespace, + 67108864 => NSXMLNodePreserveDTD, + 134217728 => NSXMLNodePreserveCharacterReferences, + 268435456 => NSXMLNodePromoteSignificantWhitespace, + 6 => NSXMLNodePreserveEmptyElements, + 24 => NSXMLNodePreserveQuotes, + 4293918750 => NSXMLNodePreserveAll, + _ => throw ArgumentError("Unknown value for NSXMLNodeOptions: $value"), + }; +} + +late final _sel_initWithKind_options_ = + objc.registerName("initWithKind:options:"); +final _objc_msgSend_hddv7u = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, int)>(); late final _sel_document = objc.registerName("document"); -late final _sel_documentWithRootElement_ = objc.registerName("documentWithRootElement:"); +late final _sel_documentWithRootElement_ = + objc.registerName("documentWithRootElement:"); late final _sel_elementWithName_ = objc.registerName("elementWithName:"); -late final _sel_elementWithName_URI_ = objc.registerName("elementWithName:URI:"); -late final _sel_elementWithName_stringValue_ = objc.registerName("elementWithName:stringValue:"); -late final _sel_elementWithName_children_attributes_ = objc.registerName("elementWithName:children:attributes:"); -late final _sel_attributeWithName_stringValue_ = objc.registerName("attributeWithName:stringValue:"); -late final _sel_attributeWithName_URI_stringValue_ = objc.registerName("attributeWithName:URI:stringValue:"); -late final _sel_namespaceWithName_stringValue_ = objc.registerName("namespaceWithName:stringValue:"); -late final _sel_processingInstructionWithName_stringValue_ = objc.registerName("processingInstructionWithName:stringValue:"); -late final _sel_commentWithStringValue_ = objc.registerName("commentWithStringValue:"); -late final _sel_textWithStringValue_ = objc.registerName("textWithStringValue:"); -late final _sel_DTDNodeWithXMLString_ = objc.registerName("DTDNodeWithXMLString:"); -final _objc_msgSend_1edk5dx = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +late final _sel_elementWithName_URI_ = + objc.registerName("elementWithName:URI:"); +late final _sel_elementWithName_stringValue_ = + objc.registerName("elementWithName:stringValue:"); +late final _sel_elementWithName_children_attributes_ = + objc.registerName("elementWithName:children:attributes:"); +late final _sel_attributeWithName_stringValue_ = + objc.registerName("attributeWithName:stringValue:"); +late final _sel_attributeWithName_URI_stringValue_ = + objc.registerName("attributeWithName:URI:stringValue:"); +late final _sel_namespaceWithName_stringValue_ = + objc.registerName("namespaceWithName:stringValue:"); +late final _sel_processingInstructionWithName_stringValue_ = + objc.registerName("processingInstructionWithName:stringValue:"); +late final _sel_commentWithStringValue_ = + objc.registerName("commentWithStringValue:"); +late final _sel_textWithStringValue_ = + objc.registerName("textWithStringValue:"); +late final _sel_DTDNodeWithXMLString_ = + objc.registerName("DTDNodeWithXMLString:"); +final _objc_msgSend_1edk5dx = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_objectValue = objc.registerName("objectValue"); late final _sel_setObjectValue_ = objc.registerName("setObjectValue:"); late final _sel_stringValue = objc.registerName("stringValue"); late final _sel_setStringValue_ = objc.registerName("setStringValue:"); -late final _sel_setStringValue_resolvingEntities_ = objc.registerName("setStringValue:resolvingEntities:"); +late final _sel_setStringValue_resolvingEntities_ = + objc.registerName("setStringValue:resolvingEntities:"); late final _sel_index = objc.registerName("index"); late final _sel_level = objc.registerName("level"); late final _class_NSXMLDocument = objc.getClass("NSXMLDocument"); -late final _sel_initWithXMLString_options_error_ = objc.registerName("initWithXMLString:options:error:"); -final _objc_msgSend_1go5rz8 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , int , ffi.Pointer> )>(); -late final _sel_initWithContentsOfURL_options_error_ = objc.registerName("initWithContentsOfURL:options:error:"); -late final _sel_initWithData_options_error_ = objc.registerName("initWithData:options:error:"); -late final _sel_initWithRootElement_ = objc.registerName("initWithRootElement:"); -late final _sel_replacementClassForClass_ = objc.registerName("replacementClassForClass:"); +late final _sel_initWithXMLString_options_error_ = + objc.registerName("initWithXMLString:options:error:"); +final _objc_msgSend_1go5rz8 = 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_initWithContentsOfURL_options_error_ = + objc.registerName("initWithContentsOfURL:options:error:"); +late final _sel_initWithData_options_error_ = + objc.registerName("initWithData:options:error:"); +late final _sel_initWithRootElement_ = + objc.registerName("initWithRootElement:"); +late final _sel_replacementClassForClass_ = + objc.registerName("replacementClassForClass:"); late final _sel_characterEncoding = objc.registerName("characterEncoding"); -late final _sel_setCharacterEncoding_ = objc.registerName("setCharacterEncoding:"); +late final _sel_setCharacterEncoding_ = + objc.registerName("setCharacterEncoding:"); late final _sel_setVersion_ = objc.registerName("setVersion:"); late final _sel_isStandalone = objc.registerName("isStandalone"); late final _sel_setStandalone_ = objc.registerName("setStandalone:"); + enum NSXMLDocumentContentKind { NSXMLDocumentXMLKind(0), NSXMLDocumentXHTMLKind(1), NSXMLDocumentHTMLKind(2), NSXMLDocumentTextKind(3); - final int value; const NSXMLDocumentContentKind(this.value); static NSXMLDocumentContentKind fromValue(int value) => switch (value) { - 0 => NSXMLDocumentXMLKind, - 1 => NSXMLDocumentXHTMLKind, - 2 => NSXMLDocumentHTMLKind, - 3 => NSXMLDocumentTextKind, - _ => throw ArgumentError("Unknown value for NSXMLDocumentContentKind: $value"), - }; - + 0 => NSXMLDocumentXMLKind, + 1 => NSXMLDocumentXHTMLKind, + 2 => NSXMLDocumentHTMLKind, + 3 => NSXMLDocumentTextKind, + _ => throw ArgumentError( + "Unknown value for NSXMLDocumentContentKind: $value"), + }; } late final _sel_documentContentKind = objc.registerName("documentContentKind"); -final _objc_msgSend_vx3pa9 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_setDocumentContentKind_ = objc.registerName("setDocumentContentKind:"); -final _objc_msgSend_zmck60 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_vx3pa9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDocumentContentKind_ = + objc.registerName("setDocumentContentKind:"); +final _objc_msgSend_zmck60 = 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_setMIMEType_ = objc.registerName("setMIMEType:"); late final _class_NSXMLDTD = objc.getClass("NSXMLDTD"); late final _sel_setPublicID_ = objc.registerName("setPublicID:"); late final _sel_setSystemID_ = objc.registerName("setSystemID:"); -late final _sel_insertChild_atIndex_ = objc.registerName("insertChild:atIndex:"); -late final _sel_insertChildren_atIndex_ = objc.registerName("insertChildren:atIndex:"); +late final _sel_insertChild_atIndex_ = + objc.registerName("insertChild:atIndex:"); +late final _sel_insertChildren_atIndex_ = + objc.registerName("insertChildren:atIndex:"); late final _sel_removeChildAtIndex_ = objc.registerName("removeChildAtIndex:"); late final _sel_setChildren_ = objc.registerName("setChildren:"); late final _sel_addChild_ = objc.registerName("addChild:"); -late final _sel_replaceChildAtIndex_withNode_ = objc.registerName("replaceChildAtIndex:withNode:"); -final _objc_msgSend_1a4j45m = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong , ffi.Pointer )>>().asFunction , ffi.Pointer , int , ffi.Pointer )>(); +late final _sel_replaceChildAtIndex_withNode_ = + objc.registerName("replaceChildAtIndex:withNode:"); +final _objc_msgSend_1a4j45m = 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 _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); + enum NSXMLDTDNodeKind { NSXMLEntityGeneralKind(1), NSXMLEntityParsedKind(2), @@ -22445,83 +34093,102 @@ enum NSXMLDTDNodeKind { NSXMLElementDeclarationMixedKind(19), NSXMLElementDeclarationElementKind(20); - final int value; const NSXMLDTDNodeKind(this.value); static NSXMLDTDNodeKind fromValue(int value) => switch (value) { - 1 => NSXMLEntityGeneralKind, - 2 => NSXMLEntityParsedKind, - 3 => NSXMLEntityUnparsedKind, - 4 => NSXMLEntityParameterKind, - 5 => NSXMLEntityPredefined, - 6 => NSXMLAttributeCDATAKind, - 7 => NSXMLAttributeIDKind, - 8 => NSXMLAttributeIDRefKind, - 9 => NSXMLAttributeIDRefsKind, - 10 => NSXMLAttributeEntityKind, - 11 => NSXMLAttributeEntitiesKind, - 12 => NSXMLAttributeNMTokenKind, - 13 => NSXMLAttributeNMTokensKind, - 14 => NSXMLAttributeEnumerationKind, - 15 => NSXMLAttributeNotationKind, - 16 => NSXMLElementDeclarationUndefinedKind, - 17 => NSXMLElementDeclarationEmptyKind, - 18 => NSXMLElementDeclarationAnyKind, - 19 => NSXMLElementDeclarationMixedKind, - 20 => NSXMLElementDeclarationElementKind, - _ => throw ArgumentError("Unknown value for NSXMLDTDNodeKind: $value"), - }; - + 1 => NSXMLEntityGeneralKind, + 2 => NSXMLEntityParsedKind, + 3 => NSXMLEntityUnparsedKind, + 4 => NSXMLEntityParameterKind, + 5 => NSXMLEntityPredefined, + 6 => NSXMLAttributeCDATAKind, + 7 => NSXMLAttributeIDKind, + 8 => NSXMLAttributeIDRefKind, + 9 => NSXMLAttributeIDRefsKind, + 10 => NSXMLAttributeEntityKind, + 11 => NSXMLAttributeEntitiesKind, + 12 => NSXMLAttributeNMTokenKind, + 13 => NSXMLAttributeNMTokensKind, + 14 => NSXMLAttributeEnumerationKind, + 15 => NSXMLAttributeNotationKind, + 16 => NSXMLElementDeclarationUndefinedKind, + 17 => NSXMLElementDeclarationEmptyKind, + 18 => NSXMLElementDeclarationAnyKind, + 19 => NSXMLElementDeclarationMixedKind, + 20 => NSXMLElementDeclarationElementKind, + _ => throw ArgumentError("Unknown value for NSXMLDTDNodeKind: $value"), + }; } late final _sel_DTDKind = objc.registerName("DTDKind"); -final _objc_msgSend_q8besf = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_q8besf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); -final _objc_msgSend_g68b2i = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedLong )>>().asFunction , ffi.Pointer , int )>(); +final _objc_msgSend_g68b2i = 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_isExternal = objc.registerName("isExternal"); late final _sel_notationName = objc.registerName("notationName"); late final _sel_setNotationName_ = objc.registerName("setNotationName:"); late final _sel_localNameForName_ = objc.registerName("localNameForName:"); late final _sel_prefixForName_ = objc.registerName("prefixForName:"); -late final _sel_predefinedNamespaceForPrefix_ = objc.registerName("predefinedNamespaceForPrefix:"); +late final _sel_predefinedNamespaceForPrefix_ = + objc.registerName("predefinedNamespaceForPrefix:"); /// NSXMLDTDNode class NSXMLDTDNode extends NSXMLNode { NSXMLDTDNode._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSXMLDTDNode] that points to the same underlying object as [other]. - NSXMLDTDNode.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSXMLDTDNode.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSXMLDTDNode] that wraps the given raw object pointer. NSXMLDTDNode.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSXMLDTDNode]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); } /// initWithXMLString: NSXMLDTDNode? initWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithXMLString_, string.ref.pointer); - return _ret.address == 0 ? null : NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } /// initWithKind:options: - NSXMLDTDNode initWithKind_options_(NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), _sel_initWithKind_options_, kind.value, options.value); + NSXMLDTDNode initWithKind_options_( + NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } /// init NSXMLDTDNode init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } @@ -22532,56 +34199,62 @@ class NSXMLDTDNode extends NSXMLNode { } /// setDTDKind: - set DTDKind(NSXMLDTDNodeKind value) { - return _objc_msgSend_g68b2i(this.ref.pointer, _sel_setDTDKind_, value.value); - + set DTDKind(NSXMLDTDNodeKind value) { + return _objc_msgSend_g68b2i( + this.ref.pointer, _sel_setDTDKind_, value.value); } /// isExternal bool get external1 { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isExternal); - } /// publicID objc.NSString? get publicID { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_publicID); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPublicID: - set publicID(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPublicID_, value?.ref.pointer ?? ffi.nullptr); - + set publicID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPublicID_, value?.ref.pointer ?? ffi.nullptr); } /// systemID objc.NSString? get systemID { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_systemID); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setSystemID: - set systemID(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSystemID_, value?.ref.pointer ?? ffi.nullptr); - + set systemID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setSystemID_, value?.ref.pointer ?? ffi.nullptr); } /// notationName objc.NSString? get notationName { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_notationName); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setNotationName: - set notationName(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNotationName_, value?.ref.pointer ?? ffi.nullptr); - + set notationName(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNotationName_, + value?.ref.pointer ?? ffi.nullptr); } /// initWithKind: NSXMLDTDNode initWithKind_(NSXMLNodeKind kind) { - final _ret = _objc_msgSend_ayvqtd(this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } @@ -22593,239 +34266,329 @@ class NSXMLDTDNode extends NSXMLNode { /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_documentWithRootElement_, element.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_elementWithName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: - static objc.ObjCObjectBase elementWithName_URI_(objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTDNode, _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); + static objc.ObjCObjectBase elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTDNode, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: - static objc.ObjCObjectBase elementWithName_stringValue_(objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTDNode, _sel_elementWithName_stringValue_, name.ref.pointer, string.ref.pointer); + static objc.ObjCObjectBase elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: - static objc.ObjCObjectBase elementWithName_children_attributes_(objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLDTDNode, _sel_elementWithName_children_attributes_, name.ref.pointer, children?.ref.pointer ?? ffi.nullptr, attributes?.ref.pointer ?? ffi.nullptr); + static objc.ObjCObjectBase elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTDNode, + _sel_elementWithName_children_attributes_, + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: - static objc.ObjCObjectBase attributeWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTDNode, _sel_attributeWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: - static objc.ObjCObjectBase attributeWithName_URI_stringValue_(objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLDTDNode, _sel_attributeWithName_URI_stringValue_, name.ref.pointer, URI.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTDNode, + _sel_attributeWithName_URI_stringValue_, + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTDNode, _sel_namespaceWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTDNode, _sel_processingInstructionWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTDNode, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.ref.pointer); + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_commentWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// textWithStringValue: static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// DTDNodeWithXMLString: static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// localNameForName: static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_localNameForName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_localNameForName_, name.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// prefixForName: static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_prefixForName_, name.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTDNode, _sel_prefixForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// predefinedNamespaceForPrefix: static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTDNode, + _sel_predefinedNamespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } } -late final _sel_entityDeclarationForName_ = objc.registerName("entityDeclarationForName:"); -late final _sel_notationDeclarationForName_ = objc.registerName("notationDeclarationForName:"); -late final _sel_elementDeclarationForName_ = objc.registerName("elementDeclarationForName:"); -late final _sel_attributeDeclarationForName_elementName_ = objc.registerName("attributeDeclarationForName:elementName:"); -late final _sel_predefinedEntityDeclarationForName_ = objc.registerName("predefinedEntityDeclarationForName:"); +late final _sel_entityDeclarationForName_ = + objc.registerName("entityDeclarationForName:"); +late final _sel_notationDeclarationForName_ = + objc.registerName("notationDeclarationForName:"); +late final _sel_elementDeclarationForName_ = + objc.registerName("elementDeclarationForName:"); +late final _sel_attributeDeclarationForName_elementName_ = + objc.registerName("attributeDeclarationForName:elementName:"); +late final _sel_predefinedEntityDeclarationForName_ = + objc.registerName("predefinedEntityDeclarationForName:"); /// NSXMLDTD class NSXMLDTD extends NSXMLNode { NSXMLDTD._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSXMLDTD] that points to the same underlying object as [other]. - NSXMLDTD.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSXMLDTD.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSXMLDTD] that wraps the given raw object pointer. NSXMLDTD.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSXMLDTD]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); } /// init NSXMLDTD init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } /// initWithKind:options: NSXMLDTD initWithKind_options_(NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), _sel_initWithKind_options_, kind.value, options.value); + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } /// initWithContentsOfURL:options:error: - NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_options_error_, url.ref.pointer, mask.value, error); - return _ret.address == 0 ? null : NSXMLDTD.castFromPointer(_ret, retain: false, release: true); + NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, + NSXMLNodeOptions mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_1go5rz8( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_options_error_, + url.ref.pointer, + mask.value, + error); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } /// initWithData:options:error: - NSXMLDTD? initWithData_options_error_(objc.NSData data, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), _sel_initWithData_options_error_, data.ref.pointer, mask.value, error); - return _ret.address == 0 ? null : NSXMLDTD.castFromPointer(_ret, retain: false, release: true); + NSXMLDTD? initWithData_options_error_(objc.NSData data, NSXMLNodeOptions mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), + _sel_initWithData_options_error_, data.ref.pointer, mask.value, error); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } /// publicID objc.NSString? get publicID { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_publicID); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setPublicID: - set publicID(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setPublicID_, value?.ref.pointer ?? ffi.nullptr); - + set publicID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setPublicID_, value?.ref.pointer ?? ffi.nullptr); } /// systemID objc.NSString? get systemID { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_systemID); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setSystemID: - set systemID(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSystemID_, value?.ref.pointer ?? ffi.nullptr); - + set systemID(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setSystemID_, value?.ref.pointer ?? ffi.nullptr); } /// insertChild:atIndex: void insertChild_atIndex_(NSXMLNode child, int index) { -_objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); - + _objc_msgSend_cjm5ga( + this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); } /// insertChildren:atIndex: void insertChildren_atIndex_(objc.NSArray children, int index) { -_objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, children.ref.pointer, index); - + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, + children.ref.pointer, index); } /// removeChildAtIndex: void removeChildAtIndex_(int index) { -_objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); - + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); } /// setChildren: void setChildren_(objc.NSArray? children) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, children?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, + children?.ref.pointer ?? ffi.nullptr); } /// addChild: void addChild_(NSXMLNode child) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); } /// replaceChildAtIndex:withNode: void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { -_objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, index, node.ref.pointer); - + _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, + index, node.ref.pointer); } /// entityDeclarationForName: NSXMLDTDNode? entityDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_entityDeclarationForName_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_entityDeclarationForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } /// notationDeclarationForName: NSXMLDTDNode? notationDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_notationDeclarationForName_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_notationDeclarationForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } /// elementDeclarationForName: NSXMLDTDNode? elementDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_elementDeclarationForName_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_elementDeclarationForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } /// attributeDeclarationForName:elementName: - NSXMLDTDNode? attributeDeclarationForName_elementName_(objc.NSString name, objc.NSString elementName) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_attributeDeclarationForName_elementName_, name.ref.pointer, elementName.ref.pointer); - return _ret.address == 0 ? null : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + NSXMLDTDNode? attributeDeclarationForName_elementName_( + objc.NSString name, objc.NSString elementName) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_attributeDeclarationForName_elementName_, + name.ref.pointer, + elementName.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } /// predefinedEntityDeclarationForName: static NSXMLDTDNode? predefinedEntityDeclarationForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_predefinedEntityDeclarationForName_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, + _sel_predefinedEntityDeclarationForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } /// initWithKind: NSXMLDTD initWithKind_(NSXMLNodeKind kind) { - final _ret = _objc_msgSend_ayvqtd(this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } @@ -22837,92 +34600,141 @@ _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, inde /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_documentWithRootElement_, element.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_elementWithName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: - static objc.ObjCObjectBase elementWithName_URI_(objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTD, _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); + static objc.ObjCObjectBase elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTD, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: - static objc.ObjCObjectBase elementWithName_stringValue_(objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTD, _sel_elementWithName_stringValue_, name.ref.pointer, string.ref.pointer); + static objc.ObjCObjectBase elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: - static objc.ObjCObjectBase elementWithName_children_attributes_(objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLDTD, _sel_elementWithName_children_attributes_, name.ref.pointer, children?.ref.pointer ?? ffi.nullptr, attributes?.ref.pointer ?? ffi.nullptr); + static objc.ObjCObjectBase elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTD, + _sel_elementWithName_children_attributes_, + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: - static objc.ObjCObjectBase attributeWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTD, _sel_attributeWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: - static objc.ObjCObjectBase attributeWithName_URI_stringValue_(objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLDTD, _sel_attributeWithName_URI_stringValue_, name.ref.pointer, URI.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDTD, + _sel_attributeWithName_URI_stringValue_, + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTD, _sel_namespaceWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDTD, _sel_processingInstructionWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDTD, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.ref.pointer); + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// textWithStringValue: static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_textWithStringValue_, stringValue.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// DTDNodeWithXMLString: static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// localNameForName: static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_localNameForName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_localNameForName_, name.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// prefixForName: static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_prefixForName_, name.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_prefixForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// predefinedNamespaceForPrefix: static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } } @@ -22932,188 +34744,246 @@ late final _sel_setRootElement_ = objc.registerName("setRootElement:"); late final _sel_rootElement = objc.registerName("rootElement"); late final _sel_XMLData = objc.registerName("XMLData"); late final _sel_XMLDataWithOptions_ = objc.registerName("XMLDataWithOptions:"); -final _objc_msgSend_uvkejp = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_objectByApplyingXSLT_arguments_error_ = objc.registerName("objectByApplyingXSLT:arguments:error:"); -final _objc_msgSend_1lpsn5w = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>>().asFunction , ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer> )>(); -late final _sel_objectByApplyingXSLTString_arguments_error_ = objc.registerName("objectByApplyingXSLTString:arguments:error:"); -late final _sel_objectByApplyingXSLTAtURL_arguments_error_ = objc.registerName("objectByApplyingXSLTAtURL:arguments:error:"); -late final _sel_validateAndReturnError_ = objc.registerName("validateAndReturnError:"); +final _objc_msgSend_uvkejp = 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_objectByApplyingXSLT_arguments_error_ = + objc.registerName("objectByApplyingXSLT:arguments:error:"); +final _objc_msgSend_1lpsn5w = 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_objectByApplyingXSLTString_arguments_error_ = + objc.registerName("objectByApplyingXSLTString:arguments:error:"); +late final _sel_objectByApplyingXSLTAtURL_arguments_error_ = + objc.registerName("objectByApplyingXSLTAtURL:arguments:error:"); +late final _sel_validateAndReturnError_ = + objc.registerName("validateAndReturnError:"); /// NSXMLDocument class NSXMLDocument extends NSXMLNode { NSXMLDocument._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSXMLDocument] that points to the same underlying object as [other]. - NSXMLDocument.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSXMLDocument.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSXMLDocument] that wraps the given raw object pointer. NSXMLDocument.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSXMLDocument]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); } /// init NSXMLDocument init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithXMLString:options:error: - NSXMLDocument? initWithXMLString_options_error_(objc.NSString string, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), _sel_initWithXMLString_options_error_, string.ref.pointer, mask.value, error); - return _ret.address == 0 ? null : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + NSXMLDocument? initWithXMLString_options_error_(objc.NSString string, + NSXMLNodeOptions mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_1go5rz8( + this.ref.retainAndReturnPointer(), + _sel_initWithXMLString_options_error_, + string.ref.pointer, + mask.value, + error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithContentsOfURL:options:error: - NSXMLDocument? initWithContentsOfURL_options_error_(objc.NSURL url, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_options_error_, url.ref.pointer, mask.value, error); - return _ret.address == 0 ? null : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + NSXMLDocument? initWithContentsOfURL_options_error_(objc.NSURL url, + NSXMLNodeOptions mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_1go5rz8( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_options_error_, + url.ref.pointer, + mask.value, + error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithData:options:error: - NSXMLDocument? initWithData_options_error_(objc.NSData data, NSXMLNodeOptions mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), _sel_initWithData_options_error_, data.ref.pointer, mask.value, error); - return _ret.address == 0 ? null : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + NSXMLDocument? initWithData_options_error_(objc.NSData data, + NSXMLNodeOptions mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_1go5rz8(this.ref.retainAndReturnPointer(), + _sel_initWithData_options_error_, data.ref.pointer, mask.value, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithRootElement: NSXMLDocument initWithRootElement_(NSXMLElement? element) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithRootElement_, element?.ref.pointer ?? ffi.nullptr); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithRootElement_, element?.ref.pointer ?? ffi.nullptr); return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// replacementClassForClass: - static objc.ObjCObjectBase replacementClassForClass_(objc.ObjCObjectBase cls) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_replacementClassForClass_, cls.ref.pointer); + static objc.ObjCObjectBase replacementClassForClass_( + objc.ObjCObjectBase cls) { + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_replacementClassForClass_, cls.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// characterEncoding objc.NSString? get characterEncoding { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_characterEncoding); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_characterEncoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setCharacterEncoding: - set characterEncoding(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCharacterEncoding_, value?.ref.pointer ?? ffi.nullptr); - + set characterEncoding(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCharacterEncoding_, + value?.ref.pointer ?? ffi.nullptr); } /// version objc.NSString? get version { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_version); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setVersion: - set version(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setVersion_, value?.ref.pointer ?? ffi.nullptr); - + set version(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setVersion_, value?.ref.pointer ?? ffi.nullptr); } /// isStandalone bool get standalone { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isStandalone); - } /// setStandalone: - set standalone(bool value) { + set standalone(bool value) { return _objc_msgSend_117qins(this.ref.pointer, _sel_setStandalone_, value); - } /// documentContentKind NSXMLDocumentContentKind get documentContentKind { - final _ret = _objc_msgSend_vx3pa9(this.ref.pointer, _sel_documentContentKind); + final _ret = + _objc_msgSend_vx3pa9(this.ref.pointer, _sel_documentContentKind); return NSXMLDocumentContentKind.fromValue(_ret); } /// setDocumentContentKind: - set documentContentKind(NSXMLDocumentContentKind value) { - return _objc_msgSend_zmck60(this.ref.pointer, _sel_setDocumentContentKind_, value.value); - + set documentContentKind(NSXMLDocumentContentKind value) { + return _objc_msgSend_zmck60( + this.ref.pointer, _sel_setDocumentContentKind_, value.value); } /// MIMEType objc.NSString? get MIMEType { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_MIMEType); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setMIMEType: - set MIMEType(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMIMEType_, value?.ref.pointer ?? ffi.nullptr); - + set MIMEType(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setMIMEType_, value?.ref.pointer ?? ffi.nullptr); } /// DTD NSXMLDTD? get DTD { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_DTD); - return _ret.address == 0 ? null : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } /// setDTD: - set DTD(NSXMLDTD? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDTD_, value?.ref.pointer ?? ffi.nullptr); - + set DTD(NSXMLDTD? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDTD_, value?.ref.pointer ?? ffi.nullptr); } /// setRootElement: void setRootElement_(NSXMLElement root) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setRootElement_, root.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setRootElement_, root.ref.pointer); } /// rootElement NSXMLElement? rootElement() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_rootElement); - return _ret.address == 0 ? null : NSXMLElement.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); } /// insertChild:atIndex: void insertChild_atIndex_(NSXMLNode child, int index) { -_objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); - + _objc_msgSend_cjm5ga( + this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); } /// insertChildren:atIndex: void insertChildren_atIndex_(objc.NSArray children, int index) { -_objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, children.ref.pointer, index); - + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, + children.ref.pointer, index); } /// removeChildAtIndex: void removeChildAtIndex_(int index) { -_objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); - + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); } /// setChildren: void setChildren_(objc.NSArray? children) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, children?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, + children?.ref.pointer ?? ffi.nullptr); } /// addChild: void addChild_(NSXMLNode child) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); } /// replaceChildAtIndex:withNode: void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { -_objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, index, node.ref.pointer); - + _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, + index, node.ref.pointer); } /// XMLData @@ -23124,43 +34994,78 @@ _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, inde /// XMLDataWithOptions: objc.NSData XMLDataWithOptions_(NSXMLNodeOptions options) { - final _ret = _objc_msgSend_uvkejp(this.ref.pointer, _sel_XMLDataWithOptions_, options.value); + final _ret = _objc_msgSend_uvkejp( + this.ref.pointer, _sel_XMLDataWithOptions_, options.value); return objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// objectByApplyingXSLT:arguments:error: - objc.ObjCObjectBase? objectByApplyingXSLT_arguments_error_(objc.NSData xslt, objc.NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _objc_msgSend_1lpsn5w(this.ref.pointer, _sel_objectByApplyingXSLT_arguments_error_, xslt.ref.pointer, arguments?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + objc.ObjCObjectBase? objectByApplyingXSLT_arguments_error_( + objc.NSData xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, + _sel_objectByApplyingXSLT_arguments_error_, + xslt.ref.pointer, + arguments?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// objectByApplyingXSLTString:arguments:error: - objc.ObjCObjectBase? objectByApplyingXSLTString_arguments_error_(objc.NSString xslt, objc.NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _objc_msgSend_1lpsn5w(this.ref.pointer, _sel_objectByApplyingXSLTString_arguments_error_, xslt.ref.pointer, arguments?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + objc.ObjCObjectBase? objectByApplyingXSLTString_arguments_error_( + objc.NSString xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, + _sel_objectByApplyingXSLTString_arguments_error_, + xslt.ref.pointer, + arguments?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// objectByApplyingXSLTAtURL:arguments:error: - objc.ObjCObjectBase? objectByApplyingXSLTAtURL_arguments_error_(objc.NSURL xsltURL, objc.NSDictionary? argument, ffi.Pointer> error) { - final _ret = _objc_msgSend_1lpsn5w(this.ref.pointer, _sel_objectByApplyingXSLTAtURL_arguments_error_, xsltURL.ref.pointer, argument?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + objc.ObjCObjectBase? objectByApplyingXSLTAtURL_arguments_error_( + objc.NSURL xsltURL, + objc.NSDictionary? argument, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, + _sel_objectByApplyingXSLTAtURL_arguments_error_, + xsltURL.ref.pointer, + argument?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// validateAndReturnError: - bool validateAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_1rk90ll(this.ref.pointer, _sel_validateAndReturnError_, error); - + bool validateAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_1rk90ll( + this.ref.pointer, _sel_validateAndReturnError_, error); } /// initWithKind: NSXMLDocument initWithKind_(NSXMLNodeKind kind) { - final _ret = _objc_msgSend_ayvqtd(this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } /// initWithKind:options: - NSXMLDocument initWithKind_options_(NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), _sel_initWithKind_options_, kind.value, options.value); + NSXMLDocument initWithKind_options_( + NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } @@ -23172,92 +35077,141 @@ _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, inde /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_documentWithRootElement_, element.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_elementWithName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: - static objc.ObjCObjectBase elementWithName_URI_(objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDocument, _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); + static objc.ObjCObjectBase elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_iq11qg(_class_NSXMLDocument, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: - static objc.ObjCObjectBase elementWithName_stringValue_(objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDocument, _sel_elementWithName_stringValue_, name.ref.pointer, string.ref.pointer); + static objc.ObjCObjectBase elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: - static objc.ObjCObjectBase elementWithName_children_attributes_(objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLDocument, _sel_elementWithName_children_attributes_, name.ref.pointer, children?.ref.pointer ?? ffi.nullptr, attributes?.ref.pointer ?? ffi.nullptr); + static objc.ObjCObjectBase elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDocument, + _sel_elementWithName_children_attributes_, + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: - static objc.ObjCObjectBase attributeWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDocument, _sel_attributeWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: - static objc.ObjCObjectBase attributeWithName_URI_stringValue_(objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLDocument, _sel_attributeWithName_URI_stringValue_, name.ref.pointer, URI.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLDocument, + _sel_attributeWithName_URI_stringValue_, + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDocument, _sel_namespaceWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLDocument, _sel_processingInstructionWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLDocument, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_commentWithStringValue_, stringValue.ref.pointer); + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_commentWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// textWithStringValue: static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_textWithStringValue_, stringValue.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// DTDNodeWithXMLString: static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// localNameForName: static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_localNameForName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_localNameForName_, name.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// prefixForName: static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_prefixForName_, name.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLDocument, _sel_prefixForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// predefinedNamespaceForPrefix: static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSXMLDocument, + _sel_predefinedNamespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } } @@ -23277,48 +35231,57 @@ late final _sel_prefix = objc.registerName("prefix"); late final _sel_URI = objc.registerName("URI"); late final _sel_setURI_ = objc.registerName("setURI:"); late final _sel_XMLString = objc.registerName("XMLString"); -late final _sel_XMLStringWithOptions_ = objc.registerName("XMLStringWithOptions:"); -late final _sel_canonicalXMLStringPreservingComments_ = objc.registerName("canonicalXMLStringPreservingComments:"); -late final _sel_nodesForXPath_error_ = objc.registerName("nodesForXPath:error:"); -late final _sel_objectsForXQuery_constants_error_ = objc.registerName("objectsForXQuery:constants:error:"); -late final _sel_objectsForXQuery_error_ = objc.registerName("objectsForXQuery:error:"); +late final _sel_XMLStringWithOptions_ = + objc.registerName("XMLStringWithOptions:"); +late final _sel_canonicalXMLStringPreservingComments_ = + objc.registerName("canonicalXMLStringPreservingComments:"); +late final _sel_nodesForXPath_error_ = + objc.registerName("nodesForXPath:error:"); +late final _sel_objectsForXQuery_constants_error_ = + objc.registerName("objectsForXQuery:constants:error:"); +late final _sel_objectsForXQuery_error_ = + objc.registerName("objectsForXQuery:error:"); /// NSXMLNode class NSXMLNode extends objc.NSObject { NSXMLNode._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSXMLNode] that points to the same underlying object as [other]. - NSXMLNode.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSXMLNode.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSXMLNode] that wraps the given raw object pointer. NSXMLNode.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSXMLNode]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLNode); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLNode); } /// init NSXMLNode init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } /// initWithKind: NSXMLNode initWithKind_(NSXMLNodeKind kind) { - final _ret = _objc_msgSend_ayvqtd(this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } /// initWithKind:options: - NSXMLNode initWithKind_options_(NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), _sel_initWithKind_options_, kind.value, options.value); + NSXMLNode initWithKind_options_( + NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } @@ -23330,74 +35293,116 @@ class NSXMLNode extends objc.NSObject { /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_documentWithRootElement_, element.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_elementWithName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: - static objc.ObjCObjectBase elementWithName_URI_(objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLNode, _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); + static objc.ObjCObjectBase elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_iq11qg(_class_NSXMLNode, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: - static objc.ObjCObjectBase elementWithName_stringValue_(objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLNode, _sel_elementWithName_stringValue_, name.ref.pointer, string.ref.pointer); + static objc.ObjCObjectBase elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: - static objc.ObjCObjectBase elementWithName_children_attributes_(objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLNode, _sel_elementWithName_children_attributes_, name.ref.pointer, children?.ref.pointer ?? ffi.nullptr, attributes?.ref.pointer ?? ffi.nullptr); + static objc.ObjCObjectBase elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLNode, + _sel_elementWithName_children_attributes_, + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: - static objc.ObjCObjectBase attributeWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLNode, _sel_attributeWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: - static objc.ObjCObjectBase attributeWithName_URI_stringValue_(objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLNode, _sel_attributeWithName_URI_stringValue_, name.ref.pointer, URI.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLNode, + _sel_attributeWithName_URI_stringValue_, + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLNode, _sel_namespaceWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLNode, _sel_processingInstructionWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLNode, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_commentWithStringValue_, stringValue.ref.pointer); + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, + _sel_commentWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// textWithStringValue: static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_textWithStringValue_, stringValue.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// DTDNodeWithXMLString: static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// kind @@ -23409,163 +35414,197 @@ class NSXMLNode extends objc.NSObject { /// name objc.NSString? get name { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setName: - set name(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); - + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } /// objectValue objc.ObjCObjectBase? get objectValue { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_objectValue); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setObjectValue: - set objectValue(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setObjectValue_, value?.ref.pointer ?? ffi.nullptr); - + set objectValue(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setObjectValue_, + value?.ref.pointer ?? ffi.nullptr); } /// stringValue objc.NSString? get stringValue { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_stringValue); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setStringValue: - set stringValue(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStringValue_, value?.ref.pointer ?? ffi.nullptr); - + set stringValue(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setStringValue_, + value?.ref.pointer ?? ffi.nullptr); } /// setStringValue:resolvingEntities: void setStringValue_resolvingEntities_(objc.NSString string, bool resolve) { -_objc_msgSend_1n1qwdd(this.ref.pointer, _sel_setStringValue_resolvingEntities_, string.ref.pointer, resolve); - + _objc_msgSend_1n1qwdd(this.ref.pointer, + _sel_setStringValue_resolvingEntities_, string.ref.pointer, resolve); } /// index int get index { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_index); - } /// level int get level { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_level); - } /// rootDocument NSXMLDocument? get rootDocument { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_rootDocument); - return _ret.address == 0 ? null : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } /// parent NSXMLNode? get parent { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_parent); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// childCount int get childCount { return _objc_msgSend_eldhrq(this.ref.pointer, _sel_childCount); - } /// children objc.NSArray? get children { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_children); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// childAtIndex: NSXMLNode? childAtIndex_(int index) { - final _ret = _objc_msgSend_ehxl2g(this.ref.pointer, _sel_childAtIndex_, index); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_ehxl2g(this.ref.pointer, _sel_childAtIndex_, index); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// previousSibling NSXMLNode? get previousSibling { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_previousSibling); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// nextSibling NSXMLNode? get nextSibling { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_nextSibling); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// previousNode NSXMLNode? get previousNode { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_previousNode); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// nextNode NSXMLNode? get nextNode { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_nextNode); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// detach void detach() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_detach); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_detach); } /// XPath objc.NSString? get XPath { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_XPath); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// localName objc.NSString? get localName { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localName); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// prefix objc.NSString? get prefix { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_prefix); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// URI objc.NSString? get URI { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URI); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setURI: - set URI(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURI_, value?.ref.pointer ?? ffi.nullptr); - + set URI(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURI_, value?.ref.pointer ?? ffi.nullptr); } /// localNameForName: static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_localNameForName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_localNameForName_, name.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// prefixForName: static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_prefixForName_, name.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_prefixForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// predefinedNamespaceForPrefix: static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// description @@ -23582,32 +35621,52 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_detach); /// XMLStringWithOptions: objc.NSString XMLStringWithOptions_(NSXMLNodeOptions options) { - final _ret = _objc_msgSend_uvkejp(this.ref.pointer, _sel_XMLStringWithOptions_, options.value); + final _ret = _objc_msgSend_uvkejp( + this.ref.pointer, _sel_XMLStringWithOptions_, options.value); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// canonicalXMLStringPreservingComments: objc.NSString canonicalXMLStringPreservingComments_(bool comments) { - final _ret = _objc_msgSend_1upz917(this.ref.pointer, _sel_canonicalXMLStringPreservingComments_, comments); + final _ret = _objc_msgSend_1upz917( + this.ref.pointer, _sel_canonicalXMLStringPreservingComments_, comments); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// nodesForXPath:error: - objc.NSArray? nodesForXPath_error_(objc.NSString xpath, ffi.Pointer> error) { - final _ret = _objc_msgSend_1y425zh(this.ref.pointer, _sel_nodesForXPath_error_, xpath.ref.pointer, error); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? nodesForXPath_error_( + objc.NSString xpath, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh( + this.ref.pointer, _sel_nodesForXPath_error_, xpath.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// objectsForXQuery:constants:error: - objc.NSArray? objectsForXQuery_constants_error_(objc.NSString xquery, objc.NSDictionary? constants, ffi.Pointer> error) { - final _ret = _objc_msgSend_1lpsn5w(this.ref.pointer, _sel_objectsForXQuery_constants_error_, xquery.ref.pointer, constants?.ref.pointer ?? ffi.nullptr, error); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? objectsForXQuery_constants_error_( + objc.NSString xquery, + objc.NSDictionary? constants, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1lpsn5w( + this.ref.pointer, + _sel_objectsForXQuery_constants_error_, + xquery.ref.pointer, + constants?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// objectsForXQuery:error: - objc.NSArray? objectsForXQuery_error_(objc.NSString xquery, ffi.Pointer> error) { - final _ret = _objc_msgSend_1y425zh(this.ref.pointer, _sel_objectsForXQuery_error_, xquery.ref.pointer, error); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + objc.NSArray? objectsForXQuery_error_( + objc.NSString xquery, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.pointer, + _sel_objectsForXQuery_error_, xquery.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// new @@ -23618,7 +35677,8 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_detach); /// allocWithZone: static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSXMLNode, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSXMLNode, _sel_allocWithZone_, zone); return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } @@ -23629,56 +35689,70 @@ _objc_msgSend_ksby9f(this.ref.pointer, _sel_detach); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSXMLNode, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSXMLNode, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSXMLNode, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSXMLNode, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLNode, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSXMLNode, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSXMLNode, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSXMLNode, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSXMLNode, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSXMLNode, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSXMLNode, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -23703,231 +35777,287 @@ _objc_msgSend_1tjlcwl(_class_NSXMLNode, _sel_setKeys_triggerChangeNotificationsF late final _class_NSXMLElement = objc.getClass("NSXMLElement"); late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); -late final _sel_initWithName_stringValue_ = objc.registerName("initWithName:stringValue:"); -late final _sel_initWithXMLString_error_ = objc.registerName("initWithXMLString:error:"); +late final _sel_initWithName_stringValue_ = + objc.registerName("initWithName:stringValue:"); +late final _sel_initWithXMLString_error_ = + objc.registerName("initWithXMLString:error:"); late final _sel_elementsForName_ = objc.registerName("elementsForName:"); -late final _sel_elementsForLocalName_URI_ = objc.registerName("elementsForLocalName:URI:"); +late final _sel_elementsForLocalName_URI_ = + objc.registerName("elementsForLocalName:URI:"); late final _sel_addAttribute_ = objc.registerName("addAttribute:"); -late final _sel_removeAttributeForName_ = objc.registerName("removeAttributeForName:"); +late final _sel_removeAttributeForName_ = + objc.registerName("removeAttributeForName:"); late final _sel_attributes = objc.registerName("attributes"); late final _sel_setAttributes_ = objc.registerName("setAttributes:"); -late final _sel_setAttributesWithDictionary_ = objc.registerName("setAttributesWithDictionary:"); +late final _sel_setAttributesWithDictionary_ = + objc.registerName("setAttributesWithDictionary:"); late final _sel_attributeForName_ = objc.registerName("attributeForName:"); -late final _sel_attributeForLocalName_URI_ = objc.registerName("attributeForLocalName:URI:"); +late final _sel_attributeForLocalName_URI_ = + objc.registerName("attributeForLocalName:URI:"); late final _sel_addNamespace_ = objc.registerName("addNamespace:"); -late final _sel_removeNamespaceForPrefix_ = objc.registerName("removeNamespaceForPrefix:"); +late final _sel_removeNamespaceForPrefix_ = + objc.registerName("removeNamespaceForPrefix:"); late final _sel_namespaces = objc.registerName("namespaces"); late final _sel_setNamespaces_ = objc.registerName("setNamespaces:"); late final _sel_namespaceForPrefix_ = objc.registerName("namespaceForPrefix:"); -late final _sel_resolveNamespaceForName_ = objc.registerName("resolveNamespaceForName:"); -late final _sel_resolvePrefixForNamespaceURI_ = objc.registerName("resolvePrefixForNamespaceURI:"); -late final _sel_normalizeAdjacentTextNodesPreservingCDATA_ = objc.registerName("normalizeAdjacentTextNodesPreservingCDATA:"); -late final _sel_setAttributesAsDictionary_ = objc.registerName("setAttributesAsDictionary:"); +late final _sel_resolveNamespaceForName_ = + objc.registerName("resolveNamespaceForName:"); +late final _sel_resolvePrefixForNamespaceURI_ = + objc.registerName("resolvePrefixForNamespaceURI:"); +late final _sel_normalizeAdjacentTextNodesPreservingCDATA_ = + objc.registerName("normalizeAdjacentTextNodesPreservingCDATA:"); +late final _sel_setAttributesAsDictionary_ = + objc.registerName("setAttributesAsDictionary:"); /// NSXMLElement class NSXMLElement extends NSXMLNode { NSXMLElement._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSXMLElement] that points to the same underlying object as [other]. - NSXMLElement.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSXMLElement.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSXMLElement] that wraps the given raw object pointer. NSXMLElement.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSXMLElement]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLElement); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSXMLElement); } /// initWithName: NSXMLElement initWithName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithName_, name.ref.pointer); return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } /// initWithName:URI: NSXMLElement initWithName_URI_(objc.NSString name, objc.NSString? URI) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithName_URI_, name.ref.pointer, URI?.ref.pointer ?? ffi.nullptr); + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithName_URI_, + name.ref.pointer, + URI?.ref.pointer ?? ffi.nullptr); return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } /// initWithName:stringValue: - NSXMLElement initWithName_stringValue_(objc.NSString name, objc.NSString? string) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithName_stringValue_, name.ref.pointer, string?.ref.pointer ?? ffi.nullptr); + NSXMLElement initWithName_stringValue_( + objc.NSString name, objc.NSString? string) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithName_stringValue_, + name.ref.pointer, + string?.ref.pointer ?? ffi.nullptr); return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } /// initWithXMLString:error: - NSXMLElement? initWithXMLString_error_(objc.NSString string, ffi.Pointer> error) { - final _ret = _objc_msgSend_1y425zh(this.ref.retainAndReturnPointer(), _sel_initWithXMLString_error_, string.ref.pointer, error); - return _ret.address == 0 ? null : NSXMLElement.castFromPointer(_ret, retain: false, release: true); + NSXMLElement? initWithXMLString_error_( + objc.NSString string, ffi.Pointer> error) { + final _ret = _objc_msgSend_1y425zh(this.ref.retainAndReturnPointer(), + _sel_initWithXMLString_error_, string.ref.pointer, error); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: false, release: true); } /// initWithKind:options: - NSXMLElement initWithKind_options_(NSXMLNodeKind kind, NSXMLNodeOptions options) { - final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), _sel_initWithKind_options_, kind.value, options.value); + NSXMLElement initWithKind_options_( + NSXMLNodeKind kind, NSXMLNodeOptions options) { + final _ret = _objc_msgSend_hddv7u(this.ref.retainAndReturnPointer(), + _sel_initWithKind_options_, kind.value, options.value); return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } /// elementsForName: objc.NSArray elementsForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_elementsForName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_elementsForName_, name.ref.pointer); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// elementsForLocalName:URI: - objc.NSArray elementsForLocalName_URI_(objc.NSString localName, objc.NSString? URI) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_elementsForLocalName_URI_, localName.ref.pointer, URI?.ref.pointer ?? ffi.nullptr); + objc.NSArray elementsForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_elementsForLocalName_URI_, + localName.ref.pointer, + URI?.ref.pointer ?? ffi.nullptr); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// addAttribute: void addAttribute_(NSXMLNode attribute) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addAttribute_, attribute.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addAttribute_, attribute.ref.pointer); } /// removeAttributeForName: void removeAttributeForName_(objc.NSString name) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeAttributeForName_, name.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeAttributeForName_, name.ref.pointer); } /// attributes objc.NSArray? get attributes { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_attributes); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setAttributes: - set attributes(objc.NSArray? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributes_, value?.ref.pointer ?? ffi.nullptr); - + set attributes(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributes_, + value?.ref.pointer ?? ffi.nullptr); } /// setAttributesWithDictionary: void setAttributesWithDictionary_(objc.NSDictionary attributes) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesWithDictionary_, attributes.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesWithDictionary_, + attributes.ref.pointer); } /// attributeForName: NSXMLNode? attributeForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_attributeForName_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_attributeForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// attributeForLocalName:URI: - NSXMLNode? attributeForLocalName_URI_(objc.NSString localName, objc.NSString? URI) { - final _ret = _objc_msgSend_iq11qg(this.ref.pointer, _sel_attributeForLocalName_URI_, localName.ref.pointer, URI?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + NSXMLNode? attributeForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_attributeForLocalName_URI_, + localName.ref.pointer, + URI?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// addNamespace: void addNamespace_(NSXMLNode aNamespace) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addNamespace_, aNamespace.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_addNamespace_, aNamespace.ref.pointer); } /// removeNamespaceForPrefix: void removeNamespaceForPrefix_(objc.NSString name) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeNamespaceForPrefix_, name.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeNamespaceForPrefix_, name.ref.pointer); } /// namespaces objc.NSArray? get namespaces { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_namespaces); - return _ret.address == 0 ? null : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// setNamespaces: - set namespaces(objc.NSArray? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNamespaces_, value?.ref.pointer ?? ffi.nullptr); - + set namespaces(objc.NSArray? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setNamespaces_, + value?.ref.pointer ?? ffi.nullptr); } /// namespaceForPrefix: NSXMLNode? namespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_namespaceForPrefix_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_namespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// resolveNamespaceForName: NSXMLNode? resolveNamespaceForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_resolveNamespaceForName_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_resolveNamespaceForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// resolvePrefixForNamespaceURI: objc.NSString? resolvePrefixForNamespaceURI_(objc.NSString namespaceURI) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_resolvePrefixForNamespaceURI_, namespaceURI.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// insertChild:atIndex: void insertChild_atIndex_(NSXMLNode child, int index) { -_objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); - + _objc_msgSend_cjm5ga( + this.ref.pointer, _sel_insertChild_atIndex_, child.ref.pointer, index); } /// insertChildren:atIndex: void insertChildren_atIndex_(objc.NSArray children, int index) { -_objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, children.ref.pointer, index); - + _objc_msgSend_cjm5ga(this.ref.pointer, _sel_insertChildren_atIndex_, + children.ref.pointer, index); } /// removeChildAtIndex: void removeChildAtIndex_(int index) { -_objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); - + _objc_msgSend_1k4zaz5(this.ref.pointer, _sel_removeChildAtIndex_, index); } /// setChildren: void setChildren_(objc.NSArray? children) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, children?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildren_, + children?.ref.pointer ?? ffi.nullptr); } /// addChild: void addChild_(NSXMLNode child) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addChild_, child.ref.pointer); } /// replaceChildAtIndex:withNode: void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { -_objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, index, node.ref.pointer); - + _objc_msgSend_1a4j45m(this.ref.pointer, _sel_replaceChildAtIndex_withNode_, + index, node.ref.pointer); } /// normalizeAdjacentTextNodesPreservingCDATA: void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { -_objc_msgSend_117qins(this.ref.pointer, _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); - + _objc_msgSend_117qins(this.ref.pointer, + _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); } /// setAttributesAsDictionary: void setAttributesAsDictionary_(objc.NSDictionary attributes) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesAsDictionary_, attributes.ref.pointer); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesAsDictionary_, + attributes.ref.pointer); } /// init NSXMLElement init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } /// initWithKind: NSXMLElement initWithKind_(NSXMLNodeKind kind) { - final _ret = _objc_msgSend_ayvqtd(this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); + final _ret = _objc_msgSend_ayvqtd( + this.ref.retainAndReturnPointer(), _sel_initWithKind_, kind.value); return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } @@ -23939,92 +36069,141 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesAsDictionary_, attribut /// documentWithRootElement: static objc.ObjCObjectBase documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_documentWithRootElement_, element.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_documentWithRootElement_, element.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName: static objc.ObjCObjectBase elementWithName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_elementWithName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_elementWithName_, name.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:URI: - static objc.ObjCObjectBase elementWithName_URI_(objc.NSString name, objc.NSString URI) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLElement, _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); + static objc.ObjCObjectBase elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_iq11qg(_class_NSXMLElement, + _sel_elementWithName_URI_, name.ref.pointer, URI.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:stringValue: - static objc.ObjCObjectBase elementWithName_stringValue_(objc.NSString name, objc.NSString string) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLElement, _sel_elementWithName_stringValue_, name.ref.pointer, string.ref.pointer); + static objc.ObjCObjectBase elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_elementWithName_stringValue_, + name.ref.pointer, + string.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// elementWithName:children:attributes: - static objc.ObjCObjectBase elementWithName_children_attributes_(objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLElement, _sel_elementWithName_children_attributes_, name.ref.pointer, children?.ref.pointer ?? ffi.nullptr, attributes?.ref.pointer ?? ffi.nullptr); + static objc.ObjCObjectBase elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLElement, + _sel_elementWithName_children_attributes_, + name.ref.pointer, + children?.ref.pointer ?? ffi.nullptr, + attributes?.ref.pointer ?? ffi.nullptr); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:stringValue: - static objc.ObjCObjectBase attributeWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLElement, _sel_attributeWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_attributeWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// attributeWithName:URI:stringValue: - static objc.ObjCObjectBase attributeWithName_URI_stringValue_(objc.NSString name, objc.NSString URI, objc.NSString stringValue) { - final _ret = _objc_msgSend_aud7dn(_class_NSXMLElement, _sel_attributeWithName_URI_stringValue_, name.ref.pointer, URI.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSXMLElement, + _sel_attributeWithName_URI_stringValue_, + name.ref.pointer, + URI.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// namespaceWithName:stringValue: - static objc.ObjCObjectBase namespaceWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLElement, _sel_namespaceWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_namespaceWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// processingInstructionWithName:stringValue: - static objc.ObjCObjectBase processingInstructionWithName_stringValue_(objc.NSString name, objc.NSString stringValue) { - final _ret = _objc_msgSend_iq11qg(_class_NSXMLElement, _sel_processingInstructionWithName_stringValue_, name.ref.pointer, stringValue.ref.pointer); + static objc.ObjCObjectBase processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_iq11qg( + _class_NSXMLElement, + _sel_processingInstructionWithName_stringValue_, + name.ref.pointer, + stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// commentWithStringValue: - static objc.ObjCObjectBase commentWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_commentWithStringValue_, stringValue.ref.pointer); + static objc.ObjCObjectBase commentWithStringValue_( + objc.NSString stringValue) { + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_commentWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// textWithStringValue: static objc.ObjCObjectBase textWithStringValue_(objc.NSString stringValue) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_textWithStringValue_, stringValue.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_textWithStringValue_, stringValue.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// DTDNodeWithXMLString: static objc.ObjCObjectBase? DTDNodeWithXMLString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// localNameForName: static objc.NSString localNameForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_localNameForName_, name.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_localNameForName_, name.ref.pointer); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// prefixForName: static objc.NSString? prefixForName_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_prefixForName_, name.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + _class_NSXMLElement, _sel_prefixForName_, name.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// predefinedNamespaceForPrefix: static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.ref.pointer); - return _ret.address == 0 ? null : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_predefinedNamespaceForPrefix_, name.ref.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } /// new @@ -24035,7 +36214,8 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesAsDictionary_, attribut /// allocWithZone: static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSXMLElement, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSXMLElement, _sel_allocWithZone_, zone); return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } @@ -24046,56 +36226,70 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAttributesAsDictionary_, attribut } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSXMLElement, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSXMLElement, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSXMLElement, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSXMLElement, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSXMLElement, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSXMLElement, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSXMLElement, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSXMLElement, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSXMLElement, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSXMLElement, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSXMLElement, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -24126,29 +36320,30 @@ late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); late final _sel_names = objc.registerName("names"); late final _sel_address = objc.registerName("address"); late final _sel_localizedName = objc.registerName("localizedName"); -late final _sel_setHostCacheEnabled_ = objc.registerName("setHostCacheEnabled:"); +late final _sel_setHostCacheEnabled_ = + objc.registerName("setHostCacheEnabled:"); late final _sel_isHostCacheEnabled = objc.registerName("isHostCacheEnabled"); late final _sel_flushHostCache = objc.registerName("flushHostCache"); /// NSHost class NSHost extends objc.NSObject { NSHost._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSHost] that points to the same underlying object as [other]. - NSHost.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSHost.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSHost] that wraps the given raw object pointer. NSHost.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSHost]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSHost); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHost); } /// currentHost @@ -24159,26 +36354,30 @@ class NSHost extends objc.NSObject { /// hostWithName: static NSHost hostWithName_(objc.NSString? name) { - final _ret = _objc_msgSend_juohf7(_class_NSHost, _sel_hostWithName_, name?.ref.pointer ?? ffi.nullptr); + final _ret = _objc_msgSend_juohf7( + _class_NSHost, _sel_hostWithName_, name?.ref.pointer ?? ffi.nullptr); return NSHost.castFromPointer(_ret, retain: true, release: true); } /// hostWithAddress: static NSHost hostWithAddress_(objc.NSString address) { - final _ret = _objc_msgSend_juohf7(_class_NSHost, _sel_hostWithAddress_, address.ref.pointer); + final _ret = _objc_msgSend_juohf7( + _class_NSHost, _sel_hostWithAddress_, address.ref.pointer); return NSHost.castFromPointer(_ret, retain: true, release: true); } /// isEqualToHost: bool isEqualToHost_(NSHost aHost) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isEqualToHost_, aHost.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isEqualToHost_, aHost.ref.pointer); } /// name objc.NSString? get name { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// names @@ -24190,7 +36389,9 @@ class NSHost extends objc.NSObject { /// address objc.NSString? get address { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_address); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// addresses @@ -24202,30 +36403,30 @@ class NSHost extends objc.NSObject { /// localizedName objc.NSString? get localizedName { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedName); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setHostCacheEnabled: static void setHostCacheEnabled_(bool flag) { -_objc_msgSend_117qins(_class_NSHost, _sel_setHostCacheEnabled_, flag); - + _objc_msgSend_117qins(_class_NSHost, _sel_setHostCacheEnabled_, flag); } /// isHostCacheEnabled static bool isHostCacheEnabled() { return _objc_msgSend_olxnu1(_class_NSHost, _sel_isHostCacheEnabled); - } /// flushHostCache static void flushHostCache() { -_objc_msgSend_ksby9f(_class_NSHost, _sel_flushHostCache); - + _objc_msgSend_ksby9f(_class_NSHost, _sel_flushHostCache); } /// init NSHost init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSHost.castFromPointer(_ret, retain: false, release: true); } @@ -24237,7 +36438,8 @@ _objc_msgSend_ksby9f(_class_NSHost, _sel_flushHostCache); /// allocWithZone: static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSHost, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_NSHost, _sel_allocWithZone_, zone); return NSHost.castFromPointer(_ret, retain: false, release: true); } @@ -24248,56 +36450,70 @@ _objc_msgSend_ksby9f(_class_NSHost, _sel_flushHostCache); } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSHost, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSHost, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSHost, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSHost, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSHost, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSHost, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSHost, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSHost, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSHost, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSHost, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHost, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSHost, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHost, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_NSHost, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -24321,51 +36537,65 @@ _objc_msgSend_1tjlcwl(_class_NSHost, _sel_setKeys_triggerChangeNotificationsForD } late final _class_NSClassDescription = objc.getClass("NSClassDescription"); -late final _sel_registerClassDescription_forClass_ = objc.registerName("registerClassDescription:forClass:"); -late final _sel_invalidateClassDescriptionCache = objc.registerName("invalidateClassDescriptionCache"); -late final _sel_classDescriptionForClass_ = objc.registerName("classDescriptionForClass:"); +late final _sel_registerClassDescription_forClass_ = + objc.registerName("registerClassDescription:forClass:"); +late final _sel_invalidateClassDescriptionCache = + objc.registerName("invalidateClassDescriptionCache"); +late final _sel_classDescriptionForClass_ = + objc.registerName("classDescriptionForClass:"); late final _sel_attributeKeys = objc.registerName("attributeKeys"); -late final _sel_toOneRelationshipKeys = objc.registerName("toOneRelationshipKeys"); -late final _sel_toManyRelationshipKeys = objc.registerName("toManyRelationshipKeys"); -late final _sel_inverseForRelationshipKey_ = objc.registerName("inverseForRelationshipKey:"); +late final _sel_toOneRelationshipKeys = + objc.registerName("toOneRelationshipKeys"); +late final _sel_toManyRelationshipKeys = + objc.registerName("toManyRelationshipKeys"); +late final _sel_inverseForRelationshipKey_ = + objc.registerName("inverseForRelationshipKey:"); /// NSClassDescription class NSClassDescription extends objc.NSObject { NSClassDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSClassDescription] that points to the same underlying object as [other]. - NSClassDescription.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSClassDescription] that wraps the given raw object pointer. NSClassDescription.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSClassDescription]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSClassDescription); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSClassDescription); } /// registerClassDescription:forClass: - static void registerClassDescription_forClass_(NSClassDescription description, objc.ObjCObjectBase aClass) { -_objc_msgSend_1tjlcwl(_class_NSClassDescription, _sel_registerClassDescription_forClass_, description.ref.pointer, aClass.ref.pointer); - + static void registerClassDescription_forClass_( + NSClassDescription description, objc.ObjCObjectBase aClass) { + _objc_msgSend_1tjlcwl( + _class_NSClassDescription, + _sel_registerClassDescription_forClass_, + description.ref.pointer, + aClass.ref.pointer); } /// invalidateClassDescriptionCache static void invalidateClassDescriptionCache() { -_objc_msgSend_ksby9f(_class_NSClassDescription, _sel_invalidateClassDescriptionCache); - + _objc_msgSend_ksby9f( + _class_NSClassDescription, _sel_invalidateClassDescriptionCache); } /// classDescriptionForClass: - static NSClassDescription? classDescriptionForClass_(objc.ObjCObjectBase aClass) { - final _ret = _objc_msgSend_juohf7(_class_NSClassDescription, _sel_classDescriptionForClass_, aClass.ref.pointer); - return _ret.address == 0 ? null : NSClassDescription.castFromPointer(_ret, retain: true, release: true); + static NSClassDescription? classDescriptionForClass_( + objc.ObjCObjectBase aClass) { + final _ret = _objc_msgSend_juohf7(_class_NSClassDescription, + _sel_classDescriptionForClass_, aClass.ref.pointer); + return _ret.address == 0 + ? null + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); } /// attributeKeys @@ -24376,175 +36606,322 @@ _objc_msgSend_ksby9f(_class_NSClassDescription, _sel_invalidateClassDescriptionC /// toOneRelationshipKeys objc.NSArray get toOneRelationshipKeys { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_toOneRelationshipKeys); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_toOneRelationshipKeys); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// toManyRelationshipKeys objc.NSArray get toManyRelationshipKeys { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_toManyRelationshipKeys); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_toManyRelationshipKeys); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// inverseForRelationshipKey: objc.NSString? inverseForRelationshipKey_(objc.NSString relationshipKey) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_inverseForRelationshipKey_, relationshipKey.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_inverseForRelationshipKey_, relationshipKey.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init NSClassDescription init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSClassDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// new static NSClassDescription new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSClassDescription, _sel_new); - return NSClassDescription.castFromPointer(_ret, retain: false, release: true); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSClassDescription, _sel_allocWithZone_, zone); - return NSClassDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSClassDescription, _sel_allocWithZone_, zone); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSClassDescription alloc() { final _ret = _objc_msgSend_1unuoxw(_class_NSClassDescription, _sel_alloc); - return NSClassDescription.castFromPointer(_ret, retain: false, release: true); + return NSClassDescription.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_cqxsqq(_class_NSClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSClassDescription, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSClassDescription, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSClassDescription, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSClassDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSClassDescription, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSClassDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSClassDescription, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSClassDescription, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } -late final _class_NSScriptClassDescription = objc.getClass("NSScriptClassDescription"); -late final _sel_initWithSuiteName_className_dictionary_ = objc.registerName("initWithSuiteName:className:dictionary:"); +late final _class_NSScriptClassDescription = + objc.getClass("NSScriptClassDescription"); +late final _sel_initWithSuiteName_className_dictionary_ = + objc.registerName("initWithSuiteName:className:dictionary:"); late final _sel_suiteName = objc.registerName("suiteName"); late final _sel_className = objc.registerName("className"); -late final _sel_implementationClassName = objc.registerName("implementationClassName"); -late final _sel_superclassDescription = objc.registerName("superclassDescription"); +late final _sel_implementationClassName = + objc.registerName("implementationClassName"); +late final _sel_superclassDescription = + objc.registerName("superclassDescription"); late final _sel_appleEventCode = objc.registerName("appleEventCode"); -final _objc_msgSend_dzloj4 = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); -late final _sel_matchesAppleEventCode_ = objc.registerName("matchesAppleEventCode:"); -final _objc_msgSend_1n8vqu1 = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedInt )>>().asFunction , ffi.Pointer , int )>(); -late final _class_NSScriptCommandDescription = objc.getClass("NSScriptCommandDescription"); -late final _sel_initWithSuiteName_commandName_dictionary_ = objc.registerName("initWithSuiteName:commandName:dictionary:"); +final _objc_msgSend_dzloj4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_matchesAppleEventCode_ = + objc.registerName("matchesAppleEventCode:"); +final _objc_msgSend_1n8vqu1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _class_NSScriptCommandDescription = + objc.getClass("NSScriptCommandDescription"); +late final _sel_initWithSuiteName_commandName_dictionary_ = + objc.registerName("initWithSuiteName:commandName:dictionary:"); late final _sel_commandName = objc.registerName("commandName"); late final _sel_appleEventClassCode = objc.registerName("appleEventClassCode"); late final _sel_commandClassName = objc.registerName("commandClassName"); late final _sel_returnType = objc.registerName("returnType"); -late final _sel_appleEventCodeForReturnType = objc.registerName("appleEventCodeForReturnType"); +late final _sel_appleEventCodeForReturnType = + objc.registerName("appleEventCodeForReturnType"); late final _sel_argumentNames = objc.registerName("argumentNames"); -late final _sel_typeForArgumentWithName_ = objc.registerName("typeForArgumentWithName:"); -late final _sel_appleEventCodeForArgumentWithName_ = objc.registerName("appleEventCodeForArgumentWithName:"); -final _objc_msgSend_t2sarz = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -late final _sel_isOptionalArgumentWithName_ = objc.registerName("isOptionalArgumentWithName:"); +late final _sel_typeForArgumentWithName_ = + objc.registerName("typeForArgumentWithName:"); +late final _sel_appleEventCodeForArgumentWithName_ = + objc.registerName("appleEventCodeForArgumentWithName:"); +final _objc_msgSend_t2sarz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isOptionalArgumentWithName_ = + objc.registerName("isOptionalArgumentWithName:"); late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); -late final _sel_initWithCommandDescription_ = objc.registerName("initWithCommandDescription:"); +late final _sel_initWithCommandDescription_ = + objc.registerName("initWithCommandDescription:"); late final _sel_commandDescription = objc.registerName("commandDescription"); late final _sel_directParameter = objc.registerName("directParameter"); late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); -late final _class_NSScriptObjectSpecifier = objc.getClass("NSScriptObjectSpecifier"); -late final _class_NSAppleEventDescriptor = objc.getClass("NSAppleEventDescriptor"); +late final _class_NSScriptObjectSpecifier = + objc.getClass("NSScriptObjectSpecifier"); +late final _class_NSAppleEventDescriptor = + objc.getClass("NSAppleEventDescriptor"); late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); -late final _sel_descriptorWithDescriptorType_bytes_length_ = objc.registerName("descriptorWithDescriptorType:bytes:length:"); -final _objc_msgSend_unctjf = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedInt , ffi.Pointer , ffi.UnsignedLong )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer , int )>(); -late final _sel_descriptorWithDescriptorType_data_ = objc.registerName("descriptorWithDescriptorType:data:"); -final _objc_msgSend_1k5vjgv = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedInt , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , ffi.Pointer )>(); -late final _sel_descriptorWithBoolean_ = objc.registerName("descriptorWithBoolean:"); -late final _sel_descriptorWithEnumCode_ = objc.registerName("descriptorWithEnumCode:"); -late final _sel_descriptorWithInt32_ = objc.registerName("descriptorWithInt32:"); -late final _sel_descriptorWithDouble_ = objc.registerName("descriptorWithDouble:"); -late final _sel_descriptorWithTypeCode_ = objc.registerName("descriptorWithTypeCode:"); -late final _sel_descriptorWithString_ = objc.registerName("descriptorWithString:"); +late final _sel_descriptorWithDescriptorType_bytes_length_ = + objc.registerName("descriptorWithDescriptorType:bytes:length:"); +final _objc_msgSend_unctjf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); +late final _sel_descriptorWithDescriptorType_data_ = + objc.registerName("descriptorWithDescriptorType:data:"); +final _objc_msgSend_1k5vjgv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_descriptorWithBoolean_ = + objc.registerName("descriptorWithBoolean:"); +late final _sel_descriptorWithEnumCode_ = + objc.registerName("descriptorWithEnumCode:"); +late final _sel_descriptorWithInt32_ = + objc.registerName("descriptorWithInt32:"); +late final _sel_descriptorWithDouble_ = + objc.registerName("descriptorWithDouble:"); +late final _sel_descriptorWithTypeCode_ = + objc.registerName("descriptorWithTypeCode:"); +late final _sel_descriptorWithString_ = + objc.registerName("descriptorWithString:"); late final _sel_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); -late final _sel_descriptorWithFileURL_ = objc.registerName("descriptorWithFileURL:"); -late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = objc.registerName("appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); -final _objc_msgSend_1iwlq4o = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedInt , ffi.UnsignedInt , ffi.Pointer , ffi.Short , ffi.Int )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , int , ffi.Pointer , int , int )>(); +late final _sel_descriptorWithFileURL_ = + objc.registerName("descriptorWithFileURL:"); +late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +final _objc_msgSend_1iwlq4o = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int, + int)>(); late final _sel_listDescriptor = objc.registerName("listDescriptor"); late final _sel_recordDescriptor = objc.registerName("recordDescriptor"); -late final _sel_currentProcessDescriptor = objc.registerName("currentProcessDescriptor"); -late final _sel_descriptorWithProcessIdentifier_ = objc.registerName("descriptorWithProcessIdentifier:"); -late final _sel_descriptorWithBundleIdentifier_ = objc.registerName("descriptorWithBundleIdentifier:"); -late final _sel_descriptorWithApplicationURL_ = objc.registerName("descriptorWithApplicationURL:"); -final class OpaqueAEDataStorageType extends ffi.Opaque{ -} +late final _sel_currentProcessDescriptor = + objc.registerName("currentProcessDescriptor"); +late final _sel_descriptorWithProcessIdentifier_ = + objc.registerName("descriptorWithProcessIdentifier:"); +late final _sel_descriptorWithBundleIdentifier_ = + objc.registerName("descriptorWithBundleIdentifier:"); +late final _sel_descriptorWithApplicationURL_ = + objc.registerName("descriptorWithApplicationURL:"); + +final class OpaqueAEDataStorageType extends ffi.Opaque {} @ffi.Packed(2) -final class AEDesc extends ffi.Struct{ +final class AEDesc extends ffi.Struct { @ffi.UnsignedInt() external int descriptorType; external ffi.Pointer> dataHandle; - } -late final _sel_initWithAEDescNoCopy_ = objc.registerName("initWithAEDescNoCopy:"); -final _objc_msgSend_10xxpbh = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer )>>().asFunction , ffi.Pointer , ffi.Pointer )>(); -late final _sel_initWithDescriptorType_bytes_length_ = objc.registerName("initWithDescriptorType:bytes:length:"); -late final _sel_initWithDescriptorType_data_ = objc.registerName("initWithDescriptorType:data:"); -late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = objc.registerName("initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +late final _sel_initWithAEDescNoCopy_ = + objc.registerName("initWithAEDescNoCopy:"); +final _objc_msgSend_10xxpbh = 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_initWithDescriptorType_bytes_length_ = + objc.registerName("initWithDescriptorType:bytes:length:"); +late final _sel_initWithDescriptorType_data_ = + objc.registerName("initWithDescriptorType:data:"); +late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); late final _sel_initListDescriptor = objc.registerName("initListDescriptor"); -late final _sel_initRecordDescriptor = objc.registerName("initRecordDescriptor"); +late final _sel_initRecordDescriptor = + objc.registerName("initRecordDescriptor"); late final _sel_aeDesc = objc.registerName("aeDesc"); -final _objc_msgSend_jg6irx = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_jg6irx = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_descriptorType = objc.registerName("descriptorType"); late final _sel_booleanValue = objc.registerName("booleanValue"); -final _objc_msgSend_1cswds = objc.msgSendPointer.cast , ffi.Pointer )>>().asFunction , ffi.Pointer )>(); +final _objc_msgSend_1cswds = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); late final _sel_enumCodeValue = objc.registerName("enumCodeValue"); late final _sel_int32Value = objc.registerName("int32Value"); late final _sel_typeCodeValue = objc.registerName("typeCodeValue"); @@ -24554,13 +36931,39 @@ late final _sel_eventClass = objc.registerName("eventClass"); late final _sel_eventID = objc.registerName("eventID"); late final _sel_returnID = objc.registerName("returnID"); late final _sel_transactionID = objc.registerName("transactionID"); -late final _sel_setParamDescriptor_forKeyword_ = objc.registerName("setParamDescriptor:forKeyword:"); -final _objc_msgSend_1dzwu6 = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.UnsignedInt )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); -late final _sel_paramDescriptorForKeyword_ = objc.registerName("paramDescriptorForKeyword:"); -late final _sel_removeParamDescriptorWithKeyword_ = objc.registerName("removeParamDescriptorWithKeyword:"); -final _objc_msgSend_l6g8fv = objc.msgSendPointer.cast , ffi.Pointer , ffi.UnsignedInt )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_setAttributeDescriptor_forKeyword_ = objc.registerName("setAttributeDescriptor:forKeyword:"); -late final _sel_attributeDescriptorForKeyword_ = objc.registerName("attributeDescriptorForKeyword:"); +late final _sel_setParamDescriptor_forKeyword_ = + objc.registerName("setParamDescriptor:forKeyword:"); +final _objc_msgSend_1dzwu6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_paramDescriptorForKeyword_ = + objc.registerName("paramDescriptorForKeyword:"); +late final _sel_removeParamDescriptorWithKeyword_ = + objc.registerName("removeParamDescriptorWithKeyword:"); +final _objc_msgSend_l6g8fv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAttributeDescriptor_forKeyword_ = + objc.registerName("setAttributeDescriptor:forKeyword:"); +late final _sel_attributeDescriptorForKeyword_ = + objc.registerName("attributeDescriptorForKeyword:"); + enum NSAppleEventSendOptions { NSAppleEventSendNoReply(1), NSAppleEventSendQueueReply(2), @@ -24574,217 +36977,358 @@ enum NSAppleEventSendOptions { NSAppleEventSendDontAnnotate(65536), NSAppleEventSendDefaultOptions(35); - final int value; const NSAppleEventSendOptions(this.value); static NSAppleEventSendOptions fromValue(int value) => switch (value) { - 1 => NSAppleEventSendNoReply, - 2 => NSAppleEventSendQueueReply, - 3 => NSAppleEventSendWaitForReply, - 16 => NSAppleEventSendNeverInteract, - 32 => NSAppleEventSendCanInteract, - 48 => NSAppleEventSendAlwaysInteract, - 64 => NSAppleEventSendCanSwitchLayer, - 4096 => NSAppleEventSendDontRecord, - 8192 => NSAppleEventSendDontExecute, - 65536 => NSAppleEventSendDontAnnotate, - 35 => NSAppleEventSendDefaultOptions, - _ => throw ArgumentError("Unknown value for NSAppleEventSendOptions: $value"), - }; - -} - -late final _sel_sendEventWithOptions_timeout_error_ = objc.registerName("sendEventWithOptions:timeout:error:"); -final _objc_msgSend_19xj9w = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.UnsignedLong , ffi.Double , ffi.Pointer> )>>().asFunction Function(ffi.Pointer , ffi.Pointer , int , double , ffi.Pointer> )>(); + 1 => NSAppleEventSendNoReply, + 2 => NSAppleEventSendQueueReply, + 3 => NSAppleEventSendWaitForReply, + 16 => NSAppleEventSendNeverInteract, + 32 => NSAppleEventSendCanInteract, + 48 => NSAppleEventSendAlwaysInteract, + 64 => NSAppleEventSendCanSwitchLayer, + 4096 => NSAppleEventSendDontRecord, + 8192 => NSAppleEventSendDontExecute, + 65536 => NSAppleEventSendDontAnnotate, + 35 => NSAppleEventSendDefaultOptions, + _ => throw ArgumentError( + "Unknown value for NSAppleEventSendOptions: $value"), + }; +} + +late final _sel_sendEventWithOptions_timeout_error_ = + objc.registerName("sendEventWithOptions:timeout:error:"); +final _objc_msgSend_19xj9w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + double, + ffi.Pointer>)>(); late final _sel_isRecordDescriptor = objc.registerName("isRecordDescriptor"); late final _sel_numberOfItems = objc.registerName("numberOfItems"); -late final _sel_insertDescriptor_atIndex_ = objc.registerName("insertDescriptor:atIndex:"); -final _objc_msgSend_da94db = objc.msgSendPointer.cast , ffi.Pointer , ffi.Pointer , ffi.Long )>>().asFunction , ffi.Pointer , ffi.Pointer , int )>(); +late final _sel_insertDescriptor_atIndex_ = + objc.registerName("insertDescriptor:atIndex:"); +final _objc_msgSend_da94db = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); -late final _sel_removeDescriptorAtIndex_ = objc.registerName("removeDescriptorAtIndex:"); -late final _sel_setDescriptor_forKeyword_ = objc.registerName("setDescriptor:forKeyword:"); -late final _sel_descriptorForKeyword_ = objc.registerName("descriptorForKeyword:"); -late final _sel_removeDescriptorWithKeyword_ = objc.registerName("removeDescriptorWithKeyword:"); -late final _sel_keywordForDescriptorAtIndex_ = objc.registerName("keywordForDescriptorAtIndex:"); -final _objc_msgSend_hkgvph = objc.msgSendPointer.cast , ffi.Pointer , ffi.Long )>>().asFunction , ffi.Pointer , int )>(); -late final _sel_coerceToDescriptorType_ = objc.registerName("coerceToDescriptorType:"); +late final _sel_removeDescriptorAtIndex_ = + objc.registerName("removeDescriptorAtIndex:"); +late final _sel_setDescriptor_forKeyword_ = + objc.registerName("setDescriptor:forKeyword:"); +late final _sel_descriptorForKeyword_ = + objc.registerName("descriptorForKeyword:"); +late final _sel_removeDescriptorWithKeyword_ = + objc.registerName("removeDescriptorWithKeyword:"); +late final _sel_keywordForDescriptorAtIndex_ = + objc.registerName("keywordForDescriptorAtIndex:"); +final _objc_msgSend_hkgvph = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_coerceToDescriptorType_ = + objc.registerName("coerceToDescriptorType:"); /// NSAppleEventDescriptor class NSAppleEventDescriptor extends objc.NSObject { NSAppleEventDescriptor._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSAppleEventDescriptor] that points to the same underlying object as [other]. - NSAppleEventDescriptor.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSAppleEventDescriptor.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSAppleEventDescriptor] that wraps the given raw object pointer. NSAppleEventDescriptor.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); } /// nullDescriptor static NSAppleEventDescriptor nullDescriptor() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_nullDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_nullDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithDescriptorType:bytes:length: - static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_(int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_unctjf(_class_NSAppleEventDescriptor, _sel_descriptorWithDescriptorType_bytes_length_, descriptorType, bytes, byteCount); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_unctjf( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithDescriptorType:data: - static NSAppleEventDescriptor? descriptorWithDescriptorType_data_(int descriptorType, objc.NSData? data) { - final _ret = _objc_msgSend_1k5vjgv(_class_NSAppleEventDescriptor, _sel_descriptorWithDescriptorType_data_, descriptorType, data?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_1k5vjgv( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_data_, + descriptorType, + data?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithBoolean: static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { - final _ret = _objc_msgSend_1ar9f5m(_class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1ar9f5m( + _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithEnumCode: static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { - final _ret = _objc_msgSend_pxgym4(_class_NSAppleEventDescriptor, _sel_descriptorWithEnumCode_, enumerator); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_pxgym4(_class_NSAppleEventDescriptor, + _sel_descriptorWithEnumCode_, enumerator); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithInt32: static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { - final _ret = _objc_msgSend_105o5we(_class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_105o5we( + _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithDouble: static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { - final _ret = _objc_msgSend_m7jc8y(_class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_m7jc8y( + _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithTypeCode: static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { - final _ret = _objc_msgSend_pxgym4(_class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_pxgym4( + _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithString: static NSAppleEventDescriptor descriptorWithString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, _sel_descriptorWithString_, string.ref.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithString_, string.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithDate: static NSAppleEventDescriptor descriptorWithDate_(objc.NSDate date) { - final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.ref.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithDate_, date.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithFileURL: static NSAppleEventDescriptor descriptorWithFileURL_(objc.NSURL fileURL) { - final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, _sel_descriptorWithFileURL_, fileURL.ref.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithFileURL_, fileURL.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID: - static NSAppleEventDescriptor appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_(int eventClass, int eventID, NSAppleEventDescriptor? targetDescriptor, int returnID, int transactionID) { - final _ret = _objc_msgSend_1iwlq4o(_class_NSAppleEventDescriptor, _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, eventClass, eventID, targetDescriptor?.ref.pointer ?? ffi.nullptr, returnID, transactionID); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + static NSAppleEventDescriptor + appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_1iwlq4o( + _class_NSAppleEventDescriptor, + _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.ref.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// listDescriptor static NSAppleEventDescriptor listDescriptor() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_listDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_listDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// recordDescriptor static NSAppleEventDescriptor recordDescriptor() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_recordDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_recordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// currentProcessDescriptor static NSAppleEventDescriptor currentProcessDescriptor() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithProcessIdentifier: - static NSAppleEventDescriptor descriptorWithProcessIdentifier_(int processIdentifier) { - final _ret = _objc_msgSend_105o5we(_class_NSAppleEventDescriptor, _sel_descriptorWithProcessIdentifier_, processIdentifier); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithProcessIdentifier_( + int processIdentifier) { + final _ret = _objc_msgSend_105o5we(_class_NSAppleEventDescriptor, + _sel_descriptorWithProcessIdentifier_, processIdentifier); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithBundleIdentifier: - static NSAppleEventDescriptor descriptorWithBundleIdentifier_(objc.NSString bundleIdentifier) { - final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, _sel_descriptorWithBundleIdentifier_, bundleIdentifier.ref.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithBundleIdentifier_( + objc.NSString bundleIdentifier) { + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithBundleIdentifier_, bundleIdentifier.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// descriptorWithApplicationURL: - static NSAppleEventDescriptor descriptorWithApplicationURL_(objc.NSURL applicationURL) { - final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, _sel_descriptorWithApplicationURL_, applicationURL.ref.pointer); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithApplicationURL_( + objc.NSURL applicationURL) { + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_descriptorWithApplicationURL_, applicationURL.ref.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// initWithAEDescNoCopy: NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { - final _ret = _objc_msgSend_10xxpbh(this.ref.retainAndReturnPointer(), _sel_initWithAEDescNoCopy_, aeDesc); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_10xxpbh( + this.ref.retainAndReturnPointer(), _sel_initWithAEDescNoCopy_, aeDesc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// initWithDescriptorType:bytes:length: - NSAppleEventDescriptor? initWithDescriptorType_bytes_length_(int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_unctjf(this.ref.retainAndReturnPointer(), _sel_initWithDescriptorType_bytes_length_, descriptorType, bytes, byteCount); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_unctjf( + this.ref.retainAndReturnPointer(), + _sel_initWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// initWithDescriptorType:data: - NSAppleEventDescriptor? initWithDescriptorType_data_(int descriptorType, objc.NSData? data) { - final _ret = _objc_msgSend_1k5vjgv(this.ref.retainAndReturnPointer(), _sel_initWithDescriptorType_data_, descriptorType, data?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + NSAppleEventDescriptor? initWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_1k5vjgv( + this.ref.retainAndReturnPointer(), + _sel_initWithDescriptorType_data_, + descriptorType, + data?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// initWithEventClass:eventID:targetDescriptor:returnID:transactionID: - NSAppleEventDescriptor initWithEventClass_eventID_targetDescriptor_returnID_transactionID_(int eventClass, int eventID, NSAppleEventDescriptor? targetDescriptor, int returnID, int transactionID) { - final _ret = _objc_msgSend_1iwlq4o(this.ref.retainAndReturnPointer(), _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, eventClass, eventID, targetDescriptor?.ref.pointer ?? ffi.nullptr, returnID, transactionID); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + NSAppleEventDescriptor + initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_1iwlq4o( + this.ref.retainAndReturnPointer(), + _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.ref.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// initListDescriptor NSAppleEventDescriptor initListDescriptor() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_initListDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.retainAndReturnPointer(), _sel_initListDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// initRecordDescriptor NSAppleEventDescriptor initRecordDescriptor() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_initRecordDescriptor); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.retainAndReturnPointer(), _sel_initRecordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// aeDesc ffi.Pointer get aeDesc { return _objc_msgSend_jg6irx(this.ref.pointer, _sel_aeDesc); - } /// descriptorType int get descriptorType { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_descriptorType); - } /// data @@ -24796,384 +37340,505 @@ class NSAppleEventDescriptor extends objc.NSObject { /// booleanValue int get booleanValue { return _objc_msgSend_1cswds(this.ref.pointer, _sel_booleanValue); - } /// enumCodeValue int get enumCodeValue { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_enumCodeValue); - } /// int32Value int get int32Value { return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_int32Value); - } /// doubleValue double get doubleValue { - return objc.useMsgSendVariants ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_doubleValue) : _objc_msgSend_10noklm(this.ref.pointer, _sel_doubleValue); - + return objc.useMsgSendVariants + ? _objc_msgSend_10noklmFpret(this.ref.pointer, _sel_doubleValue) + : _objc_msgSend_10noklm(this.ref.pointer, _sel_doubleValue); } /// typeCodeValue int get typeCodeValue { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_typeCodeValue); - } /// stringValue objc.NSString? get stringValue { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_stringValue); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// dateValue objc.NSDate? get dateValue { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dateValue); - return _ret.address == 0 ? null : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } /// fileURLValue objc.NSURL? get fileURLValue { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileURLValue); - return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } /// eventClass int get eventClass { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_eventClass); - } /// eventID int get eventID { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_eventID); - } /// returnID int get returnID { return _objc_msgSend_157j54x(this.ref.pointer, _sel_returnID); - } /// transactionID int get transactionID { return _objc_msgSend_1tf0yjs(this.ref.pointer, _sel_transactionID); - } /// setParamDescriptor:forKeyword: - void setParamDescriptor_forKeyword_(NSAppleEventDescriptor descriptor, int keyword) { -_objc_msgSend_1dzwu6(this.ref.pointer, _sel_setParamDescriptor_forKeyword_, descriptor.ref.pointer, keyword); - + void setParamDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_1dzwu6(this.ref.pointer, _sel_setParamDescriptor_forKeyword_, + descriptor.ref.pointer, keyword); } /// paramDescriptorForKeyword: NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_pxgym4(this.ref.pointer, _sel_paramDescriptorForKeyword_, keyword); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_paramDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// removeParamDescriptorWithKeyword: void removeParamDescriptorWithKeyword_(int keyword) { -_objc_msgSend_l6g8fv(this.ref.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); - + _objc_msgSend_l6g8fv( + this.ref.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); } /// setAttributeDescriptor:forKeyword: - void setAttributeDescriptor_forKeyword_(NSAppleEventDescriptor descriptor, int keyword) { -_objc_msgSend_1dzwu6(this.ref.pointer, _sel_setAttributeDescriptor_forKeyword_, descriptor.ref.pointer, keyword); - + void setAttributeDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_1dzwu6( + this.ref.pointer, + _sel_setAttributeDescriptor_forKeyword_, + descriptor.ref.pointer, + keyword); } /// attributeDescriptorForKeyword: NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_pxgym4(this.ref.pointer, _sel_attributeDescriptorForKeyword_, keyword); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_attributeDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// sendEventWithOptions:timeout:error: - NSAppleEventDescriptor? sendEventWithOptions_timeout_error_(NSAppleEventSendOptions sendOptions, double timeoutInSeconds, ffi.Pointer> error) { - final _ret = _objc_msgSend_19xj9w(this.ref.pointer, _sel_sendEventWithOptions_timeout_error_, sendOptions.value, timeoutInSeconds, error); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( + NSAppleEventSendOptions sendOptions, + double timeoutInSeconds, + ffi.Pointer> error) { + final _ret = _objc_msgSend_19xj9w( + this.ref.pointer, + _sel_sendEventWithOptions_timeout_error_, + sendOptions.value, + timeoutInSeconds, + error); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// isRecordDescriptor bool get isRecordDescriptor { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isRecordDescriptor); - } /// numberOfItems int get numberOfItems { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_numberOfItems); - } /// insertDescriptor:atIndex: void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { -_objc_msgSend_da94db(this.ref.pointer, _sel_insertDescriptor_atIndex_, descriptor.ref.pointer, index); - + _objc_msgSend_da94db(this.ref.pointer, _sel_insertDescriptor_atIndex_, + descriptor.ref.pointer, index); } /// descriptorAtIndex: NSAppleEventDescriptor? descriptorAtIndex_(int index) { - final _ret = _objc_msgSend_crtxa9(this.ref.pointer, _sel_descriptorAtIndex_, index); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_crtxa9(this.ref.pointer, _sel_descriptorAtIndex_, index); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// removeDescriptorAtIndex: void removeDescriptorAtIndex_(int index) { -_objc_msgSend_ke7qz2(this.ref.pointer, _sel_removeDescriptorAtIndex_, index); - + _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_removeDescriptorAtIndex_, index); } /// setDescriptor:forKeyword: - void setDescriptor_forKeyword_(NSAppleEventDescriptor descriptor, int keyword) { -_objc_msgSend_1dzwu6(this.ref.pointer, _sel_setDescriptor_forKeyword_, descriptor.ref.pointer, keyword); - + void setDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_1dzwu6(this.ref.pointer, _sel_setDescriptor_forKeyword_, + descriptor.ref.pointer, keyword); } /// descriptorForKeyword: NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_pxgym4(this.ref.pointer, _sel_descriptorForKeyword_, keyword); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_descriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// removeDescriptorWithKeyword: void removeDescriptorWithKeyword_(int keyword) { -_objc_msgSend_l6g8fv(this.ref.pointer, _sel_removeDescriptorWithKeyword_, keyword); - + _objc_msgSend_l6g8fv( + this.ref.pointer, _sel_removeDescriptorWithKeyword_, keyword); } /// keywordForDescriptorAtIndex: int keywordForDescriptorAtIndex_(int index) { - return _objc_msgSend_hkgvph(this.ref.pointer, _sel_keywordForDescriptorAtIndex_, index); - + return _objc_msgSend_hkgvph( + this.ref.pointer, _sel_keywordForDescriptorAtIndex_, index); } /// coerceToDescriptorType: NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { - final _ret = _objc_msgSend_pxgym4(this.ref.pointer, _sel_coerceToDescriptorType_, descriptorType); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_coerceToDescriptorType_, descriptorType); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// init NSAppleEventDescriptor init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// new static NSAppleEventDescriptor new1() { final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_new); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSAppleEventDescriptor alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_alloc); - return NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_alloc); + return NSAppleEventDescriptor.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_cqxsqq(_class_NSAppleEventDescriptor, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSAppleEventDescriptor, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSAppleEventDescriptor, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSAppleEventDescriptor, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSAppleEventDescriptor, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSAppleEventDescriptor, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSAppleEventDescriptor, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSAppleEventDescriptor, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSAppleEventDescriptor, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSAppleEventDescriptor, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSAppleEventDescriptor, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// supportsSecureCoding static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSAppleEventDescriptor, _sel_supportsSecureCoding); - + return _objc_msgSend_olxnu1( + _class_NSAppleEventDescriptor, _sel_supportsSecureCoding); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSAppleEventDescriptor? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } } -late final _sel_objectSpecifierWithDescriptor_ = objc.registerName("objectSpecifierWithDescriptor:"); -late final _sel_initWithContainerSpecifier_key_ = objc.registerName("initWithContainerSpecifier:key:"); -late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc.registerName("initWithContainerClassDescription:containerSpecifier:key:"); +late final _sel_objectSpecifierWithDescriptor_ = + objc.registerName("objectSpecifierWithDescriptor:"); +late final _sel_initWithContainerSpecifier_key_ = + objc.registerName("initWithContainerSpecifier:key:"); +late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc + .registerName("initWithContainerClassDescription:containerSpecifier:key:"); late final _sel_childSpecifier = objc.registerName("childSpecifier"); late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); late final _sel_containerSpecifier = objc.registerName("containerSpecifier"); -late final _sel_setContainerSpecifier_ = objc.registerName("setContainerSpecifier:"); -late final _sel_containerIsObjectBeingTested = objc.registerName("containerIsObjectBeingTested"); -late final _sel_setContainerIsObjectBeingTested_ = objc.registerName("setContainerIsObjectBeingTested:"); -late final _sel_containerIsRangeContainerObject = objc.registerName("containerIsRangeContainerObject"); -late final _sel_setContainerIsRangeContainerObject_ = objc.registerName("setContainerIsRangeContainerObject:"); +late final _sel_setContainerSpecifier_ = + objc.registerName("setContainerSpecifier:"); +late final _sel_containerIsObjectBeingTested = + objc.registerName("containerIsObjectBeingTested"); +late final _sel_setContainerIsObjectBeingTested_ = + objc.registerName("setContainerIsObjectBeingTested:"); +late final _sel_containerIsRangeContainerObject = + objc.registerName("containerIsRangeContainerObject"); +late final _sel_setContainerIsRangeContainerObject_ = + objc.registerName("setContainerIsRangeContainerObject:"); late final _sel_key = objc.registerName("key"); late final _sel_setKey_ = objc.registerName("setKey:"); -late final _sel_containerClassDescription = objc.registerName("containerClassDescription"); -late final _sel_setContainerClassDescription_ = objc.registerName("setContainerClassDescription:"); +late final _sel_containerClassDescription = + objc.registerName("containerClassDescription"); +late final _sel_setContainerClassDescription_ = + objc.registerName("setContainerClassDescription:"); late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); -late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); -final _objc_msgSend_1e2yezv = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); -late final _sel_objectsByEvaluatingWithContainers_ = objc.registerName("objectsByEvaluatingWithContainers:"); -late final _sel_objectsByEvaluatingSpecifier = objc.registerName("objectsByEvaluatingSpecifier"); -late final _sel_evaluationErrorNumber = objc.registerName("evaluationErrorNumber"); -late final _sel_setEvaluationErrorNumber_ = objc.registerName("setEvaluationErrorNumber:"); -late final _sel_evaluationErrorSpecifier = objc.registerName("evaluationErrorSpecifier"); +late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = + objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); +final _objc_msgSend_1e2yezv = 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_objectsByEvaluatingWithContainers_ = + objc.registerName("objectsByEvaluatingWithContainers:"); +late final _sel_objectsByEvaluatingSpecifier = + objc.registerName("objectsByEvaluatingSpecifier"); +late final _sel_evaluationErrorNumber = + objc.registerName("evaluationErrorNumber"); +late final _sel_setEvaluationErrorNumber_ = + objc.registerName("setEvaluationErrorNumber:"); +late final _sel_evaluationErrorSpecifier = + objc.registerName("evaluationErrorSpecifier"); late final _sel_descriptor = objc.registerName("descriptor"); /// NSScriptObjectSpecifier class NSScriptObjectSpecifier extends objc.NSObject { NSScriptObjectSpecifier._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. - NSScriptObjectSpecifier.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSScriptObjectSpecifier.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSScriptObjectSpecifier] that wraps the given raw object pointer. NSScriptObjectSpecifier.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); } /// objectSpecifierWithDescriptor: - static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_(NSAppleEventDescriptor descriptor) { - final _ret = _objc_msgSend_juohf7(_class_NSScriptObjectSpecifier, _sel_objectSpecifierWithDescriptor_, descriptor.ref.pointer); - return _ret.address == 0 ? null : NSScriptObjectSpecifier.castFromPointer(_ret, retain: true, release: true); + static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( + NSAppleEventDescriptor descriptor) { + final _ret = _objc_msgSend_juohf7(_class_NSScriptObjectSpecifier, + _sel_objectSpecifierWithDescriptor_, descriptor.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } /// initWithContainerSpecifier:key: - NSScriptObjectSpecifier initWithContainerSpecifier_key_(NSScriptObjectSpecifier container, objc.NSString property) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), _sel_initWithContainerSpecifier_key_, container.ref.pointer, property.ref.pointer); - return NSScriptObjectSpecifier.castFromPointer(_ret, retain: false, release: true); + NSScriptObjectSpecifier initWithContainerSpecifier_key_( + NSScriptObjectSpecifier container, objc.NSString property) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithContainerSpecifier_key_, + container.ref.pointer, + property.ref.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } /// initWithContainerClassDescription:containerSpecifier:key: - NSScriptObjectSpecifier initWithContainerClassDescription_containerSpecifier_key_(NSScriptClassDescription classDesc, NSScriptObjectSpecifier? container, objc.NSString property) { - final _ret = _objc_msgSend_aud7dn(this.ref.retainAndReturnPointer(), _sel_initWithContainerClassDescription_containerSpecifier_key_, classDesc.ref.pointer, container?.ref.pointer ?? ffi.nullptr, property.ref.pointer); - return NSScriptObjectSpecifier.castFromPointer(_ret, retain: false, release: true); + NSScriptObjectSpecifier + initWithContainerClassDescription_containerSpecifier_key_( + NSScriptClassDescription classDesc, + NSScriptObjectSpecifier? container, + objc.NSString property) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithContainerClassDescription_containerSpecifier_key_, + classDesc.ref.pointer, + container?.ref.pointer ?? ffi.nullptr, + property.ref.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } /// initWithCoder: NSScriptObjectSpecifier? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSScriptObjectSpecifier.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } /// childSpecifier NSScriptObjectSpecifier? get childSpecifier { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_childSpecifier); - return _ret.address == 0 ? null : NSScriptObjectSpecifier.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } /// setChildSpecifier: - set childSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildSpecifier_, value?.ref.pointer ?? ffi.nullptr); - + set childSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setChildSpecifier_, + value?.ref.pointer ?? ffi.nullptr); } /// containerSpecifier NSScriptObjectSpecifier? get containerSpecifier { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_containerSpecifier); - return _ret.address == 0 ? null : NSScriptObjectSpecifier.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_containerSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } /// setContainerSpecifier: - set containerSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setContainerSpecifier_, value?.ref.pointer ?? ffi.nullptr); - + set containerSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setContainerSpecifier_, + value?.ref.pointer ?? ffi.nullptr); } /// containerIsObjectBeingTested bool get containerIsObjectBeingTested { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_containerIsObjectBeingTested); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_containerIsObjectBeingTested); } /// setContainerIsObjectBeingTested: - set containerIsObjectBeingTested(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setContainerIsObjectBeingTested_, value); - + set containerIsObjectBeingTested(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setContainerIsObjectBeingTested_, value); } /// containerIsRangeContainerObject bool get containerIsRangeContainerObject { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_containerIsRangeContainerObject); - + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_containerIsRangeContainerObject); } /// setContainerIsRangeContainerObject: - set containerIsRangeContainerObject(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setContainerIsRangeContainerObject_, value); - + set containerIsRangeContainerObject(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setContainerIsRangeContainerObject_, value); } /// key @@ -25183,356 +37848,458 @@ class NSScriptObjectSpecifier extends objc.NSObject { } /// setKey: - set key(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setKey_, value.ref.pointer); - + set key(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setKey_, value.ref.pointer); } /// containerClassDescription NSScriptClassDescription? get containerClassDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_containerClassDescription); - return _ret.address == 0 ? null : NSScriptClassDescription.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_containerClassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } /// setContainerClassDescription: - set containerClassDescription(NSScriptClassDescription? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setContainerClassDescription_, value?.ref.pointer ?? ffi.nullptr); - + set containerClassDescription(NSScriptClassDescription? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setContainerClassDescription_, value?.ref.pointer ?? ffi.nullptr); } /// keyClassDescription NSScriptClassDescription? get keyClassDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_keyClassDescription); - return _ret.address == 0 ? null : NSScriptClassDescription.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_keyClassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } /// indicesOfObjectsByEvaluatingWithContainer:count: - ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_(objc.ObjCObjectBase container, ffi.Pointer count) { - return _objc_msgSend_1e2yezv(this.ref.pointer, _sel_indicesOfObjectsByEvaluatingWithContainer_count_, container.ref.pointer, count); - + ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( + objc.ObjCObjectBase container, ffi.Pointer count) { + return _objc_msgSend_1e2yezv( + this.ref.pointer, + _sel_indicesOfObjectsByEvaluatingWithContainer_count_, + container.ref.pointer, + count); } /// objectsByEvaluatingWithContainers: - objc.ObjCObjectBase? objectsByEvaluatingWithContainers_(objc.ObjCObjectBase containers) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_objectsByEvaluatingWithContainers_, containers.ref.pointer); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + objc.ObjCObjectBase? objectsByEvaluatingWithContainers_( + objc.ObjCObjectBase containers) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_objectsByEvaluatingWithContainers_, containers.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// objectsByEvaluatingSpecifier objc.ObjCObjectBase? get objectsByEvaluatingSpecifier { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_objectsByEvaluatingSpecifier); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_objectsByEvaluatingSpecifier); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// evaluationErrorNumber int get evaluationErrorNumber { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_evaluationErrorNumber); - } /// setEvaluationErrorNumber: - set evaluationErrorNumber(int value) { - return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setEvaluationErrorNumber_, value); - + set evaluationErrorNumber(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setEvaluationErrorNumber_, value); } /// evaluationErrorSpecifier NSScriptObjectSpecifier? get evaluationErrorSpecifier { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluationErrorSpecifier); - return _ret.address == 0 ? null : NSScriptObjectSpecifier.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluationErrorSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } /// descriptor NSAppleEventDescriptor? get descriptor { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_descriptor); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// init NSScriptObjectSpecifier init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSScriptObjectSpecifier.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } /// new static NSScriptObjectSpecifier new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_new); - return NSScriptObjectSpecifier.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_new); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); - return NSScriptObjectSpecifier.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSScriptObjectSpecifier alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_alloc); - return NSScriptObjectSpecifier.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_alloc); + return NSScriptObjectSpecifier.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_cqxsqq(_class_NSScriptObjectSpecifier, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSScriptObjectSpecifier, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSScriptObjectSpecifier, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSScriptObjectSpecifier, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSScriptObjectSpecifier, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSScriptObjectSpecifier, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSScriptObjectSpecifier, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSScriptObjectSpecifier, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScriptObjectSpecifier, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } } late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); -late final _sel_setReceiversSpecifier_ = objc.registerName("setReceiversSpecifier:"); +late final _sel_setReceiversSpecifier_ = + objc.registerName("setReceiversSpecifier:"); late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); late final _sel_evaluatedArguments = objc.registerName("evaluatedArguments"); late final _sel_isWellFormed = objc.registerName("isWellFormed"); -late final _sel_performDefaultImplementation = objc.registerName("performDefaultImplementation"); +late final _sel_performDefaultImplementation = + objc.registerName("performDefaultImplementation"); late final _sel_executeCommand = objc.registerName("executeCommand"); late final _sel_scriptErrorNumber = objc.registerName("scriptErrorNumber"); -late final _sel_setScriptErrorNumber_ = objc.registerName("setScriptErrorNumber:"); -late final _sel_scriptErrorOffendingObjectDescriptor = objc.registerName("scriptErrorOffendingObjectDescriptor"); -late final _sel_setScriptErrorOffendingObjectDescriptor_ = objc.registerName("setScriptErrorOffendingObjectDescriptor:"); -late final _sel_scriptErrorExpectedTypeDescriptor = objc.registerName("scriptErrorExpectedTypeDescriptor"); -late final _sel_setScriptErrorExpectedTypeDescriptor_ = objc.registerName("setScriptErrorExpectedTypeDescriptor:"); +late final _sel_setScriptErrorNumber_ = + objc.registerName("setScriptErrorNumber:"); +late final _sel_scriptErrorOffendingObjectDescriptor = + objc.registerName("scriptErrorOffendingObjectDescriptor"); +late final _sel_setScriptErrorOffendingObjectDescriptor_ = + objc.registerName("setScriptErrorOffendingObjectDescriptor:"); +late final _sel_scriptErrorExpectedTypeDescriptor = + objc.registerName("scriptErrorExpectedTypeDescriptor"); +late final _sel_setScriptErrorExpectedTypeDescriptor_ = + objc.registerName("setScriptErrorExpectedTypeDescriptor:"); late final _sel_scriptErrorString = objc.registerName("scriptErrorString"); -late final _sel_setScriptErrorString_ = objc.registerName("setScriptErrorString:"); +late final _sel_setScriptErrorString_ = + objc.registerName("setScriptErrorString:"); late final _sel_currentCommand = objc.registerName("currentCommand"); late final _sel_appleEvent = objc.registerName("appleEvent"); late final _sel_suspendExecution = objc.registerName("suspendExecution"); -late final _sel_resumeExecutionWithResult_ = objc.registerName("resumeExecutionWithResult:"); +late final _sel_resumeExecutionWithResult_ = + objc.registerName("resumeExecutionWithResult:"); /// NSScriptCommand class NSScriptCommand extends objc.NSObject { NSScriptCommand._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSScriptCommand] that points to the same underlying object as [other]. - NSScriptCommand.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSScriptCommand.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSScriptCommand] that wraps the given raw object pointer. NSScriptCommand.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSScriptCommand]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); } /// initWithCommandDescription: - NSScriptCommand initWithCommandDescription_(NSScriptCommandDescription commandDef) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCommandDescription_, commandDef.ref.pointer); + NSScriptCommand initWithCommandDescription_( + NSScriptCommandDescription commandDef) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCommandDescription_, commandDef.ref.pointer); return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSScriptCommand? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } /// commandDescription NSScriptCommandDescription get commandDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_commandDescription); - return NSScriptCommandDescription.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_commandDescription); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } /// directParameter objc.ObjCObjectBase? get directParameter { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_directParameter); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// setDirectParameter: - set directParameter(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDirectParameter_, value?.ref.pointer ?? ffi.nullptr); - + set directParameter(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setDirectParameter_, + value?.ref.pointer ?? ffi.nullptr); } /// receiversSpecifier NSScriptObjectSpecifier? get receiversSpecifier { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_receiversSpecifier); - return _ret.address == 0 ? null : NSScriptObjectSpecifier.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_receiversSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } /// setReceiversSpecifier: - set receiversSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setReceiversSpecifier_, value?.ref.pointer ?? ffi.nullptr); - + set receiversSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setReceiversSpecifier_, + value?.ref.pointer ?? ffi.nullptr); } /// evaluatedReceivers objc.ObjCObjectBase? get evaluatedReceivers { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluatedReceivers); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluatedReceivers); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// arguments objc.NSDictionary? get arguments { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_arguments); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// setArguments: - set arguments(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setArguments_, value?.ref.pointer ?? ffi.nullptr); - + set arguments(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setArguments_, + value?.ref.pointer ?? ffi.nullptr); } /// evaluatedArguments objc.NSDictionary? get evaluatedArguments { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluatedArguments); - return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_evaluatedArguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// isWellFormed bool get wellFormed { return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isWellFormed); - } /// performDefaultImplementation objc.ObjCObjectBase? performDefaultImplementation() { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_performDefaultImplementation); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_performDefaultImplementation); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// executeCommand objc.ObjCObjectBase? executeCommand() { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_executeCommand); - return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } /// scriptErrorNumber int get scriptErrorNumber { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_scriptErrorNumber); - } /// setScriptErrorNumber: - set scriptErrorNumber(int value) { - return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setScriptErrorNumber_, value); - + set scriptErrorNumber(int value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setScriptErrorNumber_, value); } /// scriptErrorOffendingObjectDescriptor NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_scriptErrorOffendingObjectDescriptor); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_scriptErrorOffendingObjectDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// setScriptErrorOffendingObjectDescriptor: - set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setScriptErrorOffendingObjectDescriptor_, value?.ref.pointer ?? ffi.nullptr); - + set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setScriptErrorOffendingObjectDescriptor_, + value?.ref.pointer ?? ffi.nullptr); } /// scriptErrorExpectedTypeDescriptor NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_scriptErrorExpectedTypeDescriptor); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_scriptErrorExpectedTypeDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// setScriptErrorExpectedTypeDescriptor: - set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setScriptErrorExpectedTypeDescriptor_, value?.ref.pointer ?? ffi.nullptr); - + set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, + _sel_setScriptErrorExpectedTypeDescriptor_, + value?.ref.pointer ?? ffi.nullptr); } /// scriptErrorString objc.NSString? get scriptErrorString { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_scriptErrorString); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_scriptErrorString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// setScriptErrorString: - set scriptErrorString(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setScriptErrorString_, value?.ref.pointer ?? ffi.nullptr); - + set scriptErrorString(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setScriptErrorString_, + value?.ref.pointer ?? ffi.nullptr); } /// currentCommand static NSScriptCommand? currentCommand() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommand, _sel_currentCommand); - return _ret.address == 0 ? null : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptCommand, _sel_currentCommand); + return _ret.address == 0 + ? null + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } /// appleEvent NSAppleEventDescriptor? get appleEvent { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_appleEvent); - return _ret.address == 0 ? null : NSAppleEventDescriptor.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } /// suspendExecution void suspendExecution() { -_objc_msgSend_ksby9f(this.ref.pointer, _sel_suspendExecution); - + _objc_msgSend_ksby9f(this.ref.pointer, _sel_suspendExecution); } /// resumeExecutionWithResult: void resumeExecutionWithResult_(objc.ObjCObjectBase? result) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_resumeExecutionWithResult_, result?.ref.pointer ?? ffi.nullptr); - + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_resumeExecutionWithResult_, + result?.ref.pointer ?? ffi.nullptr); } /// init NSScriptCommand init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } @@ -25544,7 +38311,8 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_resumeExecutionWithResult_, result?. /// allocWithZone: static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSScriptCommand, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptCommand, _sel_allocWithZone_, zone); return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } @@ -25555,106 +38323,139 @@ _objc_msgSend_ukcdfq(this.ref.pointer, _sel_resumeExecutionWithResult_, result?. } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_NSScriptCommand, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSScriptCommand, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_NSScriptCommand, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSScriptCommand, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSScriptCommand, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSScriptCommand, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSScriptCommand, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSScriptCommand, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScriptCommand, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommand, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } } -late final _sel_createCommandInstance = objc.registerName("createCommandInstance"); -late final _sel_createCommandInstanceWithZone_ = objc.registerName("createCommandInstanceWithZone:"); +late final _sel_createCommandInstance = + objc.registerName("createCommandInstance"); +late final _sel_createCommandInstanceWithZone_ = + objc.registerName("createCommandInstanceWithZone:"); /// NSScriptCommandDescription class NSScriptCommandDescription extends objc.NSObject { NSScriptCommandDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSScriptCommandDescription] that points to the same underlying object as [other]. - NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSScriptCommandDescription] that wraps the given raw object pointer. NSScriptCommandDescription.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSScriptCommandDescription); } /// init NSScriptCommandDescription init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSScriptCommandDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } /// initWithSuiteName:commandName:dictionary: - NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_(objc.NSString suiteName, objc.NSString commandName, objc.NSDictionary? commandDeclaration) { - final _ret = _objc_msgSend_aud7dn(this.ref.retainAndReturnPointer(), _sel_initWithSuiteName_commandName_dictionary_, suiteName.ref.pointer, commandName.ref.pointer, commandDeclaration?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSScriptCommandDescription.castFromPointer(_ret, retain: false, release: true); + NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( + objc.NSString suiteName, + objc.NSString commandName, + objc.NSDictionary? commandDeclaration) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithSuiteName_commandName_dictionary_, + suiteName.ref.pointer, + commandName.ref.pointer, + commandDeclaration?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } /// initWithCoder: NSScriptCommandDescription? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 ? null : NSScriptCommandDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } /// suiteName @@ -25672,13 +38473,11 @@ class NSScriptCommandDescription extends objc.NSObject { /// appleEventClassCode int get appleEventClassCode { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_appleEventClassCode); - } /// appleEventCode int get appleEventCode { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_appleEventCode); - } /// commandClassName @@ -25690,13 +38489,15 @@ class NSScriptCommandDescription extends objc.NSObject { /// returnType objc.NSString? get returnType { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_returnType); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// appleEventCodeForReturnType int get appleEventCodeForReturnType { - return _objc_msgSend_dzloj4(this.ref.pointer, _sel_appleEventCodeForReturnType); - + return _objc_msgSend_dzloj4( + this.ref.pointer, _sel_appleEventCodeForReturnType); } /// argumentNames @@ -25707,362 +38508,473 @@ class NSScriptCommandDescription extends objc.NSObject { /// typeForArgumentWithName: objc.NSString? typeForArgumentWithName_(objc.NSString argumentName) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_typeForArgumentWithName_, argumentName.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_typeForArgumentWithName_, argumentName.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// appleEventCodeForArgumentWithName: int appleEventCodeForArgumentWithName_(objc.NSString argumentName) { - return _objc_msgSend_t2sarz(this.ref.pointer, _sel_appleEventCodeForArgumentWithName_, argumentName.ref.pointer); - + return _objc_msgSend_t2sarz(this.ref.pointer, + _sel_appleEventCodeForArgumentWithName_, argumentName.ref.pointer); } /// isOptionalArgumentWithName: bool isOptionalArgumentWithName_(objc.NSString argumentName) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isOptionalArgumentWithName_, argumentName.ref.pointer); - + return _objc_msgSend_l8lotg(this.ref.pointer, + _sel_isOptionalArgumentWithName_, argumentName.ref.pointer); } /// createCommandInstance NSScriptCommand createCommandInstance() { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_createCommandInstance); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_createCommandInstance); return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } /// createCommandInstanceWithZone: NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(this.ref.pointer, _sel_createCommandInstanceWithZone_, zone); + final _ret = _objc_msgSend_1b3ihd0( + this.ref.pointer, _sel_createCommandInstanceWithZone_, zone); return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } /// new static NSScriptCommandDescription new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_new); - return NSScriptCommandDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_new); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSScriptCommandDescription, _sel_allocWithZone_, zone); - return NSScriptCommandDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSScriptCommandDescription alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_alloc); - return NSScriptCommandDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_alloc); + return NSScriptCommandDescription.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_cqxsqq(_class_NSScriptCommandDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSScriptCommandDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSScriptCommandDescription, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1(_class_NSScriptCommandDescription, + _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSScriptCommandDescription, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSScriptCommandDescription, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSScriptCommandDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSScriptCommandDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSScriptCommandDescription, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSScriptCommandDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSScriptCommandDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScriptCommandDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { -_objc_msgSend_ukcdfq(this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } } late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); -final _objc_msgSend_1fdwx8i = objc.msgSendPointer.cast Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>>().asFunction Function(ffi.Pointer , ffi.Pointer , ffi.Pointer )>(); +final _objc_msgSend_1fdwx8i = 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_typeForKey_ = objc.registerName("typeForKey:"); -late final _sel_classDescriptionForKey_ = objc.registerName("classDescriptionForKey:"); -late final _sel_appleEventCodeForKey_ = objc.registerName("appleEventCodeForKey:"); -late final _sel_keyWithAppleEventCode_ = objc.registerName("keyWithAppleEventCode:"); -late final _sel_defaultSubcontainerAttributeKey = objc.registerName("defaultSubcontainerAttributeKey"); -late final _sel_isLocationRequiredToCreateForKey_ = objc.registerName("isLocationRequiredToCreateForKey:"); +late final _sel_classDescriptionForKey_ = + objc.registerName("classDescriptionForKey:"); +late final _sel_appleEventCodeForKey_ = + objc.registerName("appleEventCodeForKey:"); +late final _sel_keyWithAppleEventCode_ = + objc.registerName("keyWithAppleEventCode:"); +late final _sel_defaultSubcontainerAttributeKey = + objc.registerName("defaultSubcontainerAttributeKey"); +late final _sel_isLocationRequiredToCreateForKey_ = + objc.registerName("isLocationRequiredToCreateForKey:"); late final _sel_hasPropertyForKey_ = objc.registerName("hasPropertyForKey:"); -late final _sel_hasOrderedToManyRelationshipForKey_ = objc.registerName("hasOrderedToManyRelationshipForKey:"); -late final _sel_hasReadablePropertyForKey_ = objc.registerName("hasReadablePropertyForKey:"); -late final _sel_hasWritablePropertyForKey_ = objc.registerName("hasWritablePropertyForKey:"); +late final _sel_hasOrderedToManyRelationshipForKey_ = + objc.registerName("hasOrderedToManyRelationshipForKey:"); +late final _sel_hasReadablePropertyForKey_ = + objc.registerName("hasReadablePropertyForKey:"); +late final _sel_hasWritablePropertyForKey_ = + objc.registerName("hasWritablePropertyForKey:"); late final _sel_isReadOnlyKey_ = objc.registerName("isReadOnlyKey:"); /// NSScriptClassDescription class NSScriptClassDescription extends NSClassDescription { NSScriptClassDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [NSScriptClassDescription] that points to the same underlying object as [other]. - NSScriptClassDescription.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + NSScriptClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [NSScriptClassDescription] that wraps the given raw object pointer. NSScriptClassDescription.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSScriptClassDescription]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); } /// classDescriptionForClass: - static NSClassDescription? classDescriptionForClass_(objc.ObjCObjectBase aClass) { - final _ret = _objc_msgSend_juohf7(_class_NSScriptClassDescription, _sel_classDescriptionForClass_, aClass.ref.pointer); - return _ret.address == 0 ? null : NSClassDescription.castFromPointer(_ret, retain: true, release: true); + static NSClassDescription? classDescriptionForClass_( + objc.ObjCObjectBase aClass) { + final _ret = _objc_msgSend_juohf7(_class_NSScriptClassDescription, + _sel_classDescriptionForClass_, aClass.ref.pointer); + return _ret.address == 0 + ? null + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); } /// initWithSuiteName:className:dictionary: - NSScriptClassDescription? initWithSuiteName_className_dictionary_(objc.NSString suiteName, objc.NSString className, objc.NSDictionary? classDeclaration) { - final _ret = _objc_msgSend_aud7dn(this.ref.retainAndReturnPointer(), _sel_initWithSuiteName_className_dictionary_, suiteName.ref.pointer, className.ref.pointer, classDeclaration?.ref.pointer ?? ffi.nullptr); - return _ret.address == 0 ? null : NSScriptClassDescription.castFromPointer(_ret, retain: false, release: true); + NSScriptClassDescription? initWithSuiteName_className_dictionary_( + objc.NSString suiteName, + objc.NSString className, + objc.NSDictionary? classDeclaration) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithSuiteName_className_dictionary_, + suiteName.ref.pointer, + className.ref.pointer, + classDeclaration?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// suiteName objc.NSString? get suiteName { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_suiteName); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// className objc.NSString? get className { final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_className); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// implementationClassName objc.NSString? get implementationClassName { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_implementationClassName); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_implementationClassName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// superclassDescription NSScriptClassDescription? get superclassDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_superclassDescription); - return _ret.address == 0 ? null : NSScriptClassDescription.castFromPointer(_ret, retain: true, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_superclassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } /// appleEventCode int get appleEventCode { return _objc_msgSend_dzloj4(this.ref.pointer, _sel_appleEventCode); - } /// matchesAppleEventCode: bool matchesAppleEventCode_(int appleEventCode) { - return _objc_msgSend_1n8vqu1(this.ref.pointer, _sel_matchesAppleEventCode_, appleEventCode); - + return _objc_msgSend_1n8vqu1( + this.ref.pointer, _sel_matchesAppleEventCode_, appleEventCode); } /// supportsCommand: bool supportsCommand_(NSScriptCommandDescription commandDescription) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_supportsCommand_, commandDescription.ref.pointer); - + return _objc_msgSend_l8lotg(this.ref.pointer, _sel_supportsCommand_, + commandDescription.ref.pointer); } /// selectorForCommand: - ffi.Pointer selectorForCommand_(NSScriptCommandDescription commandDescription) { - return _objc_msgSend_1fdwx8i(this.ref.pointer, _sel_selectorForCommand_, commandDescription.ref.pointer); - + ffi.Pointer selectorForCommand_( + NSScriptCommandDescription commandDescription) { + return _objc_msgSend_1fdwx8i(this.ref.pointer, _sel_selectorForCommand_, + commandDescription.ref.pointer); } /// typeForKey: objc.NSString? typeForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_typeForKey_, key.ref.pointer); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_typeForKey_, key.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// classDescriptionForKey: NSScriptClassDescription? classDescriptionForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, _sel_classDescriptionForKey_, key.ref.pointer); - return _ret.address == 0 ? null : NSScriptClassDescription.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_classDescriptionForKey_, key.ref.pointer); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } /// appleEventCodeForKey: int appleEventCodeForKey_(objc.NSString key) { - return _objc_msgSend_t2sarz(this.ref.pointer, _sel_appleEventCodeForKey_, key.ref.pointer); - + return _objc_msgSend_t2sarz( + this.ref.pointer, _sel_appleEventCodeForKey_, key.ref.pointer); } /// keyWithAppleEventCode: objc.NSString? keyWithAppleEventCode_(int appleEventCode) { - final _ret = _objc_msgSend_pxgym4(this.ref.pointer, _sel_keyWithAppleEventCode_, appleEventCode); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_pxgym4( + this.ref.pointer, _sel_keyWithAppleEventCode_, appleEventCode); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// defaultSubcontainerAttributeKey objc.NSString? get defaultSubcontainerAttributeKey { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_defaultSubcontainerAttributeKey); - return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_defaultSubcontainerAttributeKey); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// isLocationRequiredToCreateForKey: bool isLocationRequiredToCreateForKey_(objc.NSString toManyRelationshipKey) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, + _sel_isLocationRequiredToCreateForKey_, + toManyRelationshipKey.ref.pointer); } /// hasPropertyForKey: bool hasPropertyForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_hasPropertyForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_hasPropertyForKey_, key.ref.pointer); } /// hasOrderedToManyRelationshipForKey: bool hasOrderedToManyRelationshipForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(this.ref.pointer, + _sel_hasOrderedToManyRelationshipForKey_, key.ref.pointer); } /// hasReadablePropertyForKey: bool hasReadablePropertyForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_hasReadablePropertyForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_hasReadablePropertyForKey_, key.ref.pointer); } /// hasWritablePropertyForKey: bool hasWritablePropertyForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_hasWritablePropertyForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_hasWritablePropertyForKey_, key.ref.pointer); } /// isReadOnlyKey: bool isReadOnlyKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(this.ref.pointer, _sel_isReadOnlyKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_isReadOnlyKey_, key.ref.pointer); } /// registerClassDescription:forClass: - static void registerClassDescription_forClass_(NSClassDescription description, objc.ObjCObjectBase aClass) { -_objc_msgSend_1tjlcwl(_class_NSScriptClassDescription, _sel_registerClassDescription_forClass_, description.ref.pointer, aClass.ref.pointer); - + static void registerClassDescription_forClass_( + NSClassDescription description, objc.ObjCObjectBase aClass) { + _objc_msgSend_1tjlcwl( + _class_NSScriptClassDescription, + _sel_registerClassDescription_forClass_, + description.ref.pointer, + aClass.ref.pointer); } /// invalidateClassDescriptionCache static void invalidateClassDescriptionCache() { -_objc_msgSend_ksby9f(_class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); - + _objc_msgSend_ksby9f( + _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); } /// init NSScriptClassDescription init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSScriptClassDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// new static NSScriptClassDescription new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_new); - return NSScriptClassDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_new); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// allocWithZone: static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_NSScriptClassDescription, _sel_allocWithZone_, zone); - return NSScriptClassDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = _objc_msgSend_1b3ihd0( + _class_NSScriptClassDescription, _sel_allocWithZone_, zone); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } /// alloc static NSScriptClassDescription alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_alloc); - return NSScriptClassDescription.castFromPointer(_ret, retain: false, release: true); + final _ret = + _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_alloc); + return NSScriptClassDescription.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_cqxsqq(_class_NSScriptClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_NSScriptClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { - return _objc_msgSend_olxnu1(_class_NSScriptClassDescription, _sel_useStoredAccessor); - + return _objc_msgSend_olxnu1( + _class_NSScriptClassDescription, _sel_useStoredAccessor); } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_NSScriptClassDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_NSScriptClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_NSScriptClassDescription, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_NSScriptClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_NSScriptClassDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_NSScriptClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } @@ -26075,22 +38987,22 @@ late final _sel_setSomeField_ = objc.registerName("setSomeField:"); /// SwiftClass class SwiftClass extends objc.NSObject { SwiftClass._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) : - super.castFromPointer - (pointer, retain: retain, release: release); + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); /// Constructs a [SwiftClass] that points to the same underlying object as [other]. - SwiftClass.castFrom(objc.ObjCObjectBase other) : - this._(other.ref.pointer, retain: true, release: true); + SwiftClass.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); /// Constructs a [SwiftClass] that wraps the given raw object pointer. SwiftClass.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) : - this._(other, retain: retain, release: release); + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [SwiftClass]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, _class_SwiftClass); + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_SwiftClass); } /// sayHello @@ -26102,18 +39014,17 @@ class SwiftClass extends objc.NSObject { /// someField int get someField { return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_someField); - } /// setSomeField: - set someField(int value) { + set someField(int value) { return _objc_msgSend_ke7qz2(this.ref.pointer, _sel_setSomeField_, value); - } /// init SwiftClass init() { - final _ret = _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); return SwiftClass.castFromPointer(_ret, retain: false, release: true); } @@ -26125,7 +39036,8 @@ class SwiftClass extends objc.NSObject { /// allocWithZone: static SwiftClass allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0(_class_SwiftClass, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1b3ihd0(_class_SwiftClass, _sel_allocWithZone_, zone); return SwiftClass.castFromPointer(_ret, retain: false, release: true); } @@ -26136,56 +39048,70 @@ class SwiftClass extends objc.NSObject { } /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget_selector_object_(objc.ObjCObjectBase aTarget, ffi.Pointer aSelector, objc.ObjCObjectBase? anArgument) { -_objc_msgSend_cqxsqq(_class_SwiftClass, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.ref.pointer, aSelector, anArgument?.ref.pointer ?? ffi.nullptr); - + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.ObjCObjectBase aTarget, + ffi.Pointer aSelector, + objc.ObjCObjectBase? anArgument) { + _objc_msgSend_cqxsqq( + _class_SwiftClass, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.ref.pointer, + aSelector, + anArgument?.ref.pointer ?? ffi.nullptr); } /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget_(objc.ObjCObjectBase aTarget) { -_objc_msgSend_ukcdfq(_class_SwiftClass, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); - + static void cancelPreviousPerformRequestsWithTarget_( + objc.ObjCObjectBase aTarget) { + _objc_msgSend_ukcdfq(_class_SwiftClass, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.ref.pointer); } /// accessInstanceVariablesDirectly static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_olxnu1(_class_SwiftClass, _sel_accessInstanceVariablesDirectly); - + return _objc_msgSend_olxnu1( + _class_SwiftClass, _sel_accessInstanceVariablesDirectly); } /// useStoredAccessor static bool useStoredAccessor() { return _objc_msgSend_olxnu1(_class_SwiftClass, _sel_useStoredAccessor); - } /// keyPathsForValuesAffectingValueForKey: static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { - final _ret = _objc_msgSend_juohf7(_class_SwiftClass, _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); + final _ret = _objc_msgSend_juohf7(_class_SwiftClass, + _sel_keyPathsForValuesAffectingValueForKey_, key.ref.pointer); return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } /// automaticallyNotifiesObserversForKey: static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { - return _objc_msgSend_l8lotg(_class_SwiftClass, _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); - + return _objc_msgSend_l8lotg(_class_SwiftClass, + _sel_automaticallyNotifiesObserversForKey_, key.ref.pointer); } /// setKeys:triggerChangeNotificationsForDependentKey: - static void setKeys_triggerChangeNotificationsForDependentKey_(objc.NSArray keys, objc.NSString dependentKey) { -_objc_msgSend_1tjlcwl(_class_SwiftClass, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.ref.pointer, dependentKey.ref.pointer); - + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_1tjlcwl( + _class_SwiftClass, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.ref.pointer, + dependentKey.ref.pointer); } /// classFallbacksForKeyedArchiver static objc.NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_SwiftClass, _sel_classFallbacksForKeyedArchiver); + final _ret = _objc_msgSend_1unuoxw( + _class_SwiftClass, _sel_classFallbacksForKeyedArchiver); return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } /// classForKeyedUnarchiver static objc.ObjCObjectBase classForKeyedUnarchiver() { - final _ret = _objc_msgSend_1unuoxw(_class_SwiftClass, _sel_classForKeyedUnarchiver); + final _ret = + _objc_msgSend_1unuoxw(_class_SwiftClass, _sel_classForKeyedUnarchiver); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -26207,4 +39133,3 @@ _objc_msgSend_1tjlcwl(_class_SwiftClass, _sel_setKeys_triggerChangeNotifications return SwiftClass.castFromPointer(_ret, retain: true, release: true); } } - diff --git a/pkgs/ffigen/example/swift/swift_api_bindings.dart.m b/pkgs/ffigen/example/swift/swift_api_bindings.dart.m index 4349b5eec..450d757ee 100644 --- a/pkgs/ffigen/example/swift/swift_api_bindings.dart.m +++ b/pkgs/ffigen/example/swift/swift_api_bindings.dart.m @@ -1,192 +1,105 @@ #include - #import "third_party/swift_api.h" -typedef void (^ListenerBlock)(NSDictionary* , struct _NSRange , BOOL * ); -ListenerBlock wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool(ListenerBlock block) { - ListenerBlock wrapper = [^void(NSDictionary* arg0, struct _NSRange arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; -} +#if !__has_feature(objc_arc) +#error "This file must be compiled with ARC enabled" +#endif -typedef void (^ListenerBlock1)(id , struct _NSRange , BOOL * ); -ListenerBlock1 wrapListenerBlock_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool(ListenerBlock1 block) { - ListenerBlock1 wrapper = [^void(id arg0, struct _NSRange arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock2)(NSDate* , BOOL , BOOL * ); -ListenerBlock2 wrapListenerBlock_ObjCBlock_ffiVoid_NSDate_bool_bool(ListenerBlock2 block) { - ListenerBlock2 wrapper = [^void(NSDate* arg0, BOOL arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock3)(NSTimer* ); -ListenerBlock3 wrapListenerBlock_ObjCBlock_ffiVoid_NSTimer(ListenerBlock3 block) { - ListenerBlock3 wrapper = [^void(NSTimer* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock4)(NSFileHandle* ); -ListenerBlock4 wrapListenerBlock_ObjCBlock_ffiVoid_NSFileHandle(ListenerBlock4 block) { - ListenerBlock4 wrapper = [^void(NSFileHandle* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock5)(NSError* ); -ListenerBlock5 wrapListenerBlock_ObjCBlock_ffiVoid_NSError(ListenerBlock5 block) { - ListenerBlock5 wrapper = [^void(NSError* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock6)(NSDictionary* , NSError* ); -ListenerBlock6 wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary_NSError(ListenerBlock6 block) { - ListenerBlock6 wrapper = [^void(NSDictionary* arg0, NSError* arg1) { - block([arg0 retain], [arg1 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock7)(NSArray* ); -ListenerBlock7 wrapListenerBlock_ObjCBlock_ffiVoid_NSArray(ListenerBlock7 block) { - ListenerBlock7 wrapper = [^void(NSArray* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; -} - -typedef void (^ListenerBlock8)(NSTextCheckingResult* , NSMatchingFlags , BOOL * ); -ListenerBlock8 wrapListenerBlock_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool(ListenerBlock8 block) { - ListenerBlock8 wrapper = [^void(NSTextCheckingResult* arg0, NSMatchingFlags arg1, BOOL * arg2) { - block([arg0 retain], arg1, arg2); - } copy]; - [block release]; - return wrapper; -} +id objc_retain(id); +id objc_retainBlock(id); -typedef void (^ListenerBlock9)(NSCachedURLResponse* ); -ListenerBlock9 wrapListenerBlock_ObjCBlock_ffiVoid_NSCachedURLResponse(ListenerBlock9 block) { - ListenerBlock9 wrapper = [^void(NSCachedURLResponse* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline)(); +_ListenerTrampoline _wrapListenerBlock_ksby9f(_ListenerTrampoline block) NS_RETURNS_RETAINED { + return ^void() { + objc_retainBlock(block); + block(); + }; } -typedef void (^ListenerBlock10)(NSURLResponse* , NSData* , NSError* ); -ListenerBlock10 wrapListenerBlock_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError(ListenerBlock10 block) { - ListenerBlock10 wrapper = [^void(NSURLResponse* arg0, NSData* arg1, NSError* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline1)(id arg0, id arg1, BOOL * arg2); +_ListenerTrampoline1 _wrapListenerBlock_1k41wmu(_ListenerTrampoline1 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1), arg2); + }; } -typedef void (^ListenerBlock11)(NSDictionary* ); -ListenerBlock11 wrapListenerBlock_ObjCBlock_ffiVoid_NSDictionary(ListenerBlock11 block) { - ListenerBlock11 wrapper = [^void(NSDictionary* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline2)(void * arg0, id arg1); +_ListenerTrampoline2 _wrapListenerBlock_sjfpmz(_ListenerTrampoline2 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1)); + }; } -typedef void (^ListenerBlock12)(NSURLCredential* ); -ListenerBlock12 wrapListenerBlock_ObjCBlock_ffiVoid_NSURLCredential(ListenerBlock12 block) { - ListenerBlock12 wrapper = [^void(NSURLCredential* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline3)(id arg0, struct _NSRange arg1, BOOL * arg2); +_ListenerTrampoline3 _wrapListenerBlock_1j7ar3u(_ListenerTrampoline3 block) NS_RETURNS_RETAINED { + return ^void(id arg0, struct _NSRange arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, arg2); + }; } -typedef void (^ListenerBlock13)(NSArray* , NSArray* , NSArray* ); -ListenerBlock13 wrapListenerBlock_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray(ListenerBlock13 block) { - ListenerBlock13 wrapper = [^void(NSArray* arg0, NSArray* arg1, NSArray* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline4)(id arg0, BOOL arg1, BOOL * arg2); +_ListenerTrampoline4 _wrapListenerBlock_rvgf02(_ListenerTrampoline4 block) NS_RETURNS_RETAINED { + return ^void(id arg0, BOOL arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, arg2); + }; } -typedef void (^ListenerBlock14)(NSArray* ); -ListenerBlock14 wrapListenerBlock_ObjCBlock_ffiVoid_NSArray1(ListenerBlock14 block) { - ListenerBlock14 wrapper = [^void(NSArray* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline5)(id arg0); +_ListenerTrampoline5 _wrapListenerBlock_ukcdfq(_ListenerTrampoline5 block) NS_RETURNS_RETAINED { + return ^void(id arg0) { + objc_retainBlock(block); + block(objc_retain(arg0)); + }; } -typedef void (^ListenerBlock15)(NSData* ); -ListenerBlock15 wrapListenerBlock_ObjCBlock_ffiVoid_NSData(ListenerBlock15 block) { - ListenerBlock15 wrapper = [^void(NSData* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline6)(id arg0, id arg1); +_ListenerTrampoline6 _wrapListenerBlock_1tjlcwl(_ListenerTrampoline6 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1)); + }; } -typedef void (^ListenerBlock16)(NSData* , BOOL , NSError* ); -ListenerBlock16 wrapListenerBlock_ObjCBlock_ffiVoid_NSData_bool_NSError(ListenerBlock16 block) { - ListenerBlock16 wrapper = [^void(NSData* arg0, BOOL arg1, NSError* arg2) { - block([arg0 retain], arg1, [arg2 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline7)(void * arg0); +_ListenerTrampoline7 _wrapListenerBlock_hepzs(_ListenerTrampoline7 block) NS_RETURNS_RETAINED { + return ^void(void * arg0) { + objc_retainBlock(block); + block(arg0); + }; } -typedef void (^ListenerBlock17)(NSURLSessionWebSocketMessage* , NSError* ); -ListenerBlock17 wrapListenerBlock_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError(ListenerBlock17 block) { - ListenerBlock17 wrapper = [^void(NSURLSessionWebSocketMessage* arg0, NSError* arg1) { - block([arg0 retain], [arg1 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline8)(BOOL arg0); +_ListenerTrampoline8 _wrapListenerBlock_117qins(_ListenerTrampoline8 block) NS_RETURNS_RETAINED { + return ^void(BOOL arg0) { + objc_retainBlock(block); + block(arg0); + }; } -typedef void (^ListenerBlock18)(NSData* , NSURLResponse* , NSError* ); -ListenerBlock18 wrapListenerBlock_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError(ListenerBlock18 block) { - ListenerBlock18 wrapper = [^void(NSData* arg0, NSURLResponse* arg1, NSError* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline9)(id arg0, NSMatchingFlags arg1, BOOL * arg2); +_ListenerTrampoline9 _wrapListenerBlock_9w6y6n(_ListenerTrampoline9 block) NS_RETURNS_RETAINED { + return ^void(id arg0, NSMatchingFlags arg1, BOOL * arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, arg2); + }; } -typedef void (^ListenerBlock19)(NSURL* , NSURLResponse* , NSError* ); -ListenerBlock19 wrapListenerBlock_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError(ListenerBlock19 block) { - ListenerBlock19 wrapper = [^void(NSURL* arg0, NSURLResponse* arg1, NSError* arg2) { - block([arg0 retain], [arg1 retain], [arg2 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline10)(id arg0, id arg1, id arg2); +_ListenerTrampoline10 _wrapListenerBlock_tenbla(_ListenerTrampoline10 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, id arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1), objc_retain(arg2)); + }; } -typedef void (^ListenerBlock20)(NSTask* ); -ListenerBlock20 wrapListenerBlock_ObjCBlock_ffiVoid_NSTask(ListenerBlock20 block) { - ListenerBlock20 wrapper = [^void(NSTask* arg0) { - block([arg0 retain]); - } copy]; - [block release]; - return wrapper; +typedef void (^_ListenerTrampoline11)(id arg0, BOOL arg1, id arg2); +_ListenerTrampoline11 _wrapListenerBlock_hfhq9m(_ListenerTrampoline11 block) NS_RETURNS_RETAINED { + return ^void(id arg0, BOOL arg1, id arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, objc_retain(arg2)); + }; }